aboutsummaryrefslogtreecommitdiff
path: root/man/man1/units.1
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-03 06:40:20 +0000
committerrsc <devnull@localhost>2005-01-03 06:40:20 +0000
commit058b0118a52061ad57694c01fc8763b22b789c4d (patch)
tree6685f04dea5ed68edaa34998c976aed34c55fe94 /man/man1/units.1
parent2600337aa704efbeba8201e88147a764b4fd2b90 (diff)
downloadplan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.gz
plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.tar.bz2
plan9port-058b0118a52061ad57694c01fc8763b22b789c4d.zip
Some man pages.
Diffstat (limited to 'man/man1/units.1')
-rw-r--r--man/man1/units.1108
1 files changed, 108 insertions, 0 deletions
diff --git a/man/man1/units.1 b/man/man1/units.1
new file mode 100644
index 00000000..23863569
--- /dev/null
+++ b/man/man1/units.1
@@ -0,0 +1,108 @@
+.TH UNITS 1
+.if n .ds / /
+.SH NAME
+units \- conversion program
+.SH SYNOPSIS
+.B units
+[
+.B -v
+]
+[
+.I file
+]
+.SH DESCRIPTION
+.I Units
+converts quantities expressed
+in various standard scales to
+their equivalents in other scales.
+It works interactively in this fashion:
+.IP
+.EX
+you have: inch
+you want: cm
+ * 2.54
+ / 0.393701
+.EE
+.PP
+A quantity is specified as a multiplicative combination
+of units and floating point numbers.
+Operators have the following precedence:
+.IP
+.EX
+.ta \w'\fLXXXXXXXXXXXXXXX'u
+\fL+\fP \fL-\fP \f1add and subtract
+\fL*\fP \fL/\fP \fL×\fP \fL÷\fP \f1multiply and divide
+catenation multiply
+\fL²\fP \fL³\fP \fL^\fP \f1exponentiation
+\fL|\fP \f1divide
+\fL(\fP ... \fL)\fP \f1grouping
+.EE
+.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
+\fL\\$1\\fP \\$2 \\$3 \\$4 \\$5 \\$6
+..
+.ta \w'\fLwaterXXX'u
+.nf
+.fq pi,\f1π\fP 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 \fLg\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
+The complete list of units can be found in
+.BR /lib/units .
+A
+.I file
+argument to
+.I units
+specifies a file to be used instead of
+.BR /lib/units.
+The
+.B -v
+flag causes
+.I units
+to print its entire database.
+.SH EXAMPLE
+.EX
+you have: 15 pounds force/in²
+you want: atm
+ * 1.02069
+ / .97973
+.EE
+.SH FILES
+.B /lib/units
+.SH SOURCE
+.B /usr/local/plan9/src/cmd/units.y
+.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 last time someone
+updated
+.BR /lib/units .