

units                        Command                        units




Convert measurements

uunniittss [ -uu ]

units is an interactive program that tells you how to convert one
unit of  measurement into another.  It prompts  you for two quan-
tities  with  the  same  dimensions  (e.g., two  measurements  of
weight,  or  two of  size).   It first  prints  the prompt  ``You
have:'' to  ask for the unit  you wish to convert  from, and then
prints the prompt ``You want:''  for the unit you wish to convert
to.

***** Example *****

The following example  returns the formula for convert fortnights
into days:


        You have: fortnight
        You want: days
        * 14
        / 0.071428


The  following  fundamental units  are  recognized: meter,  gram,
second, coulomb, radian,  bit, unitedstatesdollar, sheet, candle,
kelvin, and copperpiece (shillings and pence).

A  quantity consists  of  an optional  number (default  1) and  a
dimension  (default  none).   Numbers  are  floating  point  with
optional  sign, decimal  part  and exponent.   Dimensions may  be
specified by fundamental  or derived units, with optional orders.
A quantity is evaluated left to right: a factor preceded by a `/'
is a  divisor, otherwise  it is  a multiplier.  For  example, the
earth's gravitational  acceleration may be entered  as any of the
following:


        9.8e+0 m+1 sec-2
        32 ft/sec/sec
        32 ft/sec+2


British  equivalents  of  US units  are  prefixed  with br,  e.g.
brpint.  Some other units include c (speed of light), G (gravita-
tional  constant), R  (gas law constant),  phi (golden  ratio), %
(1/100), k (1,024), and buck (United States dollar).

/usr/lib/units is an  ASCII file that contains conversion tables.
The binary  file /usr/lib/binunits may be  recreated by using the
-u option.





COHERENT Lexicon                                           Page 1




units                        Command                        units



***** See Also *****

 bc, commands, conv

***** Files *****

/uussrr/lliibb/uunniittss -- Known units
/uussrr/lliibb/bbiinnuunniittss -- Binary encoding of units file

***** Diagnostics *****

If the  ASCII file /usr/lib/units has  been changed more recently
that the  binary file  /usr/lib/binunits, units prints  a message
and regenerates the  binary file before continuing; this takes up
to a few minutes, depending on the speed of your system.

The  error message ``conformability''  means that  the quantities
are not  dimensionally compatible.   For example, m/sec  and psi.
units  prints each  quantity  and its  dimensions in  fundamental
units.

***** Notes *****

There are the inevitable name collisions: g for gram vs.  gee for
Earth's gravitational  acceleration, exp for the  base of natural
logarithms vs.  e for the  charge of an electron, ms for (plural)
meters  vs.  millisecond,  and of course  batman for  the Persian
measure of weight rather than the Turkish.





























COHERENT Lexicon                                           Page 2


