Opret en Java Unit Converter

Skriptet nedenfor definerer en konverter for måleenheder, der arbejder med Javascript. Dette script kan måske bruges lokalt i browseren uden brug af serverkode.

// nye enheder kan tilføjes i slutningen af ​​listen

// hvis 2 enheder har samme [nummer], ignoreres den første

// hvis 2 enheder har samme symbol, ignoreres den anden

// grundlæggende SI enheder: meter, kilogram, sekund, ampere, kelvin, mol, candela

// ex: hr = time = s => m ^ 0.kg ^ 0.s ^ 1.A ^ 0.K ^ 0.mol ^ 0.cd ^ 0

// ex: g = acceleration = m / s ^ 2 => m ^ 1.kg ^ 0.s ^ -2.A ^ 0.K ^ 0.mol ^ 0.cd ^ 0

// ex: V = spænding = kg.m² / s³ / A => m ^ 2.kg ^ 1.s ^ -3.A ^ -1.K ^ 0.mol ^ 0.cd ^ 0

all_units = new Array ();

all_units [0] = new Array ("Enhed", "Symbol", "Værdi", "m", "kg", "s", "A", "K", "mol", "cd");

all_units [1] = nyt array ("g", "g", "0.00000000006672", 3, -1, -2, 0, 0, 0, 0);

all_units [2] = new Array ("na", "na", "6.022169", 0, 0, 0, 0, 0, -1, 0);

all_units [3] = new Array ("yocto", "yocto", 1E-024, 0, 0, 0, 0, 0, 0, 0);

all_units [4] = new Array ("zepto", "zepto", 1E-021, 0, 0, 0, 0, 0, 0, 0);

all_units [5] = new Array ("atto", "atto", 1E-018, 0, 0, 0, 0, 0, 0, 0);

all_units [6] = new Array ("femto", "femto", 1E-015, 0, 0, 0, 0, 0, 0, 0);

