aboutsummaryrefslogtreecommitdiff
path: root/man/man1/units.html
blob: fed0c28798d1aede5b1d6ed3c36aef09f0171bee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<head>
<title>units(1) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>UNITS(1)</b><td align=right><b>UNITS(1)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    units &ndash; conversion program<br>
    
</table>
<p><font size=+1><b>SYNOPSIS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>units</font></tt> [ <tt><font size=+1>&#8722;v</font></tt> ] [ <i>file</i> ]<br>
    
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <i>Units</i> converts quantities expressed in various standard scales
    to their equivalents in other scales. It works interactively in
    this fashion:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>you have: inch<br>
        you want: cm<br>
         
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            * 2.54<br>
             / 0.393701<br>
            
            <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
            
        </table>
        </font></tt>
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            
            
        </table>
        
    </table>
    A quantity is specified as a multiplicative combination of units
    and floating point numbers. Operators have the following precedence:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>+ &#8722; </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add and subtract<br>
        <tt><font size=+1>* / x &#247; </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiply and divide<br>
        catenation &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;multiply<br>
        <tt><font size=+1>&sup2; &sup3; ^ </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exponentiation<br>
        <tt><font size=+1>| </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;divide<br>
        <tt><font size=+1>(</font></tt> ... <tt><font size=+1>) </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;grouping<br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
        
    </table>
    Most familiar units, abbreviations, and metric prefixes are recognized,
    together with a generous leavening of exotica and a few constants
    of nature including:<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        <tt><font size=+1>pi,</font></tt>&#960; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ratio of circumference to diameter<br>
        <tt><font size=+1>c </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;speed of light <br>
        <tt><font size=+1>e </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;charge on an electron <br>
        <tt><font size=+1>g </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;acceleration of gravity <br>
        <tt><font size=+1>force </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;same as <tt><font size=+1>g <br>
        mole </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Avogadro&#8217;s number <br>
        <tt><font size=+1>water </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;pressure head per unit height of water <br>
        <tt><font size=+1>au </font></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;astronomical unit <br>
        
        <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
        
        
    </table>
    The <tt><font size=+1>pound</font></tt> is a unit of mass. Compound names are run together,
    e.g. <tt><font size=+1>lightyear</font></tt>. British units that differ from their US counterparts
    are prefixed thus: <tt><font size=+1>brgallon</font></tt>. Currency is denoted <tt><font size=+1>belgiumfranc</font></tt>,
    <tt><font size=+1>britainpound</font></tt>, etc. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The complete list of units can be found in <tt><font size=+1>/usr/local/plan9/lib/units</font></tt>.
    A <i>file</i> argument to <i>units</i> specifies a file to be used instead of
    <tt><font size=+1>/usr/local/plan9/lib/units.</font></tt> The <tt><font size=+1>&#8722;v</font></tt> flag causes <i>units</i> to print
    its entire database.<br>
    
</table>
<p><font size=+1><b>EXAMPLE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>you have: 15 pounds force/in&sup2;<br>
    you want: atm<br>
     
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        * 1.02069<br>
         / .97973<br>
        
    </table>
    </font></tt>
</table>
<p><font size=+1><b>FILES     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>/usr/local/plan9/lib/units<br>
    </font></tt>
</table>
<p><font size=+1><b>SOURCE     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <tt><font size=+1>/usr/local/plan9/src/cmd/units.y<br>
    </font></tt>
</table>
<p><font size=+1><b>BUGS     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    Since <i>units</i> does only multiplicative scale changes, it can convert
    Kelvin to Rankine but not Centigrade to Fahrenheit. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Currency conversions are only as accurate as the last time someone
    updated the database.<br>
    
</table>

<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>