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