|
|
1.1 root 1: .if n .ds / /
2: .if t .ds / \z/\h'\w'*'u'
3: .TH UNITS 7
4: .CT 1 inst_info
5: .SH NAME
6: units \- conversion program
7: .SH SYNOPSIS
8: .B units
9: .SH DESCRIPTION
10: .I Units
11: converts quantities expressed
12: in various standard scales to
13: their equivalents in other scales.
14: It works interactively in this fashion:
15: .PP
16: .EX
17: You have: inch
18: You want: cm
19: * 2.54
20: / 0.393701
21: .EE
22: .PP
23: Quantities are specified using the following grammar:
24: .TP
25: .IR Unit :
26: .I Empty
27: |\|
28: .I Unit Term
29: |\|
30: .IB Unit " / " Term
31: .TP
32: .IR Term :
33: .I Number
34: |\|
35: .I Name
36: |\|
37: .BI ( " Unit " )
38: |\|
39: .br
40: .BI square " Term
41: |\|
42: .BI sq " Term
43: |\|
44: .BI cube " Term
45: |\|
46: .BI cu " Term
47: |\|
48: .br
49: .IB Term " ^ " Number
50: .ig
51: .PP
52: \fIUnit\fP: \fIEmpty\fP
53: \fIUnit\fP \fITerm\fP
54: \fIUnit\fP \fL/\fP \fITerm\fP
55: \fITerm\fP: \fINumber\fP
56: \fIName\fP
57: \fL(\fP \fIUnit\fP \fL)\fP
58: \fLsquare\fP \fITerm\fP
59: \fLsq\fP \fITerm\fP
60: \fLcube\fP \fITerm\fP
61: \fLcu\fP \fITerm\fP
62: \fITerm\fP \fL^\fP \fINumber\fP
63: .fi
64: ..
65: .PP
66: Numbers are specified in the form expected by
67: .IR atof (3).
68: Names are maximal strings of non-numeric, non-punctuation characters.
69: Powers are indicated by the
70: .L ^
71: operator or by the words
72: .L square
73: .RL ( sq )
74: and
75: .L cube
76: .RL ( cu ).
77: Parentheses alter grouping.
78: The empty unit has value 1.
79: Terms are multiplied together unless connected by
80: .L /
81: for inversion, e.g.
82: .LR "15 pounds force/sq in" .
83: .PP
84: Most familiar units,
85: abbreviations, and metric prefixes are recognized,
86: together with a generous leavening of exotica
87: and a few constants of nature including:
88: .IP
89: .de fq
90: \f5\\$1\\fP \\$2 \\$3 \\$4 \\$5 \\$6
91: ..
92: .nf
93: .fq pi ratio of circumference to diameter
94: .fq c speed of light
95: .fq e charge on an electron
96: .fq g acceleration of gravity
97: .fq force same as \f5g\fP
98: .fq mole Avogadro's number
99: .fq water "pressure head per unit height of water"
100: .fq au astronomical unit
101: .fi
102: .PP
103: The
104: .L pound
105: is a unit of
106: mass.
107: Compound names are run together, e.g.
108: .LR lightyear .
109: British units that differ from their US counterparts
110: are prefixed thus:
111: .LR brgallon .
112: Currency is denoted
113: .LR belgiumfranc ,
114: .LR britainpound ,
115: etc.
116: .PP
117: A response of
118: .L ?
119: to `You want:' displays all known units
120: conformable with the `You have:' quantity.
121: .PP
122: The complete list of units can be found in
123: .F /usr/lib/Units
124: and
125: .FR /n/alice/usr/td/Monetary.units .
126: .SH FILES
127: .F /usr/lib/Units
128: .br
129: .F /n/alice/usr/td/Monetary.units
130: .br
131: .F /usr/lib/Units.bin
132: .SH BUGS
133: Since
134: .I units
135: does only multiplicative scale changes,
136: it can convert Kelvin to Rankine, but not Centigrade to
137: Fahrenheit.
138: .br
139: Currency conversions are only as accurate as the most recent report of
140: foreign exchange prices from the AP wire.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.