all_units [7] = new Array ("pico", "pico", "0.000000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [8] = new array ("nano", "nano", "0.000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [9] = new Array ("micro", "micro", "0.000001", 0, 0, 0, 0, 0, 0, 0);

all_units [10] = new Array ("milli", "milli", "0.001", 0, 0, 0, 0, 0, 0, 0);

all_units [11] = new Array ("centi", "centi", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [12] = new Array ("deci", "deci", "0, 1", 0, 0, 0, 0, 0, 0, 0);

all_units [13] = new Array ("demi", "demi", "0, 5", 0, 0, 0, 0, 0, 0, 0);

all_units [14] = new Array ("semi", "semi", "0, 5", 0, 0, 0, 0, 0, 0, 0);

all_units [15] = new Array ("kibi", "kibi", 8, 0, 0, 0, 0, 0, 0, 0);

all_units [16] = new Array ("deca", "deca", 10.0, 0, 0, 0, 0, 0);

all_units [17] = new Array ("deka", "deka", 10.0, 0, 0, 0, 0, 0);

all_units [18] = new Array ("mebi", "mebi", 22, 0, 0, 0, 0, 0, 0, 0);

all_units [19] = new Array ("gibi", "gibi", 28, 0, 0, 0, 0, 0, 0, 0);

all_units [20] = new Array ("tebi", "tebi", 42, 0, 0, 0, 0, 0, 0, 0);

all_units [21] = new Array ("pebi", "pebi", 48, 0, 0, 0, 0, 0, 0, 0);

all_units [22] = new array ("exbi", "exbi", 62, 0, 0, 0, 0, 0, 0, 0);

all_units [23] = new Array ("hecto", "hecto", 100, 0, 0, 0, 0, 0, 0, 0);

all_units [24] = new Array ("kilo", "kilo", 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [25] = new array ("mega", "mega", 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [26] = new Array ("giga", "Giga", 1000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [27] = new Array ("tera", "Tera", 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [28] = new Array ("peta", "Peta", 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [29] = new Array ("exa", "Exa", 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [30] = new Array ("zetta", "Zetta", 1E + 021, 0, 0, 0, 0, 0, 0, 0);

all_units [31] = new Array ("yotta", "Yotta", 1E + 024, 0, 0, 0, 0, 0, 0, 0);

all_units [32] = new Array ("g0", "g0", "9, 80665", 1, 0, -2, 0, 0, 0, 0);

all_units [33] = new Array ("barn", "barn", 1E-028, 2, 0, 0, 0, 0, 0, 0);

all_units [34] = new Array ("lader", "lader", 1E-028, 2, 0, 0, 0, 0, 0, 0);

all_units [35] = new Array ("er", "er", 100, 2, 0, 0, 0, 0, 0, 0);

all_units [36] = new Array ("ares", "ares", 100, 2, 0, 0, 0, 0, 0, 0);

all_units [37] = new Array ("acre", "acre", "4046.8564224", 2, 0, 0, 0, 0, 0, 0);

all_units [38] = new Array ("acres", "acres", "4046.8564224", 2, 0, 0, 0, 0, 0, 0);

all_units [39] = new Array ("hektar", "hektar", 10000, 2, 0, 0, 0, 0, 0, 0);

all_units [40] = new Array ("hektar", "hektar", 10000, 2, 0, 0, 0, 0, 0, 0);

all_units [41] = new Array ("pf", "pf", "0.000000000001", - 2, -1, 4, 2, 0, 0, 0);

all_units [42] = new Array ("statfarad", "statfarad", "0.000000000001113", - 2, -1, 4, 2, 0, 0, 0);

all_units [43] = new Array ("statfarads", "statfarads", "0.000000000001113", - 2, -1, 4, 2, 0, 0, 0);

all_units [44] = nyt Array ("uf", "uf", "0.000001", - 2, -1, 4, 2, 0, 0, 0);

all_units [45] = new Array ("f", "f", 1, -2, -1, 4, 2, 0, 0, 0);

all_units [46] = new Array ("farad", "farad", 1, -2, -1, 4, 2, 0, 0, 0);

all_units [47] = new Array ("farads", "farads", 1, -2, -1, 4, 2, 0, 0, 0);

all_units [48] = new Array ("abfarad", "abfarad", 1000000000, -2, -1, 4, 2, 0, 0, 0);

all_units [49] = new Array ("abfarads", "abfarads", 1000000000, -2, -1, 4, 2, 0, 0, 0);

all_units [50] = new Array ("elementary charge", "elementary charge", "1.6021892E-019", 0, 0, 1, 1, 0, 0, 0);

all_units [51] = new Array ("eq", "eq", "1.6021892E-019", 0, 0, 1, 1, 0, 0, 0);

all_units [52] = new Array ("statcoul", "statcoul", "0.0000000003336", 0, 0, 1, 1, 0, 0, 0);

all_units [53] = new Array ("statcoulomb", "statcoulomb", "0.0000000003336", 0, 0, 1, 1, 0, 0, 0);

all_units [54] = new Array ("statcoulombs", "statcoulombs", "0.0000000003336", 0, 0, 1, 1, 0, 0, 0);

all_units [55] = new Array ("coul", "Coul", 1, 0, 0, 1, 1, 0, 0, 0);

all_units [56] = new Array ("coulomb", "Coulomb", 1, 0, 0, 1, 1, 0, 0, 0);

all_units [57] = new Array ("coulomb", "C", 1, 0, 0, 1, 1, 0, 0, 0);

all_units [58] = new Array ("abcoul", "abcoul", 10.0, 0, 1, 1, 0, 0, 0);

all_units [59] = new Array ("abcoulomb", "abcoulomb", 10.0, 0, 1, 1, 0, 0, 0);

all_units [60] = new Array ("abcoulombs", "abcoulombs", 10.0, 0, 1, 1, 0, 0, 0);

all_units [61] = new Array ("mho", "mho", 1, -2, -1, 3, 2, 0, 0, 0);

all_units [62] = new Array ("mhos", "mhos", 1, -2, -1, 3, 2, 0, 0, 0);

all_units [63] = new Array ("siemens", "Siemens", 1, -2, -1, 3, 2, 0, 0, 0);

all_units [64] = new Array ("statamp", "statamp", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [65] = new Array ("statampere", "statampere", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [66] = new Array ("statamperes", "statamperes", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [67] = new Array ("statamps", "statamps", "0.0000000003336", 0, 0, 0, 1, 0, 0, 0);

all_units [68] = new Array ("ÂμA", "ÂμA", "0.000001", 0, 0, 0, 1, 0, 0, 0);

all_units [69] = new Array ("mA", "mA", "0.001", 0, 0, 0, 1, 0, 0, 0);

all_units [70] = new Array ("amp", "amp", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [71] = new Array ("Ampere", "Ampere", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [72] = new Array ("Amperes", "Amperes", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [73] = nyt array ("A", "A", 1, 0, 0, 0, 1, 0, 0, 0);

all_units [74] = new Array ("abamp", "abamp", 10.0, 0, 0, 1, 0, 0, 0);

all_units [75] = new Array ("abampere", "abampere", 10.0, 0, 0, 1, 0, 0, 0);

all_units [76] = new Array ("abamperes", "abamperes", 10.0, 0, 0, 1, 0, 0, 0);

all_units [77] = new Array ("abamps", "abamps", 10.0, 0, 0, 1, 0, 0, 0);

all_units [78] = new Array ("bit", "bit", 1, 0, 0, 0, 0, 0, 0, 0);

all_units [79] = new array ("bits", "bits", 1, 0, 0, 0, 0, 0, 0, 0);

all_units [80] = new array ("byte", "byte", 8, 0, 0, 0, 0, 0, 0, 0);

all_units [81] = new array ("bytes", "bytes", 8, 0, 0, 0, 0, 0, 0, 0);

all_units [82] = new Array ("quintillionth", "quintillionth", 1E-018, 0, 0, 0, 0, 0, 0, 0);

all_units [83] = new Array ("quadrillionth", "quadrillionth", 1E-015, 0, 0, 0, 0, 0, 0, 0);

all_units [84] = new Array ("trillionth", "trillionth", "0.000000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [85] = new Array ("billionth", "billionth", "0.000000001", 0, 0, 0, 0, 0, 0, 0);

all_units [86] = new Array ("millionth", "millionth", "0.000001", 0, 0, 0, 0, 0, 0, 0);

all_units [87] = nyt array ("tusind", "tusind", "0, 001", 0, 0, 0, 0, 0, 0, 0);

all_units [88] = new Array ("%", "%", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [89] = new Array ("hundredthed", "hundredthed", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [90] = new Array ("procent", "procent", "0, 01", 0, 0, 0, 0, 0, 0, 0);

all_units [91] = new Array ("tiende", "tiende", "0, 1", 0, 0, 0, 0, 0, 0, 0);

all_units [92] = new Array ("e", "e", "2.71828182845904", 0, 0, 0, 0, 0, 0, 0);

all_units [93] = new Array ("pi", "pi", "3.14159265358979", 0, 0, 0, 0, 0, 0, 0);

all_units [94] = new array ("hundred", "hundred", 100, 0, 0, 0, 0, 0, 0, 0);

all_units [95] = new array ("hundredvis", "hundredvis", 100, 0, 0, 0, 0, 0, 0, 0);

all_units [96] = new Array ("gross", "gross", 144, 0, 0, 0, 0, 0, 0, 0);

all_units [97] = nyt array ("tusind", "tusind", 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [98] = new Array ("tusinder", "tusinder", 1000, 0, 0, 0, 0, 0, 0, 0);

all_units [99] = new array ("million", "million", 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [100] = new Array ("millions", "millions", 1000000, 0, 0, 0, 0, 0, 0, 0);

all_units [101] = new Array ("milliard", "milliard", 1000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [102] = new Array ("milliarder", "milliarder", 1000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [103] = new Array ("billioner", "billioner", 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [104] = new Array ("trillioner", "trillioner", 1000000000000, 0, 0, 0, 0, 0, 0, 0);

all_units [105] = new Array ("quadrillion", "quadrillion", 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [106] = new Array ("quadrillions", "quadrillions", 1E + 015, 0, 0, 0, 0, 0, 0, 0);

all_units [107] = new Array ("quintillion", "quintillion", 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [108] = new Array ("quintillions", "quintillions", 1E + 018, 0, 0, 0, 0, 0, 0, 0);

all_units [109] = new Array ("Ang", "Ang", "0.0000000001", 1, 0, 0, 0, 0, 0, 0);

all_units [110] = new Array ("Angstrom", "Angstrom", "0.0000000001", 1, 0, 0, 0, 0, 0, 0);

all_units [111] = new Array ("Angstroms", "Angstroms", "0.0000000001", 1, 0, 0, 0, 0, 0, 0);

all_units [112] = new Array ("micron", "micron", "0.000001", 1.0, 0, 0, 0, 0, 0);

all_units [113] = new Array ("mm", "mm", "0.001", 1.0, 0, 0, 0, 0, 0);

all_units [114] = new Array ("Âμm", "Âμm", "0.000001", 1.0, 0, 0, 0, 0, 0);

all_units [115] = new Array ("mil", "mil", "0.0000254", 1, 0, 0, 0, 0, 0, 0);

all_units [116] = new Array ("mils", "mils", "0.0000254", 1, 0, 0, 0, 0, 0, 0);

all_units [117] = new Array ("point", "point", "0.000352777777778", 1, 0, 0, 0, 0, 0, 0);

all_units [118] = new Array ("pica", "pica", "0.004233333333333", 1, 0, 0, 0, 0, 0, 0);

all_units [119] = new Array ("cm", "cm", "0, 01", 1, 0, 0, 0, 0, 0, 0);

all_units [120] = new Array ("in", "in", "0, 0254", 1, 0, 0, 0, 0, 0, 0);

all_units [121] = new Array ("inch", "inch", "0, 0254", 1, 0, 0, 0, 0, 0, 0);

all_units [122] = new Array ("tommer", "tommer", "0, 0254", 1, 0, 0, 0, 0, 0, 0);

all_units [123] = new Array ("feet", "feet", "0.3048", 1.0, 0, 0, 0, 0, 0);

all_units [124] = nyt array ("fod", "fod", "0, 3048", 1, 0, 0, 0, 0, 0, 0);

all_units [125] = new Array ("ft", "ft", "0.3048", 1.0, 0, 0, 0, 0, 0);

all_units [126] = new Array ("yard", "yard", "0, 9144", 1, 0, 0, 0, 0, 0, 0);

all_units [127] = new Array ("yards", "yards", "0, 9144", 1, 0, 0, 0, 0, 0, 0);

all_units [128] = new Array ("m", "m", 1, 1, 0, 0, 0, 0, 0, 0);

all_units [129] = new Array ("meter", "meter", 1, 1, 0, 0, 0, 0, 0, 0);

all_units [130] = new array ("meters", "meters", 1, 1, 0, 0, 0, 0, 0, 0);

all_units [131] = new Array ("fathom", "fathom", 18288, 1, 0, 0, 0, 0, 0, 0);

all_units [132] = new Array ("fathoms", "fathoms", 18288, 1, 0, 0, 0, 0, 0, 0);

all_units [133] = new Array ("aborre", "aborre", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [134] = new Array ("perches", "perches", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [135] = new Array ("pole", "pole", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [136] = new Array ("poles", "poles", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [137] = new Array ("rod", "rod", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [138] = new Array ("stænger", "stænger", 50292, 1, 0, 0, 0, 0, 0, 0);

all_units [139] = new Array ("furlong", "furlong", "201.168", 1, 0, 0, 0, 0, 0, 0);

all_units [140] = new Array ("furlongs", "furlongs", "201.168", 1.0, 0, 0, 0, 0, 0);

all_units [141] = new Array ("km", "km", 1000, 1, 0, 0, 0, 0, 0, 0);

all_units [142] = new Array ("mi", "mi", "1609.344", 1, 0, 0, 0, 0, 0, 0);

all_units [143] = new Array ("mile", "mile", "1609.344", 1.0, 0, 0, 0, 0, 0);

all_units [144] = new Array ("miles", "miles", "1609.344", 1.0.0, 0, 0, 0, 0);

all_units [145] = ny Array ("sømil", "sømil", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [146] = new Array ("nautiske miles", "nautiske miles", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [147] = new Array ("nauticalmile", "nauticalmile", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [148] = new Array ("nauticalmiles", "nauticalmiles", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [149] = new Array ("NM", "NM", 1852, 1, 0, 0, 0, 0, 0, 0);

all_units [150] = new Array ("rp", "rp", 6356912, 1, 0, 0, 0, 0, 0, 0);

all_units [151] = nyt array ("re", "re", 6378388, 1, 0, 0, 0, 0, 0, 0);

all_units [152] = nyt array ("astronomisk enhed", "astronomisk enhed", 149598000000, 1, 0, 0, 0, 0, 0, 0);

all_units [153] = new Array ("au", "au", 149598000000, 1, 0, 0, 0, 0, 0, 0);

all_units [154] = New Array ("lysår", "lysår", "9.46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [155] = new Array ("lysår", "lysår", "9.46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [156] = new Array ("lightyear", "lightyear", "9, 46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [157] = new Array ("lightyears", "lightyears", "9, 46E + 015", 1, 0, 0, 0, 0, 0, 0);

all_units [158] = new Array ("ly", "ly", "9.46E + 015", 1.0, 0, 0, 0, 0, 0);

all_units [159] = new Array ("parsec", "parsec", "3.083E + 016", 1, 0, 0, 0, 0, 0, 0);

all_units [160] = new Array ("parsecs", "parsecs", "3.083E + 016", 1, 0, 0, 0, 0, 0, 0);

all_units [161] = new Array ("rad", "rad", "0, 01", 2, 0, -2, 0, 0, 0, 0);

all_units [162] = new Array ("rem", "rem", "0, 01", 2, 0, -2, 0, 0, 0, 0);

all_units [163] = new array ("grå", "grå", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [164] = new Array ("gy", "gy", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [165] = new Array ("Sievert", "Sievert", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [166] = new Array ("Sv", "Sv", 1, 2, 0, -2, 0, 0, 0, 0);

all_units [167] = new Array ("abvolt", "abvolt", "0.00000001", 2, 1, -3, -1, 0, 0, 0);

all_units [168] = new Array ("abvolts", "abvolts", "0.00000001", 2.1, -3, -1.0.0.0);

all_units [169] = nyt array ("ÂμV", "ÂV", "0.000001", 2, 1, -3, -1, 0, 0, 0);

all_units [170] = new Array ("mV", "mV", "0.001", 2.1, -3, -1.0, 0, 0);

all_units [171] = new Array ("V", "V", 1, 2, 1, -3, -1, 0, 0, 0);

all_units [172] = new Array ("Volt", "Volt", 1, 2, 1, -3, -1, 0, 0, 0);

all_units [173] = new Array ("volt", "Volts", 1, 2, 1, -3, -1, 0, 0, 0);

all_units [174] = new Array ("statvolt", "statvolt", "299, 8", 2, 1, -3, -1, 0, 0, 0);

all_units [175] = new Array ("statvolts", "statvolts", "299, 8", 2, 1, -3, -1, 0, 0, 0);

all_units [176] = new array ("electron volt", "electron volt", "1, 60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [177] = new array ("electron-volt", "electron-volt", "1, 60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [178] = new array ("electronvolt", "electronvolt", "1, 60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [179] = new array ("electronvolts", "electronvolts", "1, 60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [180] = new Array ("ev", "eV", "1, 60217733E-019", 2, 1, -2, 0, 0, 0, 0);

all_units [181] = new Array ("mev", "meV", "0.000000000000160217733", 2, 1, -2, 0, 0, 0, 0);

all_units [182] = nyt array ("gev", "geV", "0.000000000160217733", 2, 1, -2, 0, 0, 0, 0);

all_units [183] ​​= nyt Array ("erg", "erg", "0.0000001", 2, 1, -2, 0, 0, 0, 0);

all_units [184] = new Array ("ergs", "ergs", "0.0000001", 2, 1, -2, 0, 0, 0, 0);

all_units [185] = new Array ("teV", "teV", "0.000000160217733", 2, 1, -2, 0, 0, 0, 0);

all_units [186] = new Array ("Joule", "J", 1, 2, 1, -2, 0, 0, 0, 0);

all_units [187] = new Array ("joule", "Joule", 1, 2, 1, -2, 0, 0, 0, 0);

all_units [188] = new Array ("joules", "Joules", 1, 2, 1, -2, 0, 0, 0, 0);

all_units [189] = new Array ("cal", "Cal", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [190] = new Array ("calorie", "Calorie", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [191] = new Array ("kalorier", "kalorier", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [192] = new Array ("britisk-termisk enhed", "britisk-termisk enhed", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [193] = New Array ("britisk-termiske enheder", "britisk-termiske enheder", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [194] = new Array ("britishthermalunit", "britishthermalunit", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [195] = new Array ("britishthermalunits", "britishthermalunits", "1055.056", 2.1, -2.0, 0, 0, 0);

all_units [196] = new Array ("Btu", "Btu", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [197] = new Array ("Btus", "Btus", "1055.056", 2, 1, -2, 0, 0, 0, 0);

all_units [198] = new Array ("kcal", "kcal", 4184, 2, 1, -2, 0, 0, 0, 0);

all_units [199] = new Array ("kwh", "kwh", 3600000, 2, 1, -2, 0, 0, 0, 0);

all_units [200] = new Array ("dyne", "dyne", 10, 1, 1, -2, 0, 0, 0, 0);

all_units [201] = new Array ("dynes", "dynes", 10, 1, 1, -2, 0, 0, 0, 0);

all_units [202] = new Array ("gram-force", "gram-force", "0.00980665", 1, 1, -2, 0, 0, 0, 0);

all_units [203] = new Array ("gramvægt", "gramvægt", "0.00980665", 1, 1, -2, 0, 0, 0, 0);

all_units [204] = new Array ("ounce force", "ounce force", "0.278013850953781", 1, 1, -2, 0, 0, 0, 0);

all_units [205] = new Array ("ozf", "ozf", "0.278013850953781", 1, 1, -2, 0, 0, 0, 0);

all_units [206] = new Array ("newton", "newton", 1, 1, 1, -2, 0, 0, 0, 0);

all_units [207] = new Array ("N", "N", 1, 1, 1, -2, 0, 0, 0, 0);

all_units [208] = new Array ("nt", "nt", 1, 1, 1, -2, 0, 0, 0, 0);

all_units [209] = new Array ("lb", "lb", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [210] = new Array ("lbf", "lbf", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [211] = new Array ("lbs", "lbs", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [212] = new Array ("pound", "pound", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [213] = new Array ("pound-force", "pound-force", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [214] = new Array ("pound-weight", "pound-weight", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [215] = new Array ("pounds", "pounds", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [216] = new Array ("pounds-force", "pounds-force", "4.4482216152605", 1, 1, -2, 0, 0, 0, 0);

all_units [217] = new Array ("kgf", "kgf", "9.80665", 1, 1, -2, 0, 0, 0, 0);

all_units [218] = new Array ("rpm", "rpm", "0, 016666666666667", 0, 0, -1, 0, 0, 0, 0);

all_units [219] = new Array ("becquerel", "becquerel", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [220] = new Array ("Bq", "Bq", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [221] = new Array ("hertz", "hertz", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [222] = new array ("Hz", "Hz", 1, 0, 0, -1, 0, 0, 0, 0);

all_units [223] = new Array ("abhenry", "abhenry", "0.000000001", 2, 1, -2, -2, 0, 0, 0);

all_units [224] = new Array ("abhenrys", "abhenrys", "0.000000001", 2, 1, -2, -2, 0, 0, 0);

all_units [225] = new Array ("uH", "uH", "0.000001", 2, 1, -2, -2, 0, 0, 0);

all_units [226] = new Array ("mH", "mH", "0.001", 2.1, -2, -2.0.0.0);

all_units [227] = new Array ("Henry", "Henry", 1, 2, 1, -2, -2, 0, 0, 0);

all_units [228] = new Array ("Henrys", "H", 1, 2, 1, -2, -2, 0, 0, 0);

all_units [229] = new Array ("stathenry", "stathenry", 898700000000, 2, 1, -2, -2, 0, 0, 0);

all_units [230] = new Array ("stathenrys", "stathenrys", 898700000000, 2, 1, -2, -2, 0, 0, 0);

all_units [231] = new Array ("candela", "candela", 1, 0, 0, 0, 0, 0, 1, 1);

all_units [232] = new Array ("candela", "candela", 1, 0, 0, 0, 0, 0, 1, 1);

all_units [233] = new Array ("stearinlys", "stearinlys", 1, 0, 0, 0, 0, 0, 0, 1);

all_units [234] = new Array ("stearinlys", "stearinlys", 1, 0, 0, 0, 0, 0, 1, 1);

all_units [235] = new Array ("cd", "cd", 1, 0, 0, 0, 0, 0, 0, 1);

all_units [236] = new Array ("gauss", "gauss", "0, 0001", 1, 0, -2, -1, 0, 0, 0);

all_units [237] = new Array ("tesla", "tesla", 1, 1, 0, -2, -1, 0, 0, 0);

all_units [238] = new Array ("teslas", "T", 1, 1, 0, -2, -1, 0, 0, 0);

all_units [239] = new Array ("maxwell", "maxwell", "0.00000001", 2, 1, -2, -1, 0, 0, 0);

all_units [240] = new Array ("maxwells", "maxwells", "0.00000001", 2.1, -2, -1.0.0.0);

all_units [241] = new Array ("wb", "Wb", 1, 2, 1, -2, -1, 0, 0, 0);

all_units [242] = new Array ("weber", "weber", 1, 2, 1, -2, -1, 0, 0, 0);

all_units [243] = new Array ("webers", "webers", 1, 2, 1, -2, -1, 0, 0, 0);

all_units [244] = new Array ("amu", "amu", "1, 6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [245] = New Array ("atommasseenhed", "atommasseenhed", "1, 6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [246] = new array ("atommasseenheder", "atommasseenheder", "1, 6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [247] = nyt array ("u", "u", "1, 6605402E-027", 0, 1, 0, 0, 0, 0, 0);

all_units [248] = new Array ("ug", "ug", "0.000000001", 0, 1, 0, 0, 0, 0, 0);

all_units [249] = new Array ("mg", "mg", "0.000001", 0, 1, 0, 0, 0, 0, 0);

all_units [250] = new Array ("cg", "cg", "0.00001", 0, 1, 0, 0, 0, 0, 0);

all_units [251] = new Array ("grain", "grain", "0.0000648", 0, 1, 0, 0, 0, 0, 0);

all_units [252] = new Array ("korn", "korn", "0.0000648", 0, 1, 0, 0, 0, 0, 0);

all_units [253] = nyt array ("dg", "dg", "0, 0001", 0, 1, 0, 0, 0, 0, 0);

all_units [254] = new Array ("carat", "carat", "0.0002", 0, 1, 0, 0, 0, 0, 0);

all_units [255] = new Array ("carats", "carats", "0.0002", 0, 1, 0, 0, 0, 0, 0);

all_units [256] = new Array ("karat", "karat", "0.0002", 0, 1, 0, 0, 0, 0, 0);

all_units [257] = new Array ("karats", "karats", "0.0002", 0, 1, 0, 0, 0, 0, 0);

all_units [258] = nyt array ("j-punkt", "j-punkt", "0, 0004", 0, 1, 0, 0, 0, 0, 0);

all_units [259] = new Array ("gm", "gm", "0.001", 0, 1, 0, 0, 0, 0, 0);

all_units [260] = new Array ("gram", "gram", "0.001", 0, 1, 0, 0, 0, 0, 0);

all_units [261] = new Array ("gram", "gram", "0.001", 0, 1, 0, 0, 0, 0, 0);

all_units [262] = new Array ("scruple", "scruple", "0.001296", 0, 1, 0, 0, 0, 0, 0);

all_units [263] = new Array ("scruples", "scruples", "0.001296", 0, 1, 0, 0, 0, 0, 0);

all_units [264] = new Array ("pennyweight", "pennyweight", "0.001555", 0, 1, 0, 0, 0, 0, 0);

all_units [265] = new Array ("pennyweights", "pennyweights", "0.001555", 0, 1, 0, 0, 0, 0, 0);

all_units [266] = new Array ("dram", "dram", "0.0017718451953125", 0, 1, 0, 0, 0, 0, 0);

all_units [267] = new Array ("drams", "drams", "0.0017718451953125", 0, 1, 0, 0, 0, 0, 0);

all_units [268] = new Array ("dag", "dag", "0, 01", 0, 1, 0, 0, 0, 0, 0);

all_units [269] = new Array ("ounce", "ounce", "0.028349523125", 0, 1, 0, 0, 0, 0, 0);

all_units [270] = new Array ("ounces", "ounces", "0.028349523125", 0, 1, 0, 0, 0, 0, 0);

all_units [271] = nyt array ("oz", "oz", "0, 028349523125", 0, 1, 0, 0, 0, 0, 0);

all_units [272] = new Array ("ounce-troy", "ounce-troy", "0, 031103", 0, 1, 0, 0, 0, 0, 0);

all_units [273] = new Array ("ounces-troy", "ounces-troy", "0, 031103", 0, 1, 0, 0, 0, 0, 0);

all_units [274] = new Array ("troy-ounce", "troy-ounce", "0, 031103", 0, 1, 0, 0, 0, 0, 0);

all_units [275] = new Array ("troy-unse", "troy-unse", "0, 031103", 0, 1, 0, 0, 0, 0, 0);

all_units [276] = nyt array ("hg", "hg", "0, 1", 0, 1, 0, 0, 0, 0, 0);

all_units [277] = new Array ("troy-pound", "troy-pound", "0, 373", 0, 1, 0, 0, 0, 0, 0);

all_units [278] = new Array ("troy-pounds", "troy-pounds", "0, 373", 0, 1, 0, 0, 0, 0, 0);

all_units [279] = new Array ("lbm", "lbm", "0.45359237", 0, 1, 0, 0, 0, 0, 0);

all_units [280] = new Array ("lbms", "lbms", "0.45359237", 0, 1, 0, 0, 0, 0, 0);

all_units [281] = new Array ("pund-masse", "pund-masse", "0.45359237", 0, 1, 0, 0, 0, 0, 0);

all_units [282] = new Array ("pounds-mass", "pounds-mass", "0.45359237", 0, 1, 0, 0, 0, 0, 0);

all_units [283] = new Array ("kg", "kg", 1, 0, 1, 0, 0, 0, 0, 0);

all_units [284] = new Array ("stone", "stone", "6, 35029318", 0, 1, 0, 0, 0, 0, 0);

all_units [285] = new Array ("sten", "sten", "6.35029318", 0, 1, 0, 0, 0, 0, 0);

all_units [286] = new Array ("slug", "slug", "14.5939029372064", 0, 1, 0, 0, 0, 0, 0);

all_units [287] = new Array ("slugs", "slugs", "14.5939029372064", 0, 1, 0, 0, 0, 0, 0);

all_units [288] = new Array ("hundredweight", "hundredweight", "45, 359237", 0, 1, 0, 0, 0, 0, 0);

all_units [289] = new array ("hundredweights", "hundredweights", "45, 359237", 0, 1, 0, 0, 0, 0, 0);

all_units [290] = new Array ("shortton", "shortton", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [291] = new Array ("short tons", "short tons", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [292] = nyt array ("ton", "ton", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [293] = nyt array ("tons", "tons", "907.18474", 0, 1, 0, 0, 0, 0, 0);

all_units [294] = new Array ("metric-ton", "metric-ton", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [295] = new Array ("metric tons", "metric tons", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [296] = nyt array ("ton", "ton", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [297] = new array ("tons", "tons", 1000, 0, 1, 0, 0, 0, 0, 0);

all_units [298] = new Array ("longton", "longton", "1016.0469088", 0, 1, 0, 0, 0, 0, 0);

all_units [299] = new Array ("long tons", "long tons", "1016.0469088", 0, 1, 0, 0, 0, 0, 0);

all_units [300] = new Array ("h", "h", "6, 626196E-034", 2, 1, -3, 0, 0, 0, 0);

all_units [301] = new Array ("W", "W", 1, 2, 1, -3, 0, 0, 0, 0);

all_units [302] = new array ("watt", "watt", 1, 2, 1, -3, 0, 0, 0, 0);

all_units [303] = new Array ("Watts", "Watts", 1, 2, 1, -3, 0, 0, 0, 0);

all_units [304] = ny Array ("hestekræfter", "hestekræfter", "745.69987158227", 2, 1, -3, 0, 0, 0, 0);

all_units [305] = new Array ("hp", "hp", "745.69987158227", 2, 1, -3, 0, 0, 0, 0);

all_units [306] = new Array ("Pa", "Pa", 1, -1, 1, -2, 0, 0, 0, 0);

all_units [307] = new Array ("Pascal", "Pascal", 1, -1, 1, -2, 0, 0, 0, 0);

all_units [308] = new Array ("torr", "torr", "133.322368421053", - 1, 1, -2, 0, 0, 0, 0);

all_units [309] = new Array ("psi", "psi", "6894.75729316836", - 1, 1, -2, 0, 0, 0, 0);

all_units [310] = new Array ("bar", "bar", 100000, -1, 1, -2, 0, 0, 0, 0);

all_units [311] = new Array ("bars", "bars", 100000, -1, 1, -2, 0, 0, 0, 0);

all_units [312] = new Array ("atm", "atm", 101325, -1, 1, -2, 0, 0, 0, 0);

all_units [313] = new Array ("atmosfære", "atmosfære", 101325, -1, 1, -2, 0, 0, 0, 0);

all_units [314] = new Array ("abohm", "abohm", "0.000000001", 2, 1, -3, -2, 0, 0, 0);

all_units [315] = new Array ("abohms", "abohms", "0.000000001", 2, 1, -3, -2, 0, 0, 0);

all_units [316] = new Array ("Ohm", "Ohm", 1, 2, 1, -3, -2, 0, 0, 0);

all_units [317] = new Array ("Ohms", "Ohms", 1, 2, 1, -3, -2, 0, 0, 0);

all_units [318] = new Array ("kilohm", "kilohm", 1000, 2, 1, -3, -2, 0, 0, 0);

all_units [319] = new Array ("kilohms", "kilohms", 1000, 2, 1, -3, -2, 0, 0, 0);

all_units [320] = new array ("megohm", "megohm", 1000000, 2, 1, -3, -2, 0, 0, 0);

all_units [321] = new Array ("megohms", "megohms", 1000000, 2, 1, -3, -2, 0, 0, 0);

all_units [322] = new Array ("statohm", "statohm", 898700000000, 2, 1, -3, -2, 0, 0, 0);

all_units [323] = new Array ("statohms", "statohms", 898700000000, 2, 1, -3, -2, 0, 0, 0);

all_units [324] = new Array ("kph", "kph", "0.277777777777778", 1, 0, -1, 0, 0, 0, 0);

all_units [325] = nyt array ("fps", "fps", "0, 3048", 1, 0, -1, 0, 0, 0, 0);

all_units [326] = new Array ("mph", "mph", "0, 4704", 1, 0, -1, 0, 0, 0, 0);

all_units [327] = new Array ("knot", "kn", "0.514444444444444", 1, 0, -1, 0, 0, 0, 0);

all_units [328] = new Array ("knots", "kt", "0.514444444444444", 1, 0, -1, 0, 0, 0, 0);

all_units [329] = new Array ("mps", "mps", 1, 1, 0, -1, 0, 0, 0, 0);

all_units [330] = new Array ("kps", "kps", 1000, 1, 0, -1, 0, 0, 0, 0);

all_units [331] = new Array ("c", "c", 299792458, 1, 0, -1, 0, 0, 0, 0);

all_units [332] = new Array ("speed-of-light", "speed-of-light", 299792458, 1, 0, -1, 0, 0, 0, 0);

all_units [333] = new Array ("mol", "mol", 1, 0, 0, 0, 0, 0, 1, 0);

all_units [334] = new Array ("mol", "mol", 1, 0, 0, 0, 0, 0, 1, 0);

all_units [335] = new Array ("mol", "mol", 1, 0, 0, 0, 0, 0, 1, 0);

all_units [336] = new Array ("grad-rankine", "grad-rankine", "0, 555555555555556", 0, 0, 0, 0, 0, 0, 0);

all_units [337] = new Array ("grader-rankine", "grader-rankine", "0, 555555555555556", 0, 0, 0, 0, 0, 0, 0);

all_units [338] = new Array ("grad-kelvin", "grad-kelvin", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [339] = new Array ("grad-kelvins", "grad-kelvins", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [340] = new Array ("degrees-kelvin", "degrees-kelvin", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [341] = new Array ("K", "K", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [342] = new Array ("Kelvin", "Kelvin", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [343] = new Array ("Kelvin", "Kelvin", 1, 0, 0, 0, 0, 1, 0, 0);

all_units [344] = new Array ("ps", "ps", "0.000000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [345] = new Array ("psec", "psec", "0.000000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [346] = new Array ("psecs", "psecs", "0.000000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [347] = new Array ("ns", "ns", "0.000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [348] = new array ("nsec", "nsec", "0.000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [349] = new Array ("nsecs", "nsecs", "0.000000001", 0, 0, 1, 0, 0, 0, 0);

all_units [350] = new Array ("Âμs", "Âμs", "0.000001", 0.0, 1, 0, 0, 0, 0);

all_units [351] = new Array ("Âμsec", "Âμsec", "0.000001", 0, 0, 1, 0, 0, 0, 0);

all_units [352] = nyt array ("Âμsecs", "Âμsecs", "0.000001", 0, 0, 1, 0, 0, 0, 0);

all_units [353] = nyt array ("ms", "ms", "0.001", 0, 0, 1, 0, 0, 0, 0);

all_units [354] = nyt array ("msec", "msec", "0.001", 0, 0, 1, 0, 0, 0, 0);

all_units [355] = new Array ("msecs", "msecs", "0.001", 0, 0, 1, 0, 0, 0, 0);

all_units [356] = new Array ("s", "s", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [357] = new Array ("sec", "sec", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [358] = new Array ("second", "second", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [359] = nyt array ("sekunder", "sekunder", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [360] = new Array ("secs", "secs", 1, 0, 0, 1, 0, 0, 0, 0);

all_units [361] = new Array ("min", "min", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [362] = new Array ("minutter", "minutter", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [363] = new Array ("minut", "minut", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [364] = new Array ("minutes", "minutes", 60, 0, 0, 1, 0, 0, 0, 0);

all_units [365] = new Array ("time", "time", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [366] = new Array ("timer", "timer", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [367] = new Array ("hr", "hr", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [368] = new Array ("hrs", "hrs", 3600, 0, 0, 1, 0, 0, 0, 0);

all_units [369] = new Array ("dag", "dag", 86400, 0, 0, 1, 0, 0, 0, 0);

all_units [370] = new Array ("dage", "dage", 86400, 0, 0, 1, 0, 0, 0, 0);

all_units [371] = new Array ("uge", "uge", 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [372] = new Array ("uger", "uger", 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [373] = new Array ("wk", "wk", 604800, 0, 0, 1, 0, 0, 0, 0);

all_units [374] = new Array ("fortnight", "fortnight", 1209600, 0, 0, 1, 0, 0, 0, 0);

all_units [375] = new Array ("fortnights", "fortnights", 1209600, 0, 0, 1, 0, 0, 0, 0);

all_units [376] = new Array ("mon", "mon", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [377] = new Array ("mons", "mons", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [378] = new Array ("month", "month", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [379] = new Array ("months", "months", 2629800, 0, 0, 1, 0, 0, 0, 0);

all_units [380] = new Array ("år", "år", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [381] = new Array ("år", "år", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [382] = new Array ("yr", "yr", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [383] = new Array ("yrs", "yrs", 31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [384] = new Array ("score", "score", 631152000, 0, 0, 1, 0, 0, 0, 0);

all_units [385] = new Array ("scores", "scores", 631152000, 0, 0, 1, 0, 0, 0, 0);

all_units [386] = new Array ("århundreder", "århundreder", 3155760000, 0, 0, 1, 0, 0, 0, 0);

all_units [387] = new Array ("århundrede", "århundrede", 3155760000, 0, 0, 1, 0, 0, 0, 0);

all_units [388] = new Array ("millenia", "millenia", 31557600000, 0, 0, 1, 0, 0, 0, 0);

all_units [389] = new Array ("millenium", "millenium", 31557600000, 0, 0, 1, 0, 0, 0, 0);

all_units [390] = new Array ("foot-pound", "foot-pound", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [391] = new Array ("foot-pounds", "foot-pounds", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [392] = new Array ("footpound", "footpound", "1, 3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [393] = new Array ("footpounds", "footpounds", "1, 3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [394] = nyt array ("ft-lb", "ft-lb", "1, 3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [395] = new Array ("ftlb", "ftlb", "1.3558179483314", 2, 1, -2, 0, 0, 0, 0);

all_units [396] = new Array ("minim", "minim", "0.000000059194", 3, 0, 0, 0, 0, 0, 0);

all_units [397] = new Array ("minims", "minims", "0.000000059194", 3, 0, 0, 0, 0, 0, 0);

all_units [398] = new Array ("cc", "cc", "0.000001", 3, 0, 0, 0, 0, 0, 0);

all_units [399] = nyt array ("ml", "ml", "0.000001", 3, 0, 0, 0, 0, 0, 0);

all_units [400] = new Array ("fluidram", "fluidram", "0.0000035516", 3, 0, 0, 0, 0, 0, 0);

all_units [401] = new Array ("fluidrams", "fluidrams", "0.0000035516", 3, 0, 0, 0, 0, 0, 0);

all_units [402] = new Array ("teske", "teske", "0.00000492892159375", 3, 0, 0, 0, 0, 0, 0);

all_units [403] = new Array ("teskefulde", "teskefulde", "0.00000492892159375", 3, 0, 0, 0, 0, 0, 0);

all_units [404] = new Array ("tsp", "tsp", "0.00000492892159375", 3, 0, 0, 0, 0, 0, 0);

all_units [405] = new Array ("cl", "cl", "0.00001", 3, 0, 0, 0, 0, 0, 0);

all_units [406] = new Array ("spiseske", "spiseske", "0.00001478676478125", 3, 0, 0, 0, 0, 0, 0);

all_units [407] = new Array ("spiseskefulde", "spiseskeder", "0.00001478676478125", 3, 0, 0, 0, 0, 0, 0);

all_units [408] = new Array ("tbsp", "tbsp", "0.00001478676478125", 3, 0, 0, 0, 0, 0, 0);

all_units [409] = new Array ("floz", "floz", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [410] = New Array ("fluid-ounce", "fluid-ounce", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [411] = new Array ("fluid-ounces", "fluid-ounces", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [412] = new Array ("fluidounce", "fluidounce", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [413] = new Array ("fluidounces", "fluidounces", "0.0000295735295625", 3, 0, 0, 0, 0, 0, 0);

all_units [414] = new Array ("dl", "dl", "0, 0001", 3, 0, 0, 0, 0, 0, 0);

all_units [415] = new Array ("gill", "gill", "0.00011829411825", 3, 0, 0, 0, 0, 0, 0);

all_units [416] = new Array ("gills", "gills", "0.00011829411825", 3, 0, 0, 0, 0, 0, 0);

all_units [417] = new Array ("cup", "cup", "0.0002365882365", 3, 0, 0, 0, 0, 0, 0);

all_units [418] = new array ("cups", "cups", "0.0002365882365", 3, 0, 0, 0, 0, 0, 0);

all_units [419] = new Array ("pint", "pint", "0.000473176473", 3, 0, 0, 0, 0, 0, 0);

all_units [420] = new Array ("pints", "pints", "0.000473176473", 3, 0, 0, 0, 0, 0, 0);

all_units [421] = new Array ("pt", "pt", "0.000473176473", 3, 0, 0, 0, 0, 0, 0);

all_units [422] = nyt array ("femte", "femte", "0, 0007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units [423] = new Array ("fifths", "fifths", "0.0007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units [424] = new Array ("qt", "qt", "0.000946352946", 3, 0, 0, 0, 0, 0, 0);

all_units [425] = new Array ("quart", "quart", "0.000946352946", 3, 0, 0, 0, 0, 0, 0);

all_units [426] = new Array ("quarts", "quarts", "0.000946352946", 3, 0, 0, 0, 0, 0, 0);

all_units [427] = nyt array ("l", "l", "0.001", 3, 0, 0, 0, 0, 0, 0);

all_units [428] = nyt array ("liter", "liter", "0.001", 3, 0, 0, 0, 0, 0, 0);

all_units [429] = nyt array ("L", "L", "0.001", 3, 0, 0, 0, 0, 0, 0);

all_units [430] = new Array ("gal", "gal", "0.003785411784", 3, 0, 0, 0, 0, 0, 0);

all_units [431] = new array ("gallon", "gallon", "0.003785411784", 3, 0, 0, 0, 0, 0, 0);

all_units [432] = new Array ("gallons", "gallons", "0.003785411784", 3, 0, 0, 0, 0, 0, 0);

all_units [433] = new Array ("peck", "peck", "0.007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units [434] = new Array ("pecks", "pecks", "0.007570823568", 3, 0, 0, 0, 0, 0, 0);

all_units [435] = new Array ("bushel", "bushel", "0.030283294272", 3, 0, 0, 0, 0, 0, 0);

all_units [436] = new Array ("bushels", "bushels", "0.030283294272", 3, 0, 0, 0, 0, 0, 0);

all_units [437] = new Array ("Angstrom", "...", "1e-10", 1, 0, 0, 0, 0, 0, 0);

all_units [438] = new Array ("Degree Celcius", "° C", 0, 0, 0, 0, 0, 1, 0, 0);

all_units [439] = new Array ("Degree Farenheit", "° F", "1.8", 0, 0, 0, 0, 1, 0, 0);

all_units [440] = new Array ("siemens", "S", 1, -2, -1, 3, 2, 0, 0, 0);

funktion min (a, b) {hvis (a

funktion max (a, b) {hvis (a> b) returnere (a); ellers returnere (b);}

funktion analyse (coef, str) // ============================= splits enheder i grundlæggende SI enheder

{

var pos_dot;

var pos_slash;

var pos;

var enhed;

var eksponent;

var invert_next = 0;

var list_units_in = new Array;

var table_base = nyt array (coef, 0, 0, 0, 0, 0, 0, 0);

str = str + ".";

var i = 0;

mens (str.length> 1) // for hver enhed i enhedsindgangsstrengen

{

pos_dot = str.indexOf (".");

pos_slash = str.indexOf ("/");

hvis (pos_dot == -1 || pos_slash == -1)

pos = max (pos_dot, pos_slash);

andet

pos = min (max (pos_dot, 0), max (pos_slash, 0));

list_units_in [i] = str.substring (0, pos);

str = str.substring (pos + 1, str.length);

pos_exp = list_units_in [i] .indexOf ("^");

hvis (pos_exp == -1) // hvis der ikke er eksponent

{

enhed = list_units_in [i];

eksponent = 1;

}

ellers // der er en eksponent

{

enhed = list_units_in [i] .ubstring (0, pos_exp);

exponent = list_units_in [i] .ubstring (pos_exp + 1, list_units_in [i] .length);

}

// hvis der er en / efter enheden, skal næste eksponent omdannes

hvis (invert_next) exponent = -exponent;

hvis (pos == pos_slash) invert_next = 1; ellers invert_next = 0;

table_base_unit = fetch_unit (enhed); // få SI-ækvivalenten for den valgte enhed

hvis (table_base_unit) // hvis fundet i listen

{

table_base [0] = table_base [0] * Math.pow (table_base_unit [2], eksponent);

for (j = 1; j <8; j ++) // på incrémente les exposants des unitsés de base

{

table_base [j] = table_base [j] + (eksponent * table_base_unit [j + 2]);

}

}

ellers returnere (0); // der er et problem

i = i + 1;

}

returnere (table_base);

}

funktion fetch_unit (symbol) // ============================= hentes SI ækvivalenter af en enhed

{

k = 1;

mens (all_units [k])

{

hvis (all_units [k] [1] == symbol) returnerer (all_units [k]); // fundet!

k = k + 1;

}

tilbagevenden (0); // ikke fundet

}

funktion exp_nice (streng) // ============================= erstatter ^ 2 med ²

{

string = string.replace ("^ 2", "²");

string = string.replace ("^ 2", "²");

string = string.replace ("^ 2", "²");

string = string.replace ("^ 2", "²");

string = string.replace ("^ 3", "³");

string = string.replace ("^ 3", "³");

string = string.replace ("^ 3", "³");

returnere (streng);

}

funktion exp_clean (streng) // ============================= erstatte ² med ^ 2

{

string = string.replace ("²", "^ 2");

string = string.replace ("²", "^ 2");

string = string.replace ("²", "^ 2");

string = string.replace ("²", "^ 2");

string = string.replace ("³", "^ 3");

string = string.replace ("³", "^ 3");

string = string.replace ("³", "^ 3");

returnere (streng);

}

funktion display_unit (base_values, base) // ============================== Vis resultater

{

hvis (base) // hvis grundlæggende SI enheder er påkrævet

{

var str_display = "";

for (p = 1; p <8; p ++) // for m, kg, s, A, K, mol, cd

{

hvis (base_values ​​[p] == 1)

{

str_display = "." + all_units [0] [p + 2] + str_display;

}

hvis (base_values ​​[p]> 1)

{

str_display = "." + all_units [0] [p + 2] + "^" + base_values ​​[p] + str_display;

}

hvis (base_values ​​[p] == -1)

{

str_display = str_display + "/" + all_units [0] [p + 2];

}

hvis (base_values ​​[p] <-1)

{

str_display = str_display + "/" + all_units [0] [p + 2] + "^" + Math.abs (base_values ​​[p]);

}

}

hvis (str_display.substring (0, 1) == "/") // hvis første eksponent er negativ

str_display = "1" + str_display

andet

str_display = str_display.substring (1, str_display.length);

}

ellers // forlade enheder som det er

{

str_display = document.forms [0] .units_out.value;

}

str_display = exp_nice (str_display);

document.forms [0] .units_out.value = str_display;

document.forms [0] .quantity_out.value = base_values ​​[0];

}

funktion konvertere () // ============================== Hovedfunktion

{

var units_base_in;

var units_base_out;

if (document.forms [0] .quantity_in.value == "") document.forms [0] .quantity_in.value = 1;

if (document.forms [0] .units_in.value == "") {document.forms [0] .units_in.value = "???"; Afslut;}

document.forms [0] .units_in.value = exp_clean (document.forms [0] .units_in.value);

document.forms [0] .units_out.value = exp_clean (document.forms [0] .units_out.value);

units_base_in = analysere (document.forms [0] .quantity_in.value, document.forms [0] .units_in.value);

if (document.forms [0] .units_out.value! = "") // hvis der anmodes om specifikke enheder for resultatet

{

units_base_out = analysere (1, document.forms [0] .units_out.value);

if (units_base_out) // hvis enhederne findes i databasen

{

hvis (units_base_out [1]! = units_base_in [1]

|| units_base_out [2]! = units_base_in [2]

|| units_base_out [3]! = units_base_in [3]

|| units_base_out [4]! = units_base_in [4]

|| units_base_out [5]! = units_base_in [5]

|| units_base_out [6]! = units_base_in [6]

|| units_base_out [7]! = units_base_in [7]) // hvis enheder ikke er kompatible

display_unit (units_base_in, 1);

ellers // alt er OK

{

units_base_in [0] = units_base_in [0] / units_base_out [0];

display_unit (units_base_in, 0);

}

}

ellers // enhed ikke fundet

display_unit (units_base_in, 1);

}

ellers // ingen specifikke enheder anmodet om

display_unit (units_base_in, 1);

}

funktion init_form () // ============================ Initialisering af formularen

{

document.forms [0] .quantity_in.value = "";

document.forms [0] .units_in.value = "mph";

document.forms [0] .quantity_out.value = "";

document.forms [0] .units_out.value = "";

}

function list_units () // ============================== Viser en klikbar liste over enheder til rådighed

{

var n = 1;

var list = nyt Array;

mens (all_units [n])

{

liste [n-1] = all_units [n] [1];

n = n + 1;

}

list.sort ();

n = 0;

mens (liste [n])

{

document.write (" ");

document.write (liste [n]);

document.write (", ");

n = n + 1;

}

}

// ============================ Afslutning af scripts

Universal Converter

td {font-family: Arial; skrifttypestørrelse: 10px; tekst-align: center;}

.red {farve: # ff0000;}


'onClick = "Javascript: konverter ();">

1mph eksempler

felter i sort

er udfyldt af brugeren

felter i rødt

er resultaterne

0, 44704Frk
1mi / time0, 44704Frk
1mi.hr ^ -10, 44704Frk
1mph1.609344km / t
9kilo.m / time250centi.m / s
1.2345e + 8mph55187088Frk
1mph1.4911649311738188e-9c
1cm.kg/min^2/ÂμA^22777, 77777777777H / mm
1cm.kg/min^2/ÂμA^22777777.77777777m.kg/s²/A²


Hjælp: Enheder skal adskilles af prikker (.) Eller skråstreger (/). Rummet er IKKE en separator. Eksponenter kan bruges med symbolet ^ og kan være positive eller negative. Eksponenter ² og ³ er tilladt. Hvis destinationsenheder ikke leveres eller er uforenelige med kildeenheder, konverteres værdierne til base SI enheder. Enheder er store bogstaver. Værdier kan leveres i videnskabeligt format.


init_form ();

list_units ();


Om den universelle konverter: Denne Javascript-konverter leveres som en selvstændig fil, som kan bruges online eller offline. Den kan kopieres og distribueres frit, så længe denne omtale holdes synlig. (see the source code for information on how to declare new units). Fejl, forslag og nye enheder kan sendes til [email protected] (se kildekoden for oplysninger om, hvordan man deklarerer nye enheder).

Billede: © Tegn og symboler - Shutterstock.com

Forrige Artikel Næste Artikel

Top Tips