GNU `units' converts between different systems of units. It can handle multiplicative scale changes as well as nonlinear conversions, such as Fahrenheit to Celsius. Over 2000 units definitions are included in a well-annotated data file.
| Tags | Scientific/Engineering Utilities |
|---|---|
| Licenses | GPL |
| Operating Systems | Windows Windows POSIX |
| Implementation | C |
Recent releases


Release Notes: The units database has been updated to include the latest NIST values, abrasive grits, and other fixes.


Release Notes: Units now reads custom definitions from ~/.units.dat. The precedence of "*" has changed to match the usual algebraic precedence, and the "**" operator was added for exponents. A text search feature was added so that typing "search text" lists the units whose names contain "text".


Release Notes: A bus error on Intel Mac was fixed. Minor changes that allow the program to be compiled as a library and linked to other programs were made. Two new command line arguments for control of the output format were added.


Release Notes: The '-' character has been changed into a subtraction operator. (The old behavior is still available with an option.) The handling of radian and steradian has been changed so that these units are conformable to 1. It is now possible to include files from units.dat, and multiple units files can be specified on the command line. The units database has been updated. (The frequently reported erroneous definition of the astronomical unit has been fixed.)


Release Notes: With this version, support for locales was added and some bugs were fixed.
Recent comments
14 Jun 2005 04:30
Re: non-linear?
A linear function is of the form f(x) = ax + b, while a linear transformation satisfies T(a + b) = T(a) + T(b). So the "function" is linear, but the "transformation" is not. Of course, the function and the transformation is the same, so it depends on the context which one applies. A transformation is obviously what the units developers had in mind, and that is probably natural given that units are transformed to other units.
20 Jun 2002 07:52
Re: non-linear?
> Fahrenheit <-> Celsius is a
> perfectly linear conversion:
>
> T[C] = (T[F]-32)/1.8
No, it is an affine transformation, not a linear one because of the constant offset. If F is a linear transformation then it must satisfy the property F(a+b)=F(a)+F(b). This is clearly false for the above temperature conversion. For example 32 degrees Fahrenheit is 0 degrees Celsius but 32+32=64 degrees Fahrenheit is not 0+0=0 degrees Celsius.
20 Jun 2002 04:21
non-linear?
Maybe this is nit-picking, but Fahrenheit <-> Celsius is a perfectly linear conversion:
T[C] = (T[F]-32)/1.8
non-linear would be Energy to Wavelength, for example.