ttyoff: nolabels: true $
newton: newtons: kilogram*meter/second**2 $
joule: joules: newton*meter $
watt: watts: joule/second $
acre: acres: 4047.*meter**2 $
ampere: amperes: amp: amps: coulomb/second $
ohm: ohms: volt/ampere $
angstrom: angstroms: 1.0e-10*meter $
are: ares: 100.*meter**2 $
astronomicalunit: astronomicalunits: 1.495e11*meter $
atmosphere: atmospheres: 101326.*newton/meter**2 $
bar: bars: 1.0e5*newton/meter**2 $
barreldry: barrelsdry: .099372*meter**3 $
barrel: barrels: barrelsliquid: barrelliquid: .11923*meter**3 $
barreloil: barrelsoil: .15897*meter**3 $
baryl: baryls: 1.0e-6*bar $
bolt: bolts: 36.576*meter $
btu: btus:britishthermalunit: britishthermalunits: 1054.8*joule$
bushel: bushels: 0.03524*meter**3 $
candle: candles: lambert*3.142e-4*meter**2 $
centigram: centigrams: 1.0e-5*kilogram $
centiliter: centileters: .01*liter $
centimeter: centimeters: cm: .01*meter $
centimeterofmercury: centimetersofmercury: .01316*atmosphere $
chain: chains: 20.12*meter $
circularmil: circularmils: 5.067e-10*meter**2 $
cord: cords: 7.249*meter**3 $
coulomb: coulombs $
cup: cups: 2.355e-4*meter**3 $
cycle: cycles: 6.2831853*radian $
dalton: daltons: 1.65e-27*kilogram $
day: days: 86400.*second $
decigram: decigrams: 1.e-4*kilogram $
deciliter: deciliters: .0001*meter**3 $
decimeter: decimeters: .1*meter $
degree: degrees: deg: .0174532924*radian $

/* Reasoning for not converting between degree fahrenheit, degree celsius
 * and kelvin: 
 *
 * Typically temperatures are absolute values that don't get
 * summed up. So let everybody use the unit he is happy with.
 * Of course there are also temperature differences, but these need 
 * a different conversion formula than absolute temperatures, thus making
 * a mess which could only be resolved by introducing additional units.
 *
 * At least this is what I guess that the original author intended.
 */
