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