units.lib revision 1.25
1/	$NetBSD: units.lib,v 1.25 2022/02/15 13:44:47 jakllsch Exp $
2
3/ primitive units
4
5m			!a!
6kg			!b!
7sec			!c!
8coul			!d!
9candela			!e!
10dollar			!f!
11bit			!h!
12erlang			!i!
13K			!j!
14
15/ prefixes
16
17yotta-			1e24
18zetta-			1e21
19exa-			1e18
20peta-			1e15
21tera-			1e12
22giga-			1e9
23mega-			1e6
24myria-			1e4
25kilo-			1e3
26hecto-			1e2
27deka-			1e1
28deci-			1e-1
29centi-			1e-2
30milli-			1e-3
31micro-			1e-6
32nano-			1e-9
33pico-			1e-12
34femto-			1e-15
35atto-			1e-18
36zopto-			1e-21
37yocto-			1e-24
38
39semi-			.5
40demi-			.5
41
42Y-			yotta
43Z-			zetta
44E-			exa
45P-			peta
46T-			tera
47G-			giga
48M-			mega
49k-			kilo
50h-			hecto
51da-			deka
52d-			deci
53c-			centi
54m-			milli
55p-			pico
56f-			femto
57a-			atto
58z-			zopto
59y-			yocto
60
61/ constants
62
63fuzz			1
64pi			3.14159265358979323846
65c			2.99792458e+8 m/sec fuzz
66g			9.80665 m/sec2
67au			1.49597871e+11 m fuzz
68mole			6.022169e+23 fuzz
69e			1.6021917e-19 coul fuzz
70energy			c2
71force			g
72mercury			1.33322e+5 kg/m2-sec2
73hg			mercury
74
75/ dimensionless
76
77radian			.5 / pi
78degree			1|180 pi-radian
79circle			2 pi-radian
80turn			2 pi-radian
81revolution			turn
82rev			turn
83grade			.9 degree
84arcdeg			1 degree
85arcmin			1|60 arcdeg
86ccs			1|36 erlang
87arcsec			1|60 arcmin
88
89steradian		radian2
90sphere			4 pi-steradian
91sr			steradian
92
93/ Time
94
95second			sec
96s			sec
97minute			60 sec
98min			minute
99hour			60 min
100hr			hour
101day			24 hr
102da			day
103week			7 day
104year			365.24219879 day fuzz
105yr			year
106month			1|12 year
107ms			millisec
108us			microsec
109
110/ Mass
111
112gram			millikg
113gm			gram
114mg			milligram
115metricton		kilokg
116
117/ Avoirdupois
118
119lb			.45359237 kg
120pound			lb
121lbf			lb g
122ounce			1|16 lb
123oz			ounce
124dram			1|16 oz
125dr			dram
126grain			1|7000 lb
127gr			grain
128shortton		2000 lb
129ton			shortton
130longton			2240 lb
131
132/ Apothecary
133
134scruple			20 grain
135apdram			60 grain
136apounce			480 grain
137appound			5760 grain
138troypound		appound
139troyounce		1|12 troypound
140
141/ Length
142
143meter			m
144cm			centimeter
145mm			millimeter
146km			kilometer
147nm			nanometer
148micron			micrometer
149angstrom		decinanometer
150
151inch			2.54 cm
152in			inch
153foot			12 in
154feet			foot
155ft			foot
156yard			3 ft
157yd			yard
158rod			5.5 yd
159rd			rod
160mile			5280 ft
161mi			mile
162
163british			1200|3937 m/ft
164nmile			1852 m
165
166acre			4840 yd2
167
168cc			cm3
169liter			kilocc
170ml			milliliter
171
172/ US Liquid
173
174gallon			231 in3
175imperial		1.20095
176gal			gallon
177quart			1|4 gal
178qt			quart
179pint			1|2 qt
180pt			pint
181
182floz			1|16 pt
183fldr			1|8 floz
184
185/ US Dry
186
187dry			268.8025 in3/gallon fuzz
188peck			8 dry-quart
189pk			peck
190bushel			4 peck
191bu			bushel
192chaldron		36 bushel
193
194/ British
195
196brgallon		277.420 in3 fuzz
197brquart			1|4 brgallon
198brpint			1|2 brquart
199brfloz			1|20 brpint
200brpeck			554.84 in3 fuzz
201brbushel		4 brpeck
202
203/ Bottles
204
205bottle			750 milliliter
206/bottle			fifth
207
208miniature		100 milliliter
209split			1|4 bottle
210half			1|2 bottle
211magnum			2 bottle
212jeroboam		4 bottle
213rehoboam		6 bottle
214methuselah		8 bottle
215salmanazar		12 bottle
216balthazar		16 bottle
217nebuchadnezzar		20 bottle
218sovereign		34 bottle
219
220/ Bottles - alternate names and spellings
221
222pony			split
223fillette		half
224tappithen		3 bottle
225rheoboam		rehoboam
226shalmaneser		salmanazar
227
228/ Energy Work
229
230newton			kg-m/sec2
231nt			newton
232N			newton
233joule			nt-m
234watt			joule/sec
235W			watt
236cal			4.1868 joule
237
238/ Electrical
239
240coulomb			coul
241C			coul
242ampere			coul/sec
243amp			ampere
244volt			watt/amp
245ohm			volt/amp
246mho			/ohm
247farad			coul/volt
248henry			sec2/farad
249weber			volt-sec
250
251/ Light
252
253cd			candela
254lumen			cd sr
255lux			cd sr/m2
256
257/ Wall Street Journal, July 2, 1993
258
259$			dollar
260argentinapeso		$
261australiadollar		.66 $
262bahraindinar		2.6522 $
263brazilcruzeiro		.000019 $
264britainpound		1.49 $
265canadadollar		.77 $
266czechkoruna		.034 $
267chilepeso		.0025 $
268chinarenminbi		.174856 $
269colombiapeso		.001495 $
270denmarkkrone		.15 $
271ecuadorsucre		.000539 $
272europeeuro		0.9142 $
273greatbritainpound	britainpound
274hongkongdollar		.13 $
275hungaryforint		.011 $
276indiarupee		.03211 $
277indonesiarupiah		.0004782 $
278israelshekel		.3642 $
279japanyen		.0093 $
280jordandinar		1.4682 $
281kuwaitdinar		3.3173 $
282lebanonpound		.000578 $
283malaysiaringgit		.338 $
284maltalira		2.6042 $
285mexicopeso		.3205128 $
286newzealanddollar	.539 $
287norwaykrone		.139 $
288pakistanrupee		.037 $
289perunewsol		.5065 $
290philippinespeso		.03738 $
291polandzloty		.000059 $
292saudiarabiariyal	.26702 $
293singaporedollar		.6157 $
294slovakkoruna		.034 $
295southafricarand		.21 $
296southkoreawon		.001 $
297swedenkrona		.13 $
298switzerlandfranc	.66 $
299taiwandollar		.038285 $
300thailandbaht		.03962 $
301turkeylira		.0000929 $
302unitedarabdirham	.2723 $
303uruguaynewpeso		.246852 $
304venezuelabolivar	.011 $
305
306/ The following currencies are locked to the Euro:
307/ <URL:http://www.ecb.int/change/conversion.htm>
308belgiumfranc		1|40.3399 euro
309germanymark		1|1.95583 euro
310spainpeseta		1|166.386 euro
311francefranc		1|6.55957 euro
312irelandpunt		1|.787564 euro
313italylira		1|1936.27 euro
314luxembourgfranc		1|40.3399 euro
315netherlandsguilder	1|2.20371 euro
316austriaschilling	1|13.7603 euro
317portugalescudo		1|200.482 euro
318finlandmarkka		1|5.94573 euro
319greecedrachma		1|340.750 euro
320
321mark			germanymark
322euro			europeeuro
323bolivar			venezuelabolivar
324peseta			spainpeseta
325rand			southafricarand
326escudo			portugalescudo
327newsol			perunewsol
328guilder			netherlandsguilder
329hollandguilder		netherlandsguilder
330peso			mexicopeso
331yen			japanyen
332lira			italylira
333rupee			indiarupee
334drachma			greecedrachma
335franc			francefranc
336markka			finlandmarkka
337sucre			ecuadorsucre
338poundsterling		britainpound
339cruzeiro		brazilcruzeiro
340
341/ computer
342
343baud			bit/sec
344byte			8 bit
345block			512 byte
346kbyte			1024 byte
347megabyte		1024 kbyte
348gigabyte		1024 megabyte
349meg			megabyte
350terabyte		1024 gigabyte
351petabyte		1024 terabyte
352
353
354/ Trivia
355
356%			1|100
357admiraltyknot		6080 ft/hr
358apostilb		cd/pi-m2
359are			1e+2 m2
360arpentcan		27.52 mi
361arpentlin		191.835 ft
362astronomicalunit	au
363atmosphere		1.01325e+5 nt/m2
364atm			atmosphere
365atomicmassunit		1.66044e-27 kg fuzz
366amu			atomicmassunit
367bag			94 lb
368bakersdozen		13
369bar			1e+5 nt/m2
370barie			1e-1 nt/m2
371barleycorn		1|3 in
372barn			1e-28 m2
373barrel			42 gal
374barye			1e-1 nt/m2
375bev			1e+9 e-volt
376biot			10 amp
377blondel			cd/pi-m2
378boardfoot		144 in3
379bolt			40 yd
380bottommeasure		1|40 in
381britishthermalunit	1.05506e+3 joule fuzz
382btu			britishthermalunit
383refrigeration		12000 btu/ton-hour
384buck			dollar
385Ci			curie
386cable			720 ft
387caliber			1e-2 in
388calorie			cal
389carat			205 mg
390caratgold		1|24
391cent			centidollar
392cental			100 lb
393centesimalminute	1e-2 grade
394centesimalsecond	1e-4 grade
395century			100 year
396cfs			ft3/sec
397chain			66 ft
398circularinch		1|4 pi-in2
399circularmil		1e-6|4 pi-in2
400clusec			1e-8 mm-hg m3/s
401coomb			4 bu
402cord			128 ft3
403cordfoot		cord
404crith			9.06e-2 gm
405cubit			18 in
406cup			1|2 pt
407curie			3.7e+10 /sec
408dalton			amu
409decade			10 yr
410diopter			/m
411displacementton		35 ft3
412doppelzentner		100 kg
413dozen			12
414drop			.03 cm3
415dyne			cm-gm/sec2
416electronvolt		e-volt
417ell			45 in
418engineerschain		100 ft
419engineerslink		100|100 ft
420equivalentfootcandle	lumen/pi-ft2
421equivalentlux		lumen/pi-m2
422equivalentphot		cd/pi-cm2
423erg			cm2-gm/sec2
424ev			e-volt
425faraday			9.652e+4 coul
426fathom			6 ft
427fermi			1e-15 m
428fifth			4|5 qt
429fin			5 dollar
430finger			7|8 in
431firkin			9 gal
432footcandle		lumen/ft2
433footlambert		cd/pi-ft2
434fortnight		14 da
435franklin		3.33564e-10 coul
436frigorie		kilocal
437furlong			220 yd
438Gy			gray
439galileo			1e-2 m/sec2
440gamma			1e-9 weber/m2
441gauss			1e-4 weber/m2
442geodeticfoot		british-ft
443geographicalmile	1852 m
444gilbert			7.95775e-1 amp
445gill			1|4 pt
446gray			joule/kg
447gross			144
448gunterschain		22 yd
449hand			4 in
450hectare			1e+4 m2
451hefnercandle		.92 cd
452hertz			/sec
453Hz			hertz
454hogshead		63 gallon
455hd			hogshead
456homestead		1|4 mi2
457horsepower		550 ft-lb-g/sec
458hp			horsepower
459hyl			gm force sec2/m
460hz			/sec
461imaginarycubicfoot	1.4 ft3
462karat			1|24
463kcal			kilocal
464kcalorie		kilocal
465kev			1e+3 e-volt
466key			kg
467khz			1e+3 /sec
468kilderkin		18 gal
469knot			nmile/hr
470lambert			cd/pi-cm2
471langley			cal/cm2
472last			80 bu
473league			3 mi
474lightyear		c-yr
475line			1|12 in
476link			66|100 ft
477longhundredweight	112 lb
478longquarter		28 lb
479lusec			1e-6 mm-hg m3/s
480mach			331.46 m/sec
481marineleague		3 nmile
482maxwell			1e-8 weber
483metriccarat		200 mg
484mgd			megagal/day
485mh			millihenry
486mhz			1e+6 /sec
487mil			1e-3 in
488millennium		1000 year
489minersinch		1.5 ft3/min
490minim			1|60 fldr
491mo			month
492mpg			mile/gal
493mph			mile/hr
494nail			1|16 yd
495nauticalmile		nmile
496nit			cd/m2
497noggin			1|8 qt
498nox			1e-3 lux
499ns			nanosec
500oersted			2.5e+2 pi-amp/m
501oe			oersted
502pace			36 in
503palm			3 in
504parasang		3.5 mi
505parsec			au-radian/arcsec
506pascal			nt/m2
507pc			parsec
508pennyweight		1|20 oz
509pwt			pennyweight
510percent			%
511perch			rd
512pf			picofarad
513phot			lumen/cm2
514pica			1|6 in
515pieze			1e+3 nt/m2
516pipe			4 barrel
517point			1|72 in
518poise			gm/cm-sec
519pole			rd
520poundal			ft-lb/sec2
521pdl			poundal
522proof			1|200
523psi			lb-g/in2
524quarter			9 in
525quartersection		1|4 mi2
526quintal			100 kg
527quire			25
528R			roentgen
529rackunit		1.75 in
530rad			100 erg/gm
531ream			500
532registerton		100 ft3
533rem			1e-2 sievert
534rhe			10 m2/nt-sec
535roentgen		2.58e-4 coulomb/kg
536rontgen			roentgen
537rood			1.21e+3 yd
538rope			20 ft
539RU			rackunit
540rutherford		1e+6 /sec
541rydberg			1.36054e+1 ev
542Sv			sievert
543sabin			1 ft2
544sack			3 bu
545score			20
546seam			8 bu
547section			mi2
548shed			1e-24 barn
549shippington		40 ft3
550shorthundredweight	100 lb
551shortquarter		25 lb
552siemens			/ohm
553sievert			joule/kg
554sigma			microsec
555skein			120 yd
556skot			1e-3 apostilb
557slug			lb-g-sec2/ft
558smoot			67 in
559span			9 in
560spat			4 pi sr
561spindle			14400 yd
562square			100 ft2
563stere			m3
564sthene			1e+3 nt
565stilb			cd/cm2
566stoke			1e-4 m2/sec
567stone			14 lb
568strike			2 bu
569surveyfoot		british-ft
570surveyyard		3 surveyfoot
571surveyorschain		66 ft
572surveyorslink		66|100 ft
573tablespoon		4 fldr
574teaspoon		4|3 fldr
575tesla			weber/m2
576therm			1e+5 btu
577thermie			1e+6 cal
578timberfoot		ft3
579tnt			4.6e+6 m2/sec2
580tonne			1e+6 gm
581torr			mm hg
582township		36 mi2
583tun			8 barrel
584U			rackunit
585water			gram g / cc
586wey			40 bu
587weymass			252 lb
588Xunit			1.00202e-13 m
589k			1.38047e-16 erg/degC
590
591
592degC			K
593kelvin			K
594brewster		1e-12 m2/newton
595degF			5|9 degC
596degreesrankine		degF
597degrankine		degreesrankine
598degreerankine		degF
599degreaumur		10|8 degC
600drachm			60 grain
601poncelet		100 kg m g / sec
602denier			.05|450 gram / m
603tex			.001 gram / m
604englishell		45 inch
605scottishell		37.2 inch
606flemishell		27 inch
607planck			6.626e-34 joule-sec
608hbar			1.055e-34 joule-sec
609electronmass		9.1095e-31 kg
610protonmass		1.6726e-27 kg
611neutronmass		1.6606e-27 kg
612V			volt
613eV			e V
614bohrradius		hbar2-C2/8.988e9 N m2-e2-electronmass
615becquerel		1|3.7e10 curie
616fresnel			1e12 hertz
617statcoul		1|2.99792458e9 coul
618statamp			1|2.99792458e9 amp
619statvolt		2.99792458e2 volt
620statcoulomb		statcoul
621statampere		statamp
622debye			3.336e-30 coul-m
623pulsatance		2 pi/sec
624rpm			rev/minute
625rps			rev/sec
626kilohm			kiloohm
627megohm			megaohm
628siderealyear		365.256360417 day
629siderealday		23.934469444 hour
630siderealhour		1|24 siderealday
631lunarmonth		29.5305555 day
632synodicmonth		lunarmonth
633siderealmonth		27.32152777 day
634tropicalyear		year
635solaryear		year
636lunaryear		12 lunarmonth
637cran			37.5 brgallon
638kip			1000 lbf
639frenchfoot		16|15 ft
640frenchfeet		frenchfoot
641toise			6 frenchfeet
642candle			1.02 candela
643militarypace		2.5 feet
644metre			meter
645litre			liter
646gramme			gram
647iudiptheria		62.8 microgram
648iupenicillin		.6 microgram
649iuinsulin		41.67 microgram
650cottonyarncount		2520 ft/pound
651linenyarncount		900 ft/pound
652worstedyarncount	1680 ft/pound
653metricyarncount		meter/gram
654jewlerspoint		2 milligram
655
656/ Thai length
657
658krabiat			0.5208 cm
659nio			4 krabiat
660khuep			12 nio
661sok			2 khuep
662wah			4 sok
663sen			20 wah
664yot			400 sen
665
666/ Thai area
667
668tarangwah		wah2
669ngan			100 tarangwah
670rai			4 ngan
671
672/ Thai weight
673
674salueng			3.75 gm
675baht			4 salueng
676tamlueng		4 baht
677chang			20 tamlueng
678hap			50 chang
679
680