units

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

Tweet this project Short link

Rss Recent releases

Changes: 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".

  • Rrelease-mid
  •  16 Nov 2006 04:25
  • Rrelease-after

Changes: 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.

Changes: 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.)

Changes: With this version, support for locales was added and some bugs were fixed.

  • Rrelease-mid
  •  30 Jan 2001 06:14
  • Rrelease-after

    Changes: Added over 600 new units and corrected errors in the units data file and minor bug fix affecting unit name completion.

    Rss Recent comments

    Rcomment-before 14 Jun 2005 04:30 Rcomment-trans emh Rcomment-after

    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.

    Rcomment-before 20 Jun 2002 07:52 Rcomment-trans adrianmariano Rcomment-after

    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.

    Rcomment-before 20 Jun 2002 04:21 Rcomment-trans murdegern Rcomment-after

    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.

    B10714eae22a291f2cfad379a01f6e6c_thumb

    Project Spotlight

    Scribus

    A page layout (DTP) application.

    Ffccc45930a36cb3b7961f5f9766a2ca_thumb

    Project Spotlight

    Seed7

    An extendable programming language.