;; Define database db for Unicalc ;; by Robert Keller ;; The Unicalc database is an association list of pairs. ;; Each pair consists of a unit and a quantity defining the unit. ;; Units are atoms. ;; Quantities are 3-lists: numeric multiplier, numerator, denominator ;; Both numerator and denominator are lists of units. ;; It is assumed that they do not have any units in common and are sorted ;; (i.e. they are already simplified, in the sense of the Unicalc application). (define unicalc-db '( (A (1 (ampere)())) (amp (1 (ampere)())) (amu (1 (atomic_mass_unit)())) (atomic_mass_unit (1 (dalton)())) (AU (1 (astronomical_unit)())) (bbl (1 (barrel)())) (C (1 (coulomb)())) (c (1 (speed_of_light)())) (cal (1 (calorie)())) (cd (1 (candela)())) (cm (1 (centimeter)())) (ev (1 (electron_volt)())) (feet (1 (foot)())) (fl_oz (1 (fluid_ounce)())) (ft (1 (foot)())) (F (1 (farad)())) (gev (1e9 (ev)())) (g (1 (gram)())) (G (1 (gravitational_constant)())) (h (1 (Planck_constant)())) (hp (1 (horsepower)())) (hr (1 (hour)())) (H (1 (henry)())) (Hz (1 (hertz)())) (hertz (1 ()(second))) (in (1 (inch)())) (inches (1 (inch)())) (J (1 (joule)())) (kilogram (1 (kg)())) (kilometer (1000 (meter)())) (kilowatt (1000 (watt)())) (km (1 (kilometer)())) (kph (1 (kilometer)(hour))) (kwh (1 (kilowatt hour)())) (l (1 (liter)())) (lb (1 (pound)())) (litre (1 (liter)())) (lm (1 (lumen)())) (lx (1 (lux)())) (m (1 (meter)())) (megohm (1000000 (ohm)())) (metre (1 (meter)())) (mev (1000000 (electron_volt)())) (mho (1 (siemens)())) (microhm (1e-6 (ohm)())) (millimeter (1/1000 (meter)())) (millisecond (1/1000 (second)())) (min (1 (minute)())) (mol (1 (mole)())) (mm (1 (millimeter)())) (mph (1 (mile)(hour))) (ms (1 (millisecond)())) (N (1 (newton)())) (qt (1 (quart)())) (pc (1 (parsec)())) (pi (3.14159265358979323846 ()())) (psi (1 (pound_force)(inch inch))) (pt (1 (pint)())) (rpm (1 (revolution)(second))) (S (1 (siemens)())) (s (1 (second)())) (sec (1 (second)())) (tbsp (1 (tablespoon)())) (tsp (1 (teaspoon)())) (T (1 (tesla)())) (us (1 (microsecond)())) (V (1 (volt)())) (W (1 (watt)())) (Wb (1 (weber)())) (yd (1 (yard)())) (yr (1 (year)())) (acre (43560 (foot foot)())) (apoth_dram (60 (grain)())) (apoth_ounce (480 (grain)())) (apoth_pound (5760 (grain)())) (are (100 (meter meter)())) (angstrom (0.0000000001 (meter)())) (astronomical_unit (149600000000 (meter)())) (atmosphere (101325 (pascal)())) (bar (100000 (pascal)())) (barn (1e-28 (meter meter)())) (barrel (31.5 (gallon)())) (baryl (1 (dyne) (centimeter centimeter))) (baud (1 (bit)(second))) (bolt (40 (yard)())) (british_gallon (1.20095 (gallon)())) (btu (1055.06 (joule)())) (bucket (18180 (centimeter centimeter centimeter)())) (bushel (4 (peck)())) (byte (8 (bit)())) (cable (720 (foot)())) (carat (200 (milligram)())) (caliber (0.001 (inch)())) (calorie (4.1868 (joule)())) (candle (1 (candela)())) (centare (0.01 (are)())) (centimeter (0.01 (meter)())) (century (10 (decade)())) (chain (66 (foot)())) (chronon (1e-24 (second)())) (coulomb (1 (ampere second)())) (cup (1/2 (pint)())) (curie (3.7037e10 (becquerel)())) (dalton (1.6605654e-24 (gram)())) (daraf (1 ()(farad))) (day (24 (hour)())) (decade (10 (year)())) (degree (1 (radian)(pi))) (dozen (12 ()())) (dram (0.00390625 (pound)())) (dry_barrel (105 (dry_quart)())) (dry_pint (0.5 (dry_quart) ())) (dry_quart (67.2 (inch inch inch)())) (dyne (0.00001 (newton)())) (electron_volt (1.60218925e-20 (joule)())) (ell (45 (inch)())) (em (0.167 (inch)())) (en (0.5 (em)())) (erg (0.000001 (joule)())) (faraday (96490 (coulomb)())) (farad (1 (coulomb) (volt))) (fathom (6 (foot)())) (fermi (1e-15 (meter) ())) (fluid_dram (0.125 (fluid_ounce) ())) (fluid_ounce (0.125 (cup)())) (flux_unit (1e-26 (watt) (meter meter Hz))) (foot (12 (inch)())) (fortnight (2 (week) ())) (free_acceleration (9.80665 (meter) (second second))) (furlong (40 (rod)())) (gallon (231 (inch inch inch)())) (gauss (0.0001 (tesla)())) (gilbert (1 (ampere turn)())) (gill (0.25 (pint)())) (grain (0.000142857 (pound)())) (gram (0.001 (kg)())) (grav (1 (free_acceleration)())) (gravitational_constant (6.67259e-11 (newton meter meter) (kg kg))) (gross (12 (dozen)())) (hectare (100 (are)())) (henry (1 () (ampere))) (hand (4 (inch)())) (hogshead (63 (gallon)())) (horsepower (550 (foot pound_force) (second))) (hour (60 (minute)())) (inch (0.02539954113 (meter)())) (joule (1 (kg meter meter) (second second))) (kilogram_force (1 (kg free_acceleration)())) (knot (1 (nautical_mile) (hour))) (lambert (3.142 (candela) (centimeter centimeter))) (league (3 (mile)())) (light_year (9406910000000000 (meter)())) (link (7.92 (inch) ())) (liter (1000 (centimeter centimeter centimeter)())) (long_ton (2240 (pound) ())) (lumen (1 (candela steradian) ())) (lux (1 (lumen) (meter meter))) (maxwell (0.00000001 (weber)())) (metric_ton (1000 (kg)())) (micron (0.000001 (meter)())) (mil (0.001 (inch)())) (mile (8 (furlong)())) (millenium (10 (century)())) (minute (60 (second)())) (mole (6.02253e23 ()())) (nautical_mile (1.15078 (mile)())) (newton (1 (joule) (meter))) (ohm (1 (volt)(ampere))) (oil_barrel (42 (gallon)())) (ounce (0.0625 (pound)())) (parsec (30856770000000000 (meter)())) (pascal (1 (newton) (meter meter))) (Planck_constant (6.626076e-34 (joule second)())) (peck (8 (dry_quart)())) (pennyweight (24 (grain)())) (pica (12 (point)())) (pint (0.5 (quart)())) (point (0.013837 (inch)())) (poise (0.1 (pascal) (second))) (pound (0.45359237 (kg) ())) (pound_force (1 (pound free_acceleration) ())) (poundal (1 (foot pound)(second second))) (quadrant (90 (degree)())) (quart (0.25 (gallon)())) (revolution (4 (quadrant)())) (reyn (68947.6 (poise)())) (rod (16.5 (foot)())) (rood (0.25 (acre)())) (rope (20 (foot)())) (scruple (20 (grain)())) (section (1 (mile mile)())) (siemens (1 (ampere) (volt))) (skein (360 (foot)())) (slug (32.1740 (pound)())) (span (9 (inch)())) (speed_of_light (299792445.8 (meter) (second))) (stadion (622 (foot)())) (stadium (202 (yard)())) (stokes (0.0001 (meter meter) (second))) (survey_mile (320 (rod)())) (tablespoon (0.5 (fluid_ounce)())) (teaspoon (1/3 (tablespoon)())) (tesla (1 (weber) (meter meter))) (therm (1e5 (btu)())) (ton (2000 (pound)())) (torr (0.001315789473684210526 (atmosphere)())) (township (36 (section)())) (troy_ounce (20 (pennyweight)())) (troy_pound (12 (troy_ounce)())) (volt (1 (joule) (coulomb))) (watt (1 (joule) (second))) (weber (1 (volt) (second))) (week (7 (day) ())) (yard (3 (foot)())) (year (365 (day)())) ))