Standalone Units

The "standalone" method of dealing with units treats units just like normal variables to be assigned-to and solved-for:

  1. Equations defining the relationships between units are given or read from the library.
  2. Known values are assigned to the units themselves (as if they were normal variables).
  3. Unknown units (variables) are solved-for.

The following example shows typical usage of standalone units.  The units are "miles" and "gallons", but they are really being used as simple variables:

> The number of miles per gallon is 21.

   Let 'M' stand for "MILES"

   Let 'G' stand for "GALLON"

   So...
               M    
- = 21
               G    

Anything else?

> If there are 14 gallons, how many miles are there?

   Solving for G:

              14 = G

               G = 14

       G = 14

   Solving for M:

              M
              - = 21
               G

               1
             M - = 21
               G

              M = 21 G

       M = 294

   (Find M)

   294 is HOW MANY MILES THERE ARE.

The standalone method can be used for simple problems, but it is usually too limited for most real-world problems involving units.  Normally, one wants to freely combine units with numbers (scalars) and other units to specify measurements and systems of measurement.