Professional Documents
Culture Documents
Frink Units
Frink Units
/////////////////////////////////////////////////////////////////////////////
// //
// Primitive units. Any unit defined to contain a '!' character is a //
// primitive unit which will not be reduced any further. All units should //
// reduce to primitive units. //
// //
/////////////////////////////////////////////////////////////////////////////
// Prefixes
// Prefixes are defined with the symbol :- to indicate a prefix which cannot
// stand by itself (must precede a unit name without intervening spaces)
// or with the symbol ::- for a prefix which can be either attached to a unit
// or defines a standalone unit. For example, you may want to allow "giga"
// to work as a prefix or as a stand-alone synonym for a billion, (generally
// you do this just so someone can look up what it means if they forget,)
// in which case you would use the ::- operator. If you have a prefix like
// "m" for milli, which you don't want to allow to stand alone, use the :-
// operator.
//
// A number specified like "1ee20" with integers for the mantissa and the
// exponent are treated as an exact integer, that is, 1ee20 represents
// the exact integer 1 followed by 20 zeroes. ("ee" can be thought to
// stand for "exact exponent".) This is in contrast to the more standard
// "1e20" which is treated as an inexact floating-point number.
Y :- yotta
Z :- zetta
E :- exa
P :- peta
T :- tera
G :- giga
M :- mega
k :- kilo
h :- hecto
da :- deka
d :- deci
c :- centi
m :- milli
// Alan's notes:
// The "micro" prefix requires non-ASCII characters. It is defined as its
// Unicode charactor \u00b5 below.
//
// Should we adopt the questionable Electrical Engineer policy of using
// "u" to indicate micro? I've added "uF" for microfarad later on to
// tackle the most common case. I just can't bring myself to kludge in
// the double-awful "MFD" that capacitor manufacturers use to mean
// "microfarad", which is wrong in at least 3 ways.
\u00b5 :- micro // Unicode "MICRO SIGN"
n :- nano
p :- pico
f :- femto
a :- atto
z :- zepto
y :- yocto
//
// SI (International System of Units) base dimensions
//
// The special operator =!= defines a new base dimension. This is a dimension
// that is orthogonal to all other base dimensions. For example, the SI
// defines base dimensions for length (m), mass (kg), time (s), etc., and other
// unit types are defined in terms of these base dimensions. The left-hand-
// side is the human-readable name of the base dimension (e.g. "length" or
// "mass") and the right-hand-side is the fundamental unit of that dimension
// (e.g. "m" for length or "kg" for mass)
kilogram := kg
gram := 1/1000 kg
luminous_intensity =!= cd
candela := cd // Official definition:
// "The candela is the luminous intensity, in a given
// direction, of a source that emits monochromatic radiation
// of frequency 540 x 10^12 hertz and that has a radiant
// intensity in that direction of 1/683 watt per steradian."
//
// (This differs from radiant
// intensity (W/sr) in that it is adjusted for human
// perceptual dependence on wavelength. The frequency of
// 540e12 Hz (yellow) is where human perception is most
// efficient.)
//
// Alan's editorializing:
// I think the candela is a scam, and I am completely
// opposed to it. Some good-for-nothing lighting "engineers"
// or psychologists probably got this perceptually-rigged
// abomination into the whole otherwise scientific endeavor.
//
// What an unbelievably useless and stupid unit. Is light
// at 540.00000001 x 10^12 Hz (or any other frequency) zero
// candela? Is this expected to be an impulse function at
// this frequency? Oh, wait, the Heisenberg Uncertainty
// Principle makes this impossible. No mention for
// correction (ideally along the blackbody curve) for other
// wavelengths? Damn you, 16th CGPM! Damn you all to hell!
//
// Other bodies have attempted to define curves, often based
// on studies of human perception, to try and define the
// obvious deficiencies of this inadequate definition of the
// candela at anything more than this infinitesimal point.
// However, these are completely outside of any official SI
// definition, so no authoritative definition is possible.
// Bodies like the International Commission for Illumination
// (CIE) made an attempt with their various colorspaces,
// including "CIE 1931" and later versions that are more
// accurate but actually used less often.
//
// The most-commonly used, CIE 1931, is long known to be off
// by a factor of 7 from average human perception at short
// wavelengths, (compare it to the 1978 definition at
// 400 nm) and is arbitrarily truncated before the
// limits of human perception. In addition, no one
// perceptually-weighted curve is possible because the human
// eye is differently sensitive for photopic (bright-light,
// cone cells) and scotopic (dark-adapted, rod cells), or
// if the illumination occurs over narrower or wider fields.
// Many incremental improvements on these systems have been
// proposed, but none are part of the authoritative,
// oversimplified definition of the candela, making it
// useless for unambiguous definitions that can be agreed
// upon or binding to any party. Pronouncements of the CIE
// are in no way binding on the BIPM, nor vice-versa, and the
// CIE has a proliferation of "standard curves," which all
// disagree with each other. Agreements to use one
// curve or another thus have to be agreed *outside* the
// definitions of the SI, and, of course, parties can
// disagree on which curve to use. You can use CIE 1931,
// or CIE 1978, or the "CIE 1988 Modified 2 Spectral
// Luminous Efficiency Function for Photopic Vision" or the
// 2005 improvements by Sharpe, Stockman, Jagla & Jgle,
// or ISO 23539:2005(E), or something else...
//
// If you can point me to *anywhere* that the BIPM clearly
// mandates and defines a *single* luminosity function to
// unambiguously define the candela, please
// send it to me (eliasen@mindspring.com). Hint: they don't.
// You'll find that they all weasel out of an authoritative
// definition by saying "approved the use of" (usually
// multiple functions) or citing a couple of acceptable,
// non-agreeing options and saying one may be "preferred".
// If they define more than one allowed function, then
// there's obviously no single definition of "candela".
// If they're not absolutely clear whether you use the
// photopic or scotopic function, then they've defined two
// different candelas, which better be named different
// things. You can't have two different definitions of a
// meter, or a candela. And even the CIE notes that
// "for mesopic vision, there is at present no agreed method
// of weighting, but this problem is currently being
// investigated by the CIE."
// http://www.bipm.org/utils/en/pdf/Monographie1983-1.pdf
//
// What really annoys me is that the official definitions
// don't come right out and say, "okay, we're sorry, this
// is obviously a useless definition for any other
// wavelength, and it doesn't even make sense for *that*
// wavelength. We know. It sucks. The guys at the 16th
// CGPM went out and got drunk the night before instead of
// working on the definition, and they all sheepishly passed
// this in in the morning, and went back to bed. They got
// fired later, make no doubt. It's on our list of bugs.
// We're sending in the Wolf to fix it directly.
// Here is the workaround, but we consider it broken
// and we're ashamed to have ever put it forth in this
// useless form and left it this way for 30 years.
// For now, here is one single draft standard equation to use
// for other wavelengths. Download it here. We promise
// that the link works and contains a computer-readable
// table (though we're too sloppy to actually create a good
// smooth polynomial fit that would be a lot cleaner and
// easier for everyone) and is not some PDF of a terrible
// unreadable old re-scan, stashed away somewhere, making
// you wonder if it's valid today, nor is it a ridiculous CIE
// document that you have to *pay* a hundred bucks for, when
// we could and absolutely need to distribute it for free.
//
// "We've had the internet for weeks now. It represents
// our best effort and just has to go through a bunch of
// political committees but we promise that we'll try to
// keep it constant if possible." They never even *hint*
// with the definition that it's clearly insufficient, and
// obviously physically unrealizable in any way you look at
// it, which is what makes it so annoying. There's not even
// a "buy freaking CIE spec xxxyyy to get the rest of the
// details." Just nothing. Figure it out yourself.
//
// Update: On April 2, 2007, the BIPM and the CIE finally
// signed a vague agreement that they want to work more
// closely and hints at a future hope that there will
// someday be a single, authoritative definition accepted
// and mandated across both bodies. The agreement says that
// the expertise for defining a standard curve will fall
// under the auspices of the CIE, as "the CIE may decide to
// standardize." (No certainty nor timeline; just "maybe
// it'll happen someday.") Hopefully this will be followed
// by an official pronouncement of the BIPM that a certain
// curve is mandated for use in defining the candela. And
// hopefully it will be better than the old 1931 curve.
// And hopefully the BIPM will, you know, maybe PUBLISH it
// somewhere instead of pointing at the root of another web
// site and saying "it's one of the documents hidden
// somewhere over there but we're not going to tell you
// which and we want to see your face when you realize you
// have to buy random documents at a hundred dollars a pop."
//
// Don't hold your breath, though. It's been 30 years since
// the modern definition of the candela just to get to this
// point. See:
// http://www.bipm.org/utils/common/pdf/bipm-cie_agreement.pdf
// http://www.bipm.org/utils/en/pdf/SIApp2_cd_en.pdf
//
// The latter hints that perhaps one of the equations in
// CIE S 010/E:2004 (possibly superseded) / ISO 23539:2005(E)
// is maybe suggested by them, (but there are conflicting
// definitions therein, and none are mandated) and they're
// not going to help you find it, and when you do, you're
// going to realize that the CIE clowns are going to charge
// you over a hundred bucks for it. For something that needs
// to be free and accessible for anyone trying to understand
// this standard.
//
// We won't tell you if it's been superseded. We
// won't point you to an authoritative definition. We'll
// cite several equations and leave you to pick one randomly.
// We want this unit to remain an unusable mystery!
//
// In short, candela = EPIC FAIL.
// Define the default symbol for the imaginary unit, that is, the square
// root of negative one.
//
// The default Unicode codepoint for the imaginary unit.
// (DOUBLE-STRUCK ITALIC SMALL I)
\u2148 := <<IMAGINARY_UNIT>>
// Also used for the imaginary unit (especially by electrical engineers, who
// use "i" to indicate current.
// (DOUBLE-STRUCK ITALIC SMALL J)
\u2149 := <<IMAGINARY_UNIT>>
1 ||| dimensionless
unit_ :- 1
//
// Names of some numbers
//
semi :- 1/2
demi :- 1/2
hemi :- 1/2
half ::- 1/2
third ::- 1/3
quarter ::- 1/4
eighth ::- 1/8
uni :- 1
bi :- 2
tri :- 3
zero := 0
one := 1
two := 2
double := 2
three := 3
triple := 3
treble := 3
four := 4
quadruple := 4
five := 5
quintuple := 5
six := 6
sextuple := 6
seven := 7
septuple := 7
eight := 8
nine := 9
ten := 10
twenty := 20
thirty := 30
forty := 40
fifty := 50
sixty := 60
seventy := 70
eighty := 80
ninety := 90
hundred := 100
thousand := 1000
million := 1ee6
billion := 1ee9
trillion := 1ee12
quadrillion := 1ee15
quintillion := 1ee18
sextillion := 1ee21
septillion := 1ee24
octillion := 1ee27
nonillion := 1ee30
noventillion := nonillion
decillion := 1ee33
undecillion := 1ee36
duodecillion := 1ee39
tredecillion := 1ee42
quattuordecillion := 1ee45
quindecillion := 1ee48
sexdecillion := 1ee51
septendecillion := 1ee54
octodecillion := 1ee57
novemdecillion := 1ee60
vigintillion := 1ee63
centillion := 1ee303
googol := 1ee100
// These number terms were described by N. Chuquet and De la Roche in the 16th
// century as being successive powers of a million. These definitions are
// still used in most European countries. The current US definitions for these
// numbers arose in the 17th century and don't make nearly as much sense.
// These numbers are listed in the CRC Concise Encyclopedia of Mathematics by
// Eric W. Weisstein.
brbillion := million^2
brtrillion := million^3
brquadrillion := million^4
brquintillion := million^5
brsextillion := million^6
brseptillion := million^7
broctillion := million^8
brnonillion := million^9
brnoventillion := brnonillion
brdecillion := million^10
brundecillion := million^11
brduodecillion := million^12
brtredecillion := million^13
brquattuordecillion := million^14
brquindecillion := million^15
brsexdecillion := million^16
brseptdecillion := million^17
broctodecillion := million^18
brnovemdecillion := million^19
brvigintillion := million^20
// These numbers fill the gaps left by the European system above.
// For consistency
brmilliard := milliard
brbilliard := billiard
brtrilliard := trilliard
brquadrilliard := quadrilliard
brquintilliard := quintilliard
brsextilliard := sextilliard
brseptilliard := septilliard
broctilliard := octilliard
brnonilliard := nonilliard
brnoventilliard := noventilliard
brdecilliard := decilliard
//////////////////////////////////////////////////////////////////////////////
// //
// Derived units which can be reduced to the primitive units //
// //
//////////////////////////////////////////////////////////////////////////////
//
// Named SI derived units (officially accepted)
//
coulomb := A s // charge
coulomb ||| charge
coulomb m^-2 ||| surface_charge_density
coulomb m^-3 ||| electric_charge_density
C := coulomb
F := farad
uF := microfarad // Concession to electrical engineers
// without adding the questionable "u"
// as a general prefix.
//
// time
//
sec := s
minute := 60 s
min := minute
hour := 60 min
hr := hour
day := 24 hr
d := day
da := day
week := 7 day
wk := week
sennight := 7 day
fortnight := 14 day
blink := 1ee-5 day // Actual human blink takes 1/3 second
ce := 1ee-2 day
//
// units derived easily from SI units
//
gm := gram
g := gram
tonne := 1000 kg
t := tonne
metricton := tonne
sthene := tonne m / s^2
funal := sthene
pieze := sthene / m^2
quintal := 100 kg
bar := 1ee5 Pa // About 1 atm
vac := millibar
micron := micrometer// One millionth of a meter
bicron := picometer // One brbillionth of a meter
cc := cm^3
are := 100 m^2
liter := 1000 cc // The liter was defined in 1901 as the
oldliter := 1.000028 dm^3// space occupied by 1 kg of pure water at
l := liter // the temperature of its maximum density
// under a pressure of 1 atm. This was
// supposed to be 1000 cubic cm, but it
// was discovered that the original
// measurement was off. In 1964, the
// liter was redefined to be exactly 1000
// cubic centimeters.
L := liter // This unit and its symbol l were adopted by
// the CIPM in 1879. The alternative symbol for
// the liter, L, was adopted by the CGPM in 1979
// in order to avoid the risk of confusion
// between the letter l and the number 1. Thus,
// although both l and L are internationally
// accepted symbols for the liter, to avoid this
// risk the preferred symbol for use in the
// United States is L.
mho := siemens // Inverse of ohm, hence ohm spelled backward
galvat := ampere // Named after Luigi Galvani
// Basic constants
pi := 3.141592653589793238
\u03c0 := pi // Unicode character for pi
// as a mathematical constant
// GREEK SMALL LETTER PI
EulerMascheroniConstant :=
0.577215664901532860606512090082402431042159335939923598805767234884867726777664670
936947063291746749
// See http://en.wikipedia.org/wiki/Euler-Mascheroni_constant
light := c
lightspeed := c // sure, why not.
k_e := coulombconst
electroncharge := -elementarycharge
protoncharge := +elementarycharge
neutroncharge := 0 elementarycharge
upquarkcharge := +2/3 elementarycharge
downquarkcharge := -1/3 elementarycharge
plancksconstant := h
\u210e := h // Official Unicode char for Planck's const.
hbar := h / (2 pi)
\u210f := hbar // Official Unicode char for Planck/2 pi
classicalElectronRadius := 2.8179403227e-15 m // 2014 CODATA value
// http://physics.nist.gov/cgi-bin/cuu/Value?re
// uncertainty is +/- 19 in the last 2 digits
r_e := classicalElectronRadius
gravitationalconstant := G
// Alan's editorializing:
// Hooray! In August 2012, the IAU finally
// voted on a single exact number for this.
// http://www.iau.org/static/resolutions/IAU2012_English.pdf
// http://www.nature.com/news/the-astronomical-unit-gets-fixed-1.11416
// Previously,
// the Frankensteinian definition was:
astronomicalunit := au
//
// angular measure
//
circle := 2 pi radian
cycle := circle
turn := circle
revolution := circle
rev := circle
//
// Solid angle measure
//
sphere := 4 pi sr
squaredegree := 1/180^2 pi^2 sr
squareminute := 1/60^2 squaredegree
squaresecond := 1/60^2 squareminute
squarearcmin := squareminute
squarearcsec := squaresecond
sphericalrightangle := 1/2 pi sr
octant := 1/2 pi sr
//
// Concentration measures
//
percent := 1/100
proof := 1/200 // Alcohol content measured by volume at
// 60 degrees Fahrenheit. This is a USA
// measure. In Europe proof=percent.
ppm := 1ee-6
partspermillion := ppm
ppb := 1ee-9
partsperbillion := ppb // USA billion
ppt := 1ee-12
partspertrillion := ppt // USA trillion
karat := 1/24 // measure of gold purity
fine := 1/1000 // Measure of gold purity
caratgold := karat
gammil := mg/l
basispoint := 1/100 percent// Used in finance
//
// Temperature difference
// The units below are NOT an absolute temperature measurement in Fahrenheit,
// but represents the size of a degree in the specified systems.
degcelsius := K
degreeCelsius := K // Per
http://physics.nist.gov/Pubs/SP811/sec04.html#4.2.1.1
degreesRankine := 5/9 K
degreesrankine := degreesRankine // The Rankine scale has the
degrankine := degreesRankine // Fahrenheit degree, but its zero
degreerankine := degrankine // is at absolute zero.
degR := degrankine
Rankine := degreesrankine
degreaumur := 10/8 degC // The Reaumur scale was used in Europe and
// particularly in France. It is defined
// to be 0 at the freezing point of water
// and 80 at the boiling point. Reaumur
// apparently selected 80 because it is
// divisible by many numbers.
Fahrenheit[x] :=
{
if (x conforms K) // If x is already a temperature, convert to F
return ((x - zerocelsius) / K) * 9/5 + 32
else
if (x conforms 1) // If x is a pure number, treat as Fahrenheit degrees
return ((x-32) * 5/9) K + zerocelsius
else
return "Error"
}
C[x] := Celsius[x]
// Physical constants
//
// Physico-chemical constants
R := gasconstant
boltzmann := 1.38064852e-23 J/K // Boltzmann's constant. Could also
// be derived as R / avogadro.
// 2014 CODATA value. Uncertainty in
// last 2 digits is +/- 79
boltzmannsconstant := boltzmann // Boltzmann's constant
k := boltzmann
molarvolume := R stdtemp / atm // Volume occupied by one mole of an
// ideal gas at STP. Units m^3/mol
R_K := h/elementarycharge^2
// Measurement of the ohm also presents difficulties.
// The old approach involved maintaining resistances
// that were subject to drift. The new standard is
// based on the Hall effect. When a current carrying
// ribbon is placed in a magnetic field, a potential
// difference develops across the ribbon. The ratio
// of the potential difference to the current is
// called the Hall resistance. Klaus von Klitzing
// discovered in 1980 that the Hall resistance varies
// in discrete jumps when the magnetic field is very
// large and the temperature very low. This enables
// accurate realization of the resistance h/e^2 in the
// lab. This is approximately equal to 25812.807 ohms
// Atomic constants
// Rydberg constant
Rydberg_constant := 10973731.568508 m^-1 // 2014 CODATA value
// http://physics.nist.gov/cgi-bin/cuu/Value?ryd
// The standard uncertainty is +/- 65 in the last 2 decimal places.
// Planck constants
plancklength := plancktime c
l_P := plancklength
electronwavelength := h / (m_e c)
lambda_C := electronwavelength
Comptonwavelength := electronwavelength
protonwavelength := h / (m_p c)
lambda_C_p := protonwavelength
neutronwavelength := h / (m_n c)
lambda_C_n := neutronwavelength
// Magnetic moments
//
// United States units
//
// linear measure
// The US Metric Law of 1866 gave the exact relation 1 meter = 39.37 inches.
// From 1893 until 1959, the foot was exactly 1200/3937 meters. In 1959
// the definition was changed to bring the US into agreement with other
// countries. Since then, the foot has been exactly 0.3048 meters. At the
// same time it was decided that any data expressed in feet derived from
// geodetic surveys within the US would continue to use the old definition.
inch := 254/100 cm
foot := 12 inch
feet := foot
ft := foot
survey ::- 1200/3937 m/ft // Ratio to give survey length
geodetic ::- survey
statute ::- survey
int :- 3937/1200 ft/m // Convert US Survey measures to
// international measures
//
// Units derived from physical constants
//
kgf := kg gravity
technicalatmosphere := kgf / cm^2
at := technicalatmosphere
hyl := kgf s^2 / m // Also gram-force s^2/m according to [15]
torr := 101325/760 Pa // Exactly defined. Differs from mmHg by
// about 1 part in 7 million.
Torr := torr // Accepted symbol is Torr
// These units, both named after Evangelista
tor := Pa // Torricelli, should not be confused.
// Acording to [15] the torr is actually
// atm/760 which is slightly different.
//
// CGS system based on centimeter, gram and second
//
ray := acousticalohm
rayl := dyn s / cm^3 // Specific acoustical resistance
eotvos := 1ee-9 Gal/cm // Change in gravitational acceleration
// over horizontal distance
statampere := 10 A cm / (s c)
statamp := statampere
statvolt := dyne cm / (statamp sec)
statcoulomb := statamp s
esu := statcoulomb
statcoul := statcoulomb
statfarad := statamp sec / statvolt
cmcapacitance := statfarad
stathenry := statvolt sec / statamp
statohm := statvolt / statamp
statmho := statohm^-1
statmaxwell := statvolt sec
franklin := statcoulomb
debye := 1ee-18 statcoul cm// unit of electrical dipole moment
debye ||| electrical_dipole_moment
helmholtz := debye/angstrom^2 // Dipole moment per area
jar := 1000 statfarad // approx capacitance of Leyden jar
//
// Some historical eletromagnetic units
//
//
// Photometric units
//
// Luminance measures
// Some luminance data from the IES Lighting Handbook, 8th ed, 1993
//
// Astronomical time measurements
//
mo := month
decade := 10 years
century := 100 years
centuries := century // Irregular plural
millennium := 1000 years
millennia := millennium
solaryear := year
lunaryear := 12 lunarmonth
calendaryear := 365 day
commonyear := 365 day
leapyear := 366 day
julianyear := 365.25 day
juliancentury := 36525 day
juliancenturies := 36525 day
gregorianyear := 365.2425 day
islamicyear := 354 day // A year of 12 lunar months. They
islamicleapyear := 355 day // began counting on July 16, AD 622
// when Muhammad emigrated to Medina
// (the year of the Hegira). They need
// 11 leap days in 30 years to stay in
// sync with the lunar year which is a
// bit longer than the 29.5 days of the
// average month.
islamicmonth := 1/12 islamicyear// They have 29 day and 30 day months.
cron := 1ee6 years
lustrum := 5 years // The Lustrum was a Roman
// purification ceremony that took
// place every five years.
// Classically educated Englishmen
// used this term.
// Solar days
//
// Some other astronomical values
//
sunmass := 1.9891e30 kg
solarmass := sunmass // Common unit name
sunradius := 696342. km // Plus/minus 65 km,
// http://www.ifa.hawaii.edu/info/press-releases/solar_radius/
sunpower := 3.86e26 watts
moonmass := 7.3483e22 kg
moonradius := 1738. km // mean value
// Distances
sundist := 1.0000010178 au// mean earth-sun distance
sundist_near := 1.471e11 m // earth-sun distance at perihelion
sundist_far := 1.521e11 m // earth-sun distance at aphelion
mercurymass := 0.33022e24 kg
venusmass := 4.8690e24 kg
marsmass := 0.64191e24 kg
earthmass := 5.9742e24 kg
jupitermass := 1898.8e24 kg
saturnmass := 568.5e24 kg
uranusmass := 86.625e24 kg
neptunemass := 102.78e24 kg
plutomass := 0.0127e24 kg
mercuryradius := 2439. km
venusradius := 6052. km
marsradius := 3397. km
earthradius := 6371.01 km // mean +/- 0.02 km
jupiterradius := 71492. km
saturnradius := 60268. km
uranusradius := 25559. km
neptuneradius := 24764. km
plutoradius := 1185. km // July 13, 2015, +/- 10
// http://pluto.jhuapl.edu/News-Center/News-Article.php?page=20150713
// These use the WGS84 datum, which is currently most commonly used
// in mapping.
earthradius_equatorial := 6378137. m
earthradius_polar := 6356752.3142 m
earth_flattening := (earthradius_equatorial-
earthradius_polar)/earthradius_equatorial
// http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM
// http://ssd.jpl.nasa.gov/phys_props_earth.html
// Larger moons... their distances are the average distances from their planet.
// Mars
phobosdist := 9378.5 km
phobosmass := 1.08e16 kg
deimosdist := 23458. km
deimosmass := 1.8e15 kg
// Jupiter
iodist := 422000. km
ioradius := 1815. km
iomass := 8.93e22 kg
europadist := 670900. km
europaradius := 1569. km
europamass := 4.80e22 kg
ganymededist := 1070000. km
ganymederadius := 2631. km
ganymedemass := 1.48e23 kg
callistodist := 1883000. km
callistoradius := 2400. km
callistomass := 1.08e23 kg
// Saturn
titandist := 1221850. km
titanradius := 2575. km
titanmass := 1.35e23 kg
// Pluto
charondist := 19640. km
charonradius := 604. km // http://pluto.jhuapl.edu/News-Center/News-Article.php?
page=20150713
charonmass := 1.90e21 kg
octave := 2
majorthird := 5/4
minorthird := 6/5
musicalfourth := 4/3
musicalfifth := 3/2
majorsecond := musicalfifth^2 / octave
majorsixth := musicalfourth majorthird
minorsixth := musicalfourth minorthird
majorseventh := musicalfifth majorthird
minorseventh := musicalfifth minorthird
semitone := octave^(1/12)
//
// These thermal units treat entropy as charge, from [5]
//
// surveyor's measure
surveyorschain := 66 surveyft
surveyorspole := 1/4 surveyorschain
surveyorslink := 1/100 surveyorschain
chain := surveyorschain
surveychain := chain
ch := chain
link := surveyorslink
acre := 43560 surveyfoot^2 // NIST Handbook 44 has a
// typographical error (forgetting
// to underline feet in one place
// on middle of page C-16 in 2003
// edition) with
// respect to this, but it's
// clear from corroborating
// different figures in that
// document and NIST Special
// Publication 811, Sec. B.6,
// that the survey foot is
// the proper definition. Have
// filed errata with NIST and
// requested confirmation.
// 2003-08-27
// Received confirmation (years
// later) that all of my reported
// errors were indeed errors and
// would be fixed. Note that
// it was apparently not fixed until the 2007
// edition. 2010 edition of NIST Handbook 44 is
// apparently correct. (see section C-2.)
// http://ts.nist.gov/WeightsAndMeasures/pubs.cfm
engineerschain := 100 ft
engineerslink := 1/100 engineerschain
ramsdenschain := engineerschain
ramsdenslink := engineerslink
// nautical measure
// Avoirdupois weight
// These are actually defined as mass units to follow the recommendations
// of the SI.
// Troy Weight. In 1828 the troy pound was made the first United States
// standard weight. It was to be used to regulate coinage.
// Apothecaries' weight
appound := troypound
apounce := troyounce
apdram := 1/8 apounce
scruple := 1/3 apdram
// Liquid measure
// Dry measures: The Winchester Bushel was defined by William III in 1702 and
// legally adopted in the US in 1836.
wheatbushel := 60 lb
soybeanbushel := 60 lb
cornbushel := 56 lb
ryebushel := 56 lb
barleybushel := 48 lb
oatbushel := 32 lb
ricebushel := 45 lb
canada_oatbushel := 34 lb
pony := 1 floz
jigger := 1.5 floz // Can vary between 1 and 2 floz
shot := jigger // Sometimes 1 floz
eushot := 20 ml // EU standard spirits measure
// See http://bundesrecht.juris.de/eo_1988/anhang_c_119.html
fifth := 1/5 gallon
winebottle := 750 ml // US industry standard, 1979
winesplit := 1/4 winebottle
wineglass := 4 floz
magnum := 3/2 liter // Standardized in 1979, but given
// as 2 qt in some references
metrictenth := 375 ml
metricfifth := 750 ml
metricquart := 1 liter
split := 200 ml
jeroboam := 2 magnum
rehoboam := 3 magnum
methuselah := 4 magnum
salmanazar := 6 magnum
balthazar := 8 magnum
nebuchadnezzar := 10 magnum
// Shoe measures
//
// USA slang units
//
buck := dollar
fin := 5 dollar
sawbuck := 10 dollar
key := kg // usually of marijuana, 60's
lid := 1 oz // Another 60's weed unit
footballfield := 100 yards
marathon := 26 miles + 385 yards
//
// British
//
clove := 7 lb
stone := 14 lb
brhundredweight := 8 stone
brquartermass := 1/4 brhundredweight
longhundredweight := brhundredweight
longton := 20 brhundredweight
brton := longton
brassayton := mg brton / troyounce
bag := 4 brbushel
bucket := 4 brgallon
last := 40 brbushel
noggin := brgill
pottle := 1/2 brgallon
pin := 4.5 brgallon
puncheon := 72 brgallon
seam := 8 brbushel
coomb := 4 brbushel
boll := 6 brbushel
firlot := 1/4 boll
brfirkin := 9 brgallon // Used for ale and beer
cran := 37.5 brgallon // measures herring, about 750 fish
barrelbulk := 5 feet^3
brhogshead := 63 brgallon
registerton := 100 ft^3 // Used for internal capacity of ships
shippington := 40 ft^3 // Used for ship's cargo freight or timber
brshippington := 42 ft^3 //
freightton := shippington// Both register ton and shipping ton derive
// from the "tun cask" of wine.
displacementton := 35 ft^3 // Approximate volume of a longton weight of
// sea water used to measure ship displacement
waterton := 224 brgallon
strike := 70.5 l // 16th century unit, sometimes
// defined as .5, 2, or 4 bushels
// depending on the location. It
// probably doesn't make a lot of
// sense to define in terms of imperial
// bushels. Zupko gives a value of
// 2 Winchester grain bushels or about
// 70.5 liters.
// alternate spellings
metre := meter
gramme := gram
litre := liter
dioptre := diopter
//
// Units derived the human body (may not be very accurate)
//
//
// Cooking measures
//
// US measures
cup := 8 floz
tablespoon := 1/16 cup
tbl := tablespoon
tbsp := tablespoon
Tbsp := tablespoon
Tsp := tablespoon
teaspoon := 1/3 tablespoon
tsp := teaspoon
metriccup := 250 ml
// US can sizes.
number1can := 10 floz
number2can := 19 floz
number2_5can := 3.5 cups
number3can := 4 cups
number5can := 7 cups
number10can := 105 floz
// British measures
// Australian
australiatablespoon := 20 ml
austbl := australiatablespoon
// Chinese
// Thai measurements are very similar so the name must be qualified
chinesecatty := 1/2 kg
oldchinesecatty := 4/3 lbs // Before metric conversion.
chinesetael := 1/16 oldchinesecatty
chinesemace := 1/10 chinesetael
oldchinesepicul := 100 oldchinesecatty
chinesepicul := 100 chinesecatty // Chinese usage
// Thai weights
thaitical := 15 grams
thaibaht := thaitical // New name for thaitical, not to be confused with
// the Thai currency called "Thailand_baht".
thaisalung := 1/4 thaitical
thaifung := 1/2 thaisalung
thaisatang := 1/100 thaitical
thaisadtahng := thaisatang // Alternate transliteration
thaitamlung := 4 thaitical
thaicatty := 10 thaitamlung
thaichang := 2 thaicatty
thaihap := 50 thaichang
thaipicul := thaihap
thaikoyan := 20 thaipicul
// Japanese
japancup := 200 ml
// densities of cooking ingredients from The Cake Bible by Rose Levy Beranbaum
// so you can convert '2 cups sugar' to grams, for example, or in the other
// direction grams could be converted to 'cup flour_scooped'.
butter := 8. oz/cup
butter_clarified := 6.8 oz/cup
cocoa_butter := 9. oz/cup
shortening := 6.75 oz/cup // vegetable shortening
stickbutter := 1/4 lb
vegetable_oil := 7.5 oz/cup
cakeflour_sifted := 3.5 oz/cup // The density of flour depends on the
cakeflour_spooned := 4. oz/cup // measuring method. "Scooped", or
cakeflour_scooped := 4.5 oz/cup // "dip and sweep" refers to dipping a
flour_sifted := 4. oz/cup // measure into a bin, and then sweeping
flour_spooned := 4.25 oz/cup // the excess off the top. "Spooned"
flour_scooped := 5. oz/cup // means to lightly spoon into a measure
breadflour_sifted := 4.25 oz/cup // and then sweep the top. Sifted means
breadflour_spooned := 4.5 oz/cup // sifting the flour directly into a
breadflour_scooped := 5.5 oz/cup // measure and then sweeping the top.
cornstarch := 120. grams/cup
dutchcocoa_sifted := 75. g/cup // These are for Dutch processed cocoa
dutchcocoa_spooned := 92. g/cup
dutchcocoa_scooped := 95. g/cup
cocoa_sifted := 75. g/cup // These are for nonalkalized cocoa
cocoa_spooned := 82. g/cup
cocoa_scooped := 95. g/cup
heavycream := 232. g/cup
milk := 242. g/cup
sourcream := 242. g/cup
molasses := 11.25 oz/cup
cornsyrup := 11.5 oz/cup
honey := 11.75 oz/cup
sugar := 200. g/cup
powdered_sugar := 4. oz/cup
brownsugar_light := 217. g/cup // packed
brownsugar_dark := 239. g/cup
//
// Units derived from imperial system
//
So, evidently they don't quite specify which ton is required, but
rather defined the phrase "kiloton" (of TNT is implied) as a new unit
that just means 10^12 calories. It's a measure of energy, not an
energy density, and to be rigorous, we shouldn't divide by the mass.
But as a practical matter, we will want to divide by mass. Of all the
different types of tons available, the one that matches this definition
the closest shows that the short ton (2000 lb) was almost certainly
originally intended, and most closely matches this definition.
//
// Permeability: The permeability or permeance, n, of a substance determines
// how fast vapor flows through the substance. The formula W = n A dP
// holds where W is the rate of flow (in mass/time), n is the permeability,
// A is the area of the flow path, and dP is the vapor pressure difference.
//
// Alan's Veto: These are damned, damned sketchy, and are going to go.
//
// Counting measures
//
unity := 1
pair := 2
couple := 2
brace := 2
nest := 3
dickers := 10
dozen := 12
bakersdozen := 13
score := 20
flock := 40
timer := 40
shock := 60
gross := 144
greatgross := 12 gross
shortquire := 24
quire := 25
shortream := 480
ream := 500
perfectream := 516
bundle := 2 reams
bale := 5 bundles
//
// Paper measures
//
// The metric paper sizes are defined so that if a sheet is cut in half
// along the short direction, the result is two sheets which are
// similar to the original sheet. This means that for any metric size,
// the long side is close to sqrt(2) times the length of the short
// side. Each series of sizes is generated by repeated cuts in half,
// with the values rounded down to the nearest millimeter.
// gsm (Grams per Square Meter), a sane, metric paper weight measure
// In the USA, a collection of crazy historical paper measures are used. Paper
// is measured as a weight of a ream of that particular type of paper. This is
// sometimes called the "substance" or "basis" (as in "substance 20" paper).
// The standard sheet size or "basis size" varies depending on the type of
// paper. As a result, 20 pound bond paper and 50 pound text paper are actually
// about the same weight. The different sheet sizes were historically the most
// convenient for printing or folding in the different applications. These
// different basis weights are standards maintained by American Society for
// Testing Materials (ASTM) and the American Forest and Paper Association
// (AF&PA).
// When paper is marked in units of M, it means the weight of 1000 sheets of the
// given size of paper. To convert this to paper weight, divide by the size of
// the paper in question.
paperM := lb / 1000
//
// Old French distance measures, from French Weights and Measures
// Before the Revolution by Zupko
//
//
// Printing
//
stick := 2 inches
// Type sizes
excelsior := 3 point
brilliant := 3.5 point
diamond := 4 point
pearl := 5 point
agate := 5.5 point
ruby := agate // British
nonpareil := 6 point
mignonette := 6.5 point
emerald := mignonette// British
minion := 7 point
brevier := 8 point
bourgeois := 9 point
longprimer := 10 point
smallpica := 11 point
pica := 12 point
english := 14 point
columbian := 16 point
greatprimer := 18 point
paragon := 20 point
meridian := 44 point
canon := 48 point
//
// Information theory units
//
// Prefixes
kibi ::- 2^10 // kilobinary
mebi ::- 2^20 // megabinary
gibi ::- 2^30 // gigabinary
tebi ::- 2^40 // terabinary
pebi ::- 2^50 // petabinary
exbi ::- 2^60 // exabinary
// Official symbols
Ki :- kibi
Mi :- mebi
Gi :- gibi
Ti :- tebi
Pi :- pebi
Ei :- exbi
//
// drug dosage
//
hectare := hectoare
ha := hectare
megohm := megaohm
kilohm := kiloohm
microhm := microohm
// British currency
//
// These have been supplanted by the PoundSource definitions which include
// historical exchange rates for years back to 1600.
//
//shilling := 1/20 britainpound // Before decimalisation, there
//oldpence := 1/12 shilling // were 20 shillings to a pound,
// each of twelve old pence
//quid := britainpound // Slang names
//fiver := 5 quid
//tenner := 10 quid
//
// Units used for measuring volume of wood
//
// In Britain, the deal is apparently any piece of wood over 6 feet long, over
// 7 wide and 2.5 inches thick. The OED doesn't give a standard size. A piece
// of wood less than 7 inches wide is called a "batten". This unit is now used
// exclusively for fir and pine.
//
// Gas and Liquid flow units
//
// Some horribly-named flow units that I've never seen used other than once
// (unexplained) in the Guinness Book of World Records which has degraded into
// tabloid trash.
cumec := m^3/s
cusec := ft^3/s
gph := gal/hr
gpm := gal/min
mgd := megagal/day
cf := ft^3
ccf := 100 cf // sorta dubious, but used.
cfs := cf/s
cfh := cf/hour
cfm := cf/min
lpm := liter/min
// Miner's inch: This is an old historic unit used in the Western United
// States. It is generally defined as the rate of flow through a one square
// inch hole at a specified depth such as 4 inches. In the late 19th century,
// volume of water was sometimes measured in the "24 hour inch". Values for the
// miner's inch were fixed by state statues. (This information is from a web
// site operated by the Nevada Division of Water Planning: The Water Words
// Dictionary at http://www.state.nv.us/cnr/ndwp/dict-1/waterwds.htm.)
// Wire gauge: this area is a nightmare with huge charts of wire gauge
// diameters that usually have no clear origin. There are at least 5 competing
// wire gauge systems to add to the confusion.
// The use of wire gauge is related to the manufacturing method: a metal rod is
// heated and drawn through a hole. The size change can't be too big. To get
// smaller wires, the process is repeated with a series of smaller holes.
// American Wire Gauge (AWG) or Brown & Sharpe Gauge appears to be the most
// important gauge. ASTM B-258 specifies that this gauge is based on geometric
// interpolation between gauge 0000, which is 0.46 inches exactly, and gauge 36
// which is 0.005 inches exactly. Therefore, the diameter in inches of a wire
// is given by the formula 1/200 92^((36-g)/39). Note that 92^(1/39) is close
// to 2^(1/6), so diameter is approximately halved for every 6 gauges. For the
// repeated zero values, use negative numbers in the formula. The same document
// also specifies rounding rules which seem to be ignored by makers of tables.
// Gauges up to 44 are to be specified with up to 4 significant figures, but no
// closer than 0.0001 inch. Gauges from 44 to 56 are to be rounded to the
// nearest 0.00001 inch. The table below gives 4 significant figures for all
// gauges.
//
// In addition to being used to measure wire thickness, this gauge is used to
// measure the thickness of sheets of aluminum, copper, and most metals other
// than steel, iron and zinc.
// Next we have the SWG, the Imperial or British Standard Wire Gauge. This one
// is piecewise linear, so it is not generated by a simple formula. It was used
// for aluminum sheets.
brwire0000000gauge := 0.500 in
brwire000000gauge := 0.464 in
brwire00000gauge := 0.432 in
brwire0000gauge := 0.400 in
brwire000gauge := 0.372 in
brwire00gauge := 0.348 in
brwire0gauge := 0.324 in
brwire1gauge := 0.300 in
brwire2gauge := 0.276 in
brwire3gauge := 0.252 in
brwire4gauge := 0.232 in
brwire5gauge := 0.212 in
brwire6gauge := 0.192 in
brwire7gauge := 0.176 in
brwire8gauge := 0.160 in
brwire9gauge := 0.144 in
brwire10gauge := 0.128 in
brwire11gauge := 0.116 in
brwire12gauge := 0.104 in
brwire13gauge := 0.092 in
brwire14gauge := 0.080 in
brwire15gauge := 0.072 in
brwire16gauge := 0.064 in
brwire17gauge := 0.056 in
brwire18gauge := 0.048 in
brwire19gauge := 0.040 in
brwire20gauge := 0.036 in
brwire21gauge := 0.032 in
brwire22gauge := 0.028 in
brwire23gauge := 0.024 in
brwire24gauge := 0.022 in
brwire25gauge := 0.0200 in
brwire26gauge := 0.0180 in
brwire27gauge := 0.0164 in
brwire28gauge := 0.0149 in
brwire29gauge := 0.0136 in
brwire30gauge := 0.0124 in
brwire31gauge := 0.0116 in
brwire32gauge := 0.0108 in
brwire33gauge := 0.0100 in
brwire34gauge := 0.0092 in
brwire35gauge := 0.0084 in
brwire36gauge := 0.0076 in
brwire37gauge := 0.0068 in
brwire38gauge := 0.0060 in
brwire39gauge := 0.0052 in
brwire40gauge := 0.0048 in
brwire41gauge := 0.0044 in
brwire42gauge := 0.0040 in
brwire43gauge := 0.0036 in
brwire44gauge := 0.0032 in
brwire45gauge := 0.0028 in
brwire46gauge := 0.0024 in
brwire47gauge := 0.0020 in
brwire48gauge := 0.0016 in
brwire49gauge := 0.0012 in
brwire50gauge := 0.0010 in
zinc1gauge := 0.002 in
zinc2gauge := 0.004 in
zinc3gauge := 0.006 in
zinc4gauge := 0.008 in
zinc5gauge := 0.010 in
zinc6gauge := 0.012 in
zinc7gauge := 0.014 in
zinc8gauge := 0.016 in
zinc9gauge := 0.018 in
zinc10gauge := 0.020 in
zinc11gauge := 0.024 in
zinc12gauge := 0.028 in
zinc13gauge := 0.032 in
zinc14gauge := 0.036 in
zinc15gauge := 0.040 in
zinc16gauge := 0.045 in
zinc17gauge := 0.050 in
zinc18gauge := 0.055 in
zinc19gauge := 0.060 in
zinc20gauge := 0.070 in
zinc21gauge := 0.080 in
zinc22gauge := 0.090 in
zinc23gauge := 0.100 in
zinc24gauge := 0.125 in
zinc25gauge := 0.250 in
zinc26gauge := 0.375 in
zinc27gauge := 0.500 in
zinc28gauge := 1.000 in
size2ring := 0.538 in pi
size3ring := 0.554 in pi
size3_5ring := 0.570 in pi
size4ring := 0.586 in pi
size4_5ring := 0.602 in pi
size5ring := 0.618 in pi
size5_5ring := 0.634 in pi
size6ring := 0.650 in pi
size6_5ring := 0.666 in pi
size7ring := 0.682 in pi
size7_5ring := 0.698 in pi
size8ring := 0.714 in pi
size8_5ring := 0.730 in pi
size9ring := 0.746 in pi
size9_5ring := 0.762 in pi
size10ring := 0.778 in pi
size10_5ring := 0.794 in pi
size11ring := 0.810 in pi
size11_5ring := 0.826 in pi
size12ring := 0.842 in pi
size12_5ring := 0.858 in pi
size13ring := 0.874 in pi
size13_5ring := 0.890 in pi
// Old practice in the UK measured rings using the "Wheatsheaf gauge" with sizes
// specified alphabetically and based on the ring inside diameter in steps of
// 1/64 inch. This system was replaced in 1987 by British Standard 6820 which
// specifies sizes based on circumference. Each size is 1.25 mm different from
// the preceding size. The baseline is size C which is 40 mm circumference.
// The new sizes are close to the old ones. Sometimes it's necessary to go
// beyond size Z to Z+1, Z+2, etc.
sizeAring := 37.50 mm
sizeBring := 38.75 mm
sizeCring := 40.00 mm
sizeDring := 41.25 mm
sizeEring := 42.50 mm
sizeFring := 43.75 mm
sizeGring := 45.00 mm
sizeHring := 46.25 mm
sizeIring := 47.50 mm
sizeJring := 48.75 mm
sizeKring := 50.00 mm
sizeLring := 51.25 mm
sizeMring := 52.50 mm
sizeNring := 53.75 mm
sizeOring := 55.00 mm
sizePring := 56.25 mm
sizeQring := 57.50 mm
sizeRring := 58.75 mm
sizeSring := 60.00 mm
sizeTring := 61.25 mm
sizeUring := 62.50 mm
sizeVring := 63.75 mm
sizeWring := 65.00 mm
sizeXring := 66.25 mm
sizeYring := 67.50 mm
sizeZring := 68.75 mm
// Japanese sizes start with size 1 at a 13mm inside diameter and each size is
// 1/3 mm larger in diameter than the previous one. They are multiplied by pi
// to give circumference.
jpsize1ring := 39/3 pi mm
jpsize2ring := 40/3 pi mm
jpsize3ring := 41/3 pi mm
jpsize4ring := 42/3 pi mm
jpsize5ring := 43/3 pi mm
jpsize6ring := 44/3 pi mm
jpsize7ring := 45/3 pi mm
jpsize8ring := 46/3 pi mm
jpsize9ring := 47/3 pi mm
jpsize10ring := 48/3 pi mm
jpsize11ring := 49/3 pi mm
jpsize12ring := 50/3 pi mm
jpsize13ring := 51/3 pi mm
jpsize14ring := 52/3 pi mm
jpsize15ring := 53/3 pi mm
jpsize16ring := 54/3 pi mm
jpsize17ring := 55/3 pi mm
jpsize18ring := 56/3 pi mm
jpsize19ring := 57/3 pi mm
jpsize20ring := 58/3 pi mm
jpsize21ring := 59/3 pi mm
jpsize22ring := 60/3 pi mm
jpsize23ring := 61/3 pi mm
jpsize24ring := 62/3 pi mm
jpsize25ring := 63/3 pi mm
jpsize26ring := 64/3 pi mm
jpsize27ring := 65/3 pi mm
jpsize28ring := 66/3 pi mm
jpsize29ring := 67/3 pi mm
jpsize30ring := 68/3 pi mm
// The European ring sizes are the length of the circumference in mm minus 40.
eusize1ring := 41 mm
eusize2ring := 42 mm
eusize3ring := 43 mm
eusize4ring := 44 mm
eusize5ring := 45 mm
eusize6ring := 46 mm
eusize7ring := 47 mm
eusize8ring := 48 mm
eusize9ring := 49 mm
eusize10ring := 50 mm
eusize11ring := 51 mm
eusize12ring := 52 mm
eusize13ring := 53 mm
eusize14ring := 54 mm
eusize15ring := 55 mm
eusize16ring := 56 mm
eusize17ring := 57 mm
eusize18ring := 58 mm
eusize19ring := 59 mm
eusize20ring := 60 mm
eusize21ring := 61 mm
eusize22ring := 62 mm
eusize23ring := 63 mm
eusize24ring := 64 mm
eusize25ring := 65 mm
eusize26ring := 66 mm
eusize27ring := 67 mm
eusize28ring := 68 mm
eusize29ring := 69 mm
eusize30ring := 70 mm
//
// Abbreviations
//
mph := mile/hr
mpg := mile/gal
kph := km/hr
fL := footlambert
fpm := ft/min
fps := ft/s
rpm := rev/min
rps := rev/sec
mi := mile
mbh := 1ee3 Btu/hour
mcm := 1ee3 circularmil
//
// Radioactivity units
//
//
// Atomic weights. The atomic weight of an element is the ratio of the mass of
// a mole of the element to 1/12 of a mole of Carbon 12. The Standard Atomic
// Weights apply to the elements as they occur naturally on earth. Elements
// which do not occur naturally or which occur with wide isotopic variability do
// not have Standard Atomic Weights. For these elements, the atomic weight is
// based on the longest lived isotope, as marked in the comments. In some
// cases, the comment for these entries also gives a number which is an atomic
// weight for a different isotope that may be of more interest than the longest
// lived isotope.
//
//
// Before the Imperial Weights and Measures Act of 1824, various different
// weights and measures were in use in different places.
//
scotsrood := 40 scotsfall^2
scotsacre := 4 scotsrood
irishinch := britishinch
irishpalm := 3 irishinch
irishspan := 3 irishpalm
irishfoot := 12 irishinch
irishfeet := irishfoot
irishcubit := 18 irishinch
irishyard := 3 irishfeet
irishpace := 5 irishfeet
irishfathom := 6 irishfeet
irishpole := 7 irishyard // Only these values
irishperch := irishpole // are different from
irishchain := 4 irishperch // the British Imperial
irishlink := 1/100 irishchain// or English values for
irishfurlong :=10 irishchain // these lengths.
irishmile := 8 irishfurlong //
irishrood := 40 irishpole^2
irishacre := 4 irishrood
// English beer and ale measures used 1803-1824 and used for beer before 1688
// English ale measures used from 1688-1803 for both ale and beer
alegallon := englishbeergallon
alequart := 1/4 alegallon
alepint := 1/2 alequart
alebarrel := 34 alegallon
alehogshead :=1.5 alebarrel
irishpeck := 2 irishgallon
irishbushel :=4 irishpeck
irishstrike :=2 irishbushel
irishdrybarrel := 2 irishstrike
irishquarter := 2 irishbarrel
leadstone := 12.5 lb
fotmal := 70 lb
leadwey := 14 leadstone
fothers := 12 leadwey
woolclove := 7 lb
woolstone := 2 woolclove
wooltod := 2 woolstone
woolwey := 13 woolstone
woolsack :=2 woolwey
woolsarpler := 2 woolsack
woollast :=6 woolsarpler
//
// Ancient history units: There tends to be uncertainty in the definitions
// of the units in this section
// These units are from [11]
// Roman measure. The Romans had a well defined distance measure, but their
// measures of weight were poor. They adopted local weights in different
// regions without distinguishing among them so that there are half a dozen
// different Roman "standard" weight systems.
earlyromanfoot :=29.73 cm
pesdrusianus := 33.3 cm // or 33.35 cm, used in Gaul & Germany in 1st c BC
lateromanfoot := 29.42 cm
// Roman areas
// Roman volumes
semodius := 8 sextarius
semodii := semodius
modius := 16 sextarius
modii := modius
congius := 12 heminae
congii := congius
amphora := 8 congii
amphorae := amphora // Also a dry volume measure
culleus := 20 amphorae
quadrantal := amphora
// Roman weights
ionicfoot := 296 mm
doricfoot := 326 mm
// Greek weight. Two weight standards were used, an Aegina standard based
// on the Beqa shekel and an Athens (attic) standard.
// "Northern" cubit and foot. This was used by the pre-Aryan civilization in
// the Indus valley. It was used in Mesopotamia, Egypt, North Africa, China,
// central and Western Europe until modern times when it was displaced by
// the metric system.
sumeriancubit := 495 mm
kus := sumeriancubit
sumerianfoot := 2/3 sumeriancubit
assyriancubit := 21.6 in
assyrianfoot := 1/2 assyriancubit
assyrianpalm := 1/3 assyrianfoot
assyriansusi := 1/20 assyrianpalm
susi := assyriansusi
persianroyalcubit := 7 assyrianpalm
// Arabic measures. The arabic standards were meticulously kept. Glass weights
// accurate to .2 grains were made during AD 714-900.
blackcubit := 21.28 in
arabicfeet := 1/2 blackcubit
arabicfoot := arabicfeet
arabicinch := 1/12 arabicfoot
arabicmile := 4000 blackcubit
// Some silliness:
//
// Some definitions using ISO 8859-1 characters
//
//- 1/4
//- 1/2
//- 3/4
// cent
// britainpound
// japanyen
//ngstrm angstrom
//rntgen roentgen
//C degC
//R degR