degreef: degf: degreefahrenheit $
degreec: degc: degreecentigrade: degreecelsius $
degreer: degr: degreerankine: degreekelvin/1.8 $
dekagram: dekagrams: .01*kilogram $
dekaliter: dekaliters: 10.*liter $
dekameter: dekameters: 10.*meter $
dyne: dynes: 1.e-5*newton $
ell: ells: 1.143*meter $
empica: emspica: .004233*meter $
erg: ergs: 1.e-7*joule $
farads: farad $
faraday: faradays: 9.649*coulomb $
fathom: fathoms: 1.828804*meter $
feet: foot: ft: .3048*meter $
feetofwater: footofwater: .0295*atmosphere $
fluidounce: fluidounces: cup/8. $
footcandle: footcandles: .016103*watt/meter**2 $
furlong: furlongs: 660.*feet $
gallon: gallons: 3.785e-3*meter**3 $
gallonimperial: gallonsimperial: 1.20095*gallon $
gill: gills: .0001183*meter**3 $
grade: grades: .01571*radian $
gram: grams: gm: .001*kilogram $
gramcalorie: gramcalories: 4.1868*joule $
hand: hands: .1016*meter $
hectograms: hectogram: 100.*gram $
hectoliter: hectoliters: .1*meter**3 $
hectometer: hectometers: 100.*meter $
hectowatt: hectowatts: 100.*watt $
henries: henry $
hogshead: hogsheads: 63.*gallon $
horsepower: hp: 745.7*watt $
hour: hours: 3600*second $
inch: inches: in: .0254*meter $
inchofmercury: inchesofmercury: .03342*atmosphere $
joules: joule: newton*meter $
kilograms: kg: kilogram $
kilometer: kilometers: km: 1000.*meter $
kilowatts: kilowatt: 1000.*watt $
knot: knots: 1.8532*kilometer/hour $
league: leagues: 4827.*meter $
lightyear: lightyear: 9.46091e15*meter $
link: links: foot $
linksurveyor: 7.92*inch $
liter: .001*meter**3 $
lumen: .001496*watt $
lux: .0929*footcandle $
megohm: megohms: 1.e6*ohm $
meters: m: meter $
microfarad: microfarads: 1.e-6*farad $
microgram: micrograms: 1.e-6*gram $
microhm:microhms: 1.e-6*ohm $
microliter: microliters: 1.e-6*liter $
micron: microns: 1.e-6*meter $
microsecond: microseconds: 1.e-6*seconds $
milenautical: milesnautical: 1853.*meter $
mile: miles: 1609.*meter $
millier: milliers: 1000.*kilogram $
millimicron: millimicrons: 1.e-9*meter $
milligram: milligrams: .001*gram $
millihenry: millihenries: .001*henry $
milliliter: milliliters: ml: .001*liter $
millimeter: millimeters: .001*meter $
millisecond: milliseconds: ms: 1.e-6*second $
mil: mils: 2.54e-5*meter $
minute: minutes: min: 60.*second $
minersinch: minersinches: 1.5*foot**3/minute $
minims: .061612*centimeter**3 $
myriagram: myriagrams: 10.*kilograms $
myriameter: myriameters: 10.*kilometer $
myriawatt: myriawatts: 10.*kilowatt $
neper: nepers: 8.686*decibels $
newtons: newton: kilogram*meter/second**2 $
ohms: ohm: volts/ampere $
parsec: parsecs: 3.084e16*meter $
peck: pecks: 8.809582*liter $
pint: pints: gallon/8. $
poundal: poundals: .13826*newton $
poise: gram/centimeter/second $
pound: pounds: lb: lbf: 4.44823*newton $
poundmass: poundsmass: lbm: .4536*kilogram $
ounce: ounces: ounceavoirdupois: poundmass/16. $
ouncetroy: ouncestroy: 1.09714*ounce $
quartdry: quartsdry: 67.2*inch**3 $
quart: quarts: qt: 9.464e-4*meter**3 $
radians: rad: radian $
revolution: revolutions: cycle $
rod: rods: 5.029*meter $
slug: slugs: 14.59*kilogram $
seconds: sec: second $
sphere: spheres: 12.57*steradian $
stoke: stokes: 1.0e-4*meter**2/second $
statcoulomb: coulomb/2.998e10 $
steradians: steradian $
tablespoon: tablespoons: .5*fluidounce $
teaspoon: tablespoon/3. $
volts: volt $
watts: watt: joule/second $
week: weeks: 7.*day $
yard: yards: yd: .9144*meter $

assume(coulomb >= 0) $
assume(kilogram >= 0) $
assume(meter >= 0) $
assume(second >= 0) $
assume(volt >= 0) $
assume(radian >= 0) $
assume(steradian >= 0) $
assume(lambert >= 0) $
assume(degreefahrenheit >= 0) $
assume(degreecelsius >= 0) $
assume(degreekelvin >= 0) $
assume(farad >= 0) $
assume(henry >= 0) $
assume(decibels >= 0) $

matchdeclare(freeofdegreefahrenheit,freeof(degreefahrenheit),
      freeofdegreecelsius, freeof(degreecelsius)) $
tellsimpafter(freeofdegreefahrenheit*degreefahrenheit, 
      (freeofdegreefahrenheit+460)*degreekelvin/1.8) $
tellsimpafter(freeofdegreecelsius*degreecelsius, (freeofdegreecelsius+273.)*degreekelvin) $
ttyoff: nolabels: false $
