diff options
Diffstat (limited to 'static/unix-v10/man7/units.7')
| -rw-r--r-- | static/unix-v10/man7/units.7 | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/static/unix-v10/man7/units.7 b/static/unix-v10/man7/units.7 new file mode 100644 index 00000000..445c2196 --- /dev/null +++ b/static/unix-v10/man7/units.7 @@ -0,0 +1,140 @@ +.if n .ds / / +.if t .ds / \z/\h'\w'*'u' +.TH UNITS 7 +.CT 1 inst_info +.SH NAME +units \- conversion program +.SH SYNOPSIS +.B units +.SH DESCRIPTION +.I Units +converts quantities expressed +in various standard scales to +their equivalents in other scales. +It works interactively in this fashion: +.PP +.EX +You have: inch +You want: cm +* 2.54 +/ 0.393701 +.EE +.PP +Quantities are specified using the following grammar: +.TP +.IR Unit : +.I Empty +|\| +.I Unit Term +|\| +.IB Unit " / " Term +.TP +.IR Term : +.I Number +|\| +.I Name +|\| +.BI ( " Unit " ) +|\| +.br +.BI square " Term +|\| +.BI sq " Term +|\| +.BI cube " Term +|\| +.BI cu " Term +|\| +.br +.IB Term " ^ " Number +.ig +.PP +\fIUnit\fP: \fIEmpty\fP + \fIUnit\fP \fITerm\fP + \fIUnit\fP \fL/\fP \fITerm\fP +\fITerm\fP: \fINumber\fP + \fIName\fP + \fL(\fP \fIUnit\fP \fL)\fP + \fLsquare\fP \fITerm\fP + \fLsq\fP \fITerm\fP + \fLcube\fP \fITerm\fP + \fLcu\fP \fITerm\fP + \fITerm\fP \fL^\fP \fINumber\fP +.fi +.. +.PP +Numbers are specified in the form expected by +.IR atof (3). +Names are maximal strings of non-numeric, non-punctuation characters. +Powers are indicated by the +.L ^ +operator or by the words +.L square +.RL ( sq ) +and +.L cube +.RL ( cu ). +Parentheses alter grouping. +The empty unit has value 1. +Terms are multiplied together unless connected by +.L / +for inversion, e.g. +.LR "15 pounds force/sq in" . +.PP +Most familiar units, +abbreviations, and metric prefixes are recognized, +together with a generous leavening of exotica +and a few constants of nature including: +.IP +.de fq +\f5\\$1\\fP \\$2 \\$3 \\$4 \\$5 \\$6 +.. +.nf +.fq pi ratio of circumference to diameter +.fq c speed of light +.fq e charge on an electron +.fq g acceleration of gravity +.fq force same as \f5g\fP +.fq mole Avogadro's number +.fq water "pressure head per unit height of water" +.fq au astronomical unit +.fi +.PP +The +.L pound +is a unit of +mass. +Compound names are run together, e.g. +.LR lightyear . +British units that differ from their US counterparts +are prefixed thus: +.LR brgallon . +Currency is denoted +.LR belgiumfranc , +.LR britainpound , +etc. +.PP +A response of +.L ? +to `You want:' displays all known units +conformable with the `You have:' quantity. +.PP +The complete list of units can be found in +.F /usr/lib/Units +and +.FR /n/alice/usr/td/Monetary.units . +.SH FILES +.F /usr/lib/Units +.br +.F /n/alice/usr/td/Monetary.units +.br +.F /usr/lib/Units.bin +.SH BUGS +Since +.I units +does only multiplicative scale changes, +it can convert Kelvin to Rankine, but not Centigrade to +Fahrenheit. +.br +Currency conversions are only as accurate as the most recent report of +foreign exchange prices from the AP wire. |
