Java単位変換を作成する

以下のスクリプトは、Javascriptで機能する単位の変換器を定義しています。 このスクリプトはサーバーコードを必要とせずにブラウザ内でローカルに使用されるかもしれません。

//新しいユニットはリストの最後に追加できます

// 2つのユニットが同じ[番号]を持つ場合、最初のものは無視されます

// 2つのユニットが同じシンボルを持つ場合、2番目のユニットは無視されます

//基本SI単位:メートル、キログラム、秒、アンペア、ケルビン、モル、カンデラ

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

//例:g =加速度= m / s ^ 2 => m ^ 1.kg ^ 0.s ^ -2.A ^ 0.K ^ 0.mol ^ 0.cd ^ 0

// ex:V =テンション=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( "Unit"、 "Symbol"、 "Value"、 "m"、 "kg"、 "s"、 "A"、 "K"、 "mol"、 "cd");

all_units [1] = new 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, 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, 0);

all_units [6] = new Array( "フェムト"、 "フェムト"、1E-015, 0, 0, 0, 0, 0, 0, 0, 0);

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

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

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

all_units [10] = new Array( "milli"、 "milli"、 "0.001"、0, 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, 0);

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

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

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

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

all_units [17] = new Array( "deka"、 "deka"、10, 0, 0, 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, 0);

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

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

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

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

all_units [24] = new Array( "キロ"、 "キロ"、1000, 0, 0, 0, 0, 0, 0, 0);

all_units [25] = new Array( "mega"、 "Mega"、1000000, 0, 0, 0, 0, 0, 0, 0, 0);

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

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

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

all_units [29] = new Array( "exa"、 "Exa"、1E + 018, 0, 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( "barns"、 "barns"、1E-028, 2, 0, 0, 0, 0, 0, 0);

all_units [35] = new Array( "are"、 "are"、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, 0);

all_units [39] = new Array( "ヘクタール"、 "ヘクタール"、10000, 2, 0, 0, 0, 0, 0, 0, 0);

all_units [40] = new Array( "ヘクタール"、 "ヘクタール"、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] = new 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( "基本電荷"、 "基本電荷"、 "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( "クーロン"、 "クーロン"、1, 0, 0, 1, 1, 0, 0, 0);

all_units [57] = new Array( "クーロン"、 "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] = new 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, 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] = new Array( "第1000"、 "第1000"、 "0.001"、0, 0, 0, 0, 0, 0, 0);

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

all_units [89] = new Array( "百分の一"、 "百分の一"、 "0.01"、0, 0, 0, 0, 0, 0, 0, 0);

all_units [90] = new Array( "percent"、 "percent"、 "0.01"、0, 0, 0, 0, 0, 0, 0, 0);

all_units [91] = new Array( "10番目"、 "10番目"、 "0.1"、0, 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( "100"、 "100"、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] = new Array( "千"、 "千"、1000, 0, 0, 0, 0, 0, 0, 0);

all_units [98] = new Array( "thousands"、 "thousand"、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( "million"、 "million"、1000000, 0, 0, 0, 0, 0, 0, 0);

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

all_units [102] = new Array( "10億"、 "10億"、1000000000, 0, 0, 0, 0, 0, 0, 0, 0);

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

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

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

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

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

all_units [108] = new Array( "quintillions"、 "quintillions"、1E + 018, 0, 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( "オングストローム"、 "オングストローム"、 "0.0000000001"、1, 0, 0, 0, 0, 0, 0);

all_units [112] = new Array( "ミクロン"、 "ミクロン"、 "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( "インチ"、 "インチ"、 "0.0254"、1, 0, 0, 0, 0, 0, 0);

all_units [123] = new Array( "フィート"、 "フィート"、 "0.3048"、1, 0, 0, 0, 0, 0, 0);

all_units [124] = new Array( "foot"、 "foot"、 "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( "ヤード"、 "ヤード"、 "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("ometers "、"メートル "、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( "perch"、 "perch"、50292, 1, 0, 0, 0, 0, 0, 0, 0);

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

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

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

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

all_units [138] = new Array( "rods"、 "rods"、50292, 1, 0, 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] = new Array( "航海マイル"、 "航海マイル"、1852, 1, 0, 0, 0, 0, 0, 0, 0);

all_units [146] = new Array( "航海マイル数"、 "航海マイル数"、1852, 1, 0, 0, 0, 0, 0, 0, 0);

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

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

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

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

all_units [151] = new Array( "re"、 "re"、6378388, 1, 0, 0, 0, 0, 0, 0, 0);

all_units [152] = new Array( "天文単位"、 "天文単位"、149598000000, 1, 0, 0, 0, 0, 0, 0);

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

all_units [154] = new Array( "明年"、 "明年"、 "9.46E + 015"、1, 0, 0, 0, 0, 0, 0);

all_units [155] = new Array( "明年"、 "明年"、 "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( "gray"、 "gray"、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] = new 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( "ボルト"、 "ボルト"、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( "電子ボルト"、 "電子ボルト"、 "1.60217733E-019"、2, 1、-2, 0, 0, 0, 0);

all_units [177] = new Array( "電子ボルト"、 "電子ボルト"、 "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] = new Array( "gev"、 "geV"、 "0.000000000160217733"、2, 1、-2, 0, 0, 0, 0);

all_units [183]​​ = new 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( "カロリー"、 "カロリー"、4184, 2, 1、-2, 0, 0, 0, 0);

all_units [191] = new Array( "カロリー"、 "カロリー"、4184, 2, 1、-2, 0, 0, 0, 0);

all_units [192] = new Array( "イギリスの熱単位"、 "イギリスの熱単位"、 "1055.056"、2, 1、-2, 0, 0, 0, 0);

all_units [193] = new Array( "イギリス熱単位"、 "イギリス熱単位"、 "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( "グラム力"、 "グラム力"、 "0.00980665"、1, 1、-2, 0, 0, 0, 0);

all_units [203] = new Array( "グラム重み"、 "グラム重み"、 "0.00980665"、1, 1、-2, 0, 0, 0, 0);

all_units [204] = new Array( "オンス力"、 "オンス力"、 "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( "ポンド"、 "ポンド"、 "4.4482216152605"、1, 1、-2, 0, 0, 0, 0);

all_units [213] = new Array( "ポンド力"、 "ポンド力"、 "4.4482216152605"、1, 1、-2, 0, 0, 0, 0);

all_units [214] = new Array( "ポンド重量"、 "ポンド重量"、 "4.4482216152605"、1, 1、-2, 0, 0, 0, 0);

all_units [215] = new Array( "ポンド"、 "ポンド"、 "4.4482216152605"、1, 1、-2, 0, 0, 0, 0);

all_units [216] = new Array( "ポンド力"、 "ポンド力"、 "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, 0, 1);

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

all_units [233] = new Array( "キャンドル"、 "キャンドル"、1, 0, 0, 0, 0, 0, 0, 1);

all_units [234] = new Array( "キャンドル"、 "キャンドル"、1, 0, 0, 0, 0, 0, 0, 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( "原子質量単位"、 "原子質量単位"、 "1.6605402E-027"、0, 1, 0, 0, 0, 0, 0, 0);

all_units [246] = new Array( "原子質量単位"、 "原子質量単位"、 "1.6605402E-027"、0, 1, 0, 0, 0, 0, 0, 0);

all_units [247] = new 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( "grain"、 "grain"、 "0.0000648"、0, 1, 0, 0, 0, 0, 0);

all_units [253] = new 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( "カラット"、 "カラット"、 "0.0002"、0, 1, 0, 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] = new Array( "j点"、 "j点"、 "0.0004"、0, 1, 0, 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( "グラム"、 "グラム"、 "0.001"、0, 1, 0, 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, 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( "オンス"、 "オンス"、 "0.028349523125"、0​​, 1, 0, 0, 0, 0, 0);

all_units [271] = new Array( "oz"、 "oz"、 "0.028349523125"、0​​, 1, 0, 0, 0, 0, 0);

all_units [272] = new Array( "オンストロイ"、 "オンストロイ"、 "0.031103"、0, 1, 0, 0, 0, 0, 0, 0);

all_units [273] = new Array( "オンス - トロイ"、 "オンス - トロイ"、 "0.031103"、0, 1, 0, 0, 0, 0, 0);

all_units [274] = new Array( "トロイオンス"、 "トロイオンス"、 "0.031103"、0, 1, 0, 0, 0, 0, 0, 0);

all_units [275] = new Array( "トロイオンス"、 "トロイオンス"、 "0.031103"、0, 1, 0, 0, 0, 0, 0, 0);

all_units [276] = new Array( "hg"、 "hg"、 "0.1"、0, 1, 0, 0, 0, 0, 0);

all_units [277] = new Array( "トロイポンド"、 "トロイポンド"、 "0.373"、0, 1, 0, 0, 0, 0, 0);

all_units [278] = new Array( "トロイポンド"、 "トロイポンド"、 "0.373"、0, 1, 0, 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( "ポンド質量"、 "ポンド質量"、 "0.45359237"、0, 1, 0, 0, 0, 0, 0);

all_units [282] = new Array( "ポンド質量"、 "ポンド質量"、 "0.45359237"、0, 1, 0, 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( "stones"、 "stones"、 "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( "short-ton"、 "short-ton"、 "907.18474"、0, 1, 0, 0, 0, 0, 0);

all_units [291] = new Array( "ショートトン"、 "ショートトン"、 "907.18474"、0, 1, 0, 0, 0, 0, 0);

all_units [292] = new Array( "ton"、 "ton"、 "907.18474"、0, 1, 0, 0, 0, 0, 0);

all_units [293] = new Array( "tons"、 "tons"、 "907.18474"、0, 1, 0, 0, 0, 0, 0, 0);

all_units [294] = new Array( "メトリックトン"、 "メトリックトン"、1000, 0, 1, 0, 0, 0, 0, 0);

all_units [295] = new Array( "メトリックトン"、 "メトリックトン"、1000, 0, 1, 0, 0, 0, 0, 0);

all_units [296] = new Array( "tonne"、 "tonne"、1000, 0, 1, 0, 0, 0, 0, 0, 0);

all_units [297] = new Array( "tonnes"、 "tonnes"、1000, 0, 1, 0, 0, 0, 0, 0, 0);

all_units [298] = new Array( "long-ton"、 "long-ton"、 "1016.0469088"、0, 1, 0, 0, 0, 0, 0);

all_units [299] = new Array( "ロングトン"、 "ロングトン"、 "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] = new Array( "馬力"、 "馬力"、 "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( "atmosphere"、 "atmosphere"、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( "キロオーム"、 "キロオーム"、1000, 2, 1、-3、-2, 0, 0, 0);

all_units [319] = new Array( "キロオーム"、 "キロオーム"、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] = new Array( "fps"、 "fps"、 "0.3048"、1, 0、-1, 0, 0, 0, 0);

all_units [326] = new Array( "mph"、 "mph"、 "0.44704"、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.51444444444444444"、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( "光速"、 "光速"、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( "mole"、 "mole"、1, 0, 0, 0, 0, 0, 1, 0);

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

all_units [336] = new Array( "次数ランク"、 "次数"、 "0.555555555555556"、0, 0, 0, 0, 0, 0, 0);

all_units [337] = new Array( "degree-rankine"、 "degree-rankine"、 "0.555555555555556"、0, 0, 0, 0, 0, 0, 0);

all_units [338] = new Array( "度数 - ケルビン"、 "度数 - ケルビン"、1, 0, 0, 0, 0, 1, 0, 0);

all_units [339] = new Array( "度数 - ケルビン"、 "度数 - ケルビン"、1, 0, 0, 0, 0, 1, 0, 0);

all_units [340] = new Array( "度数 - ケルビン"、 "度数 - ケルビン"、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( "Kelvins"、 "Kelvins"、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] = new Array( "µsecs"、 "µsecs"、 "0.000001"、0, 0, 1, 0, 0, 0, 0);

all_units [353] = new Array( "ms"、 "ms"、 "0.001"、0, 0, 1, 0, 0, 0, 0);

all_units [354] = new 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] = new Array( "seconds"、 "seconds"、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( "mins"、 "mins"、60, 0, 0, 1, 0, 0, 0, 0, 0);

all_units [363] = new Array( "minute"、 "minute"、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( "hour"、 "hour"、3600, 0, 0, 1, 0, 0, 0, 0);

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

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

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

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

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

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

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

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

all_units [374] = new Array( "2週間"、 "2週間"、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( "year"、 "year"、31557600, 0, 0, 1, 0, 0, 0, 0);

all_units [381] = new Array( "years"、 "years"、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( "score"、 "score"、631152000, 0, 0, 1, 0, 0, 0, 0, 0);

all_units [386] = new Array( "centuries"、 "centuries"、3155760000, 0, 0, 1, 0, 0, 0, 0);

all_units [387] = new Array( "世紀"、 "世紀"、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( "フィートポンド"、 "フィートポンド"、 "1.3558179483314"、2, 1、-2, 0, 0, 0, 0);

all_units [391] = new Array( "フィートポンド"、 "フットポンド"、 "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] = new 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, 0);

all_units [397] = new Array( "minims"、 "minims"、 "0.000000059194"、3, 0, 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] = new 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, 0);

all_units [402] = new Array( "ティースプーン"、 "ティースプーン"、 "0.00000492892159375"、3, 0, 0, 0, 0, 0, 0, 0);

all_units [403] = new Array( "ティースプーン"、 "ティースプーン"、 "0.00000492892159375"、3, 0, 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, 0);

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

all_units [407] = new Array( "tablespoons"、 "tablespoons"、 "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, 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, 0);

all_units [411] = new Array( "フルオンス"、 "フルオンス"、 "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, 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, 0);

all_units [422] = new Array( "5番目"、 "5番目"、 "0.0007570823568"、3, 0, 0, 0, 0, 0, 0, 0);

all_units [423] = new Array( "5番目"、 "5番目"、 "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, 0);

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

all_units [427] = new Array( "1"、 "1"、 "0.001"、3, 0, 0, 0, 0, 0, 0, 0);

all_units [428] = new Array( "リットル"、 "リットル"、 "0.001"、3, 0, 0, 0, 0, 0, 0);

all_units [429] = new Array( "L"、 "L"、 "0.001"、3, 0, 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( "ガロン"、 "ガロン"、 "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, 0);

all_units [434] = new Array( "pecks"、 "pecks"、 "0.007570823568"、3, 0, 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( "度数摂氏"、 "°C"、0, 0, 0, 0, 0, 1, 0, 0);

all_units [439] = new Array( "度数"、 "°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);

関数min(a、b){if(a

関数max(a、b){(a> b)ならば(a)を返す。 そうでなければ(b)を返す。

function analyze(coef、str)// ===========================ユニットを基本的なSIユニットに分割

{

var pos_dot;

var pos_slash;

var pos;

VAR単位。

VAR指数。

var invert_next = 0;

var list_units_in = new Array;

var table_base = new Array(coef、0, 0, 0, 0, 0, 0, 0);

str = str + "。";

var i = 0;

while(str.length> 1)//単位入力文字列内のすべての単位に対して//

{

pos_dot = str.indexOf( "。");

pos_slash = str.indexOf( "/");

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

pos = max(pos_dot、pos_slash);

それ以外の

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( "^");

if(pos_exp == -1)//指数がない場合

{

unit = list_units_in [i];

指数= 1。

}

そうでなければ//指数がある

{

unit = list_units_in [i] .substring(0、pos_exp);

指数= list_units_in [i] .substring(pos_exp + 1、list_units_in [i] .length);

}

//単位の後に/がある場合は、次の指数を反転します

if(invert_next)指数= -exponent。

if(pos == pos_slash)invert_next = 1。 そうでなければinvert_next = 0。

table_base_unit = fetch_unit(unit); //選択した単位のSI換算値を取得

if(table_base_unit)//リストに見つかった場合

{

table_base [0] = table_base [0] * Math.pow(table_base_unit [2]、指数);

(j = 1; j <8; j ++)//の場合、露光量が最大になります。

{

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

}

}

それ以外の場合は(0)を返します。 // 問題があります

i = i + 1。

}

return(table_base);

}

関数fetch_unit(シンボル)// ============================ユニットのSI当量をフェッチ

{

k = 1。

while(all_units [k])

{

if(all_units [k] [1] == symbol)return(all_units [k]); //見つかった!

k = k + 1。

}

(0)を返します。 // 見つかりません

}

function exp_nice(string)// ======================== ^ 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"、 "Â");

return(string);

}

function exp_clean(string)// ========================²を^ 2に置き換えます

{

string = string.replace( "Â2"、 "^ 2");

string = string.replace( "Â2"、 "^ 2");

string = string.replace( "Â2"、 "^ 2");

string = string.replace( "Â2"、 "^ 2");

string = string.replace( "Â"、 "^ 3");

string = string.replace( "Â"、 "^ 3");

string = string.replace( "Â"、 "^ 3");

return(string);

}

function display_unit(base_values、base)// =========================結果を表示する

{

if(base)//基本的なSI単位が必要な場合

{

var str_display = "";

(p = 1; p <8; p ++)// m、kg、s、A、K、mol、cdの場合

{

if(base_values [p] == 1)

{

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

}

if(base_values [p]> 1)

{

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

}

if(base_values [p] == -1)

{

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

}

if(base_values [p] <-1)

{

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

}

}

if(str_display.substring(0, 1)== "/")//最初の指数が負の場合

str_display = "1" + str_display

それ以外の

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

}

そうでなければ//ユニットをそのままにしておく

{

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];

}

function convert()// ========================メイン関数

{

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 = "???"; 出口;}

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 = analyze(document.forms [0] .quantity_in.value、document.forms [0] .units_in.value);

if(document.forms [0] .units_out.value!= "")//結果に特定の単位が要求された場合

{

units_base_out = analyze(1、document.forms [0] .units_out.value);

if(units_base_out)//単位がデータベースで見つかった場合

{

if(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])//単位に互換性がない場合

display_unit(units_base_in、1);

そうでなければ//すべてOK

{

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

display_unit(units_base_in、0);

}

}

そうでなければ//ユニットが見つかりません

display_unit(units_base_in、1);

}

そうでなければ//特定のユニットは要求されなかった

display_unit(units_base_in、1);

}

function init_form()// ==========================フォームの初期化

{

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()// ==========================利用可能な単位のクリック可能なリストを表示します

{

var n = 1;

var list = new Array;

while(all_units [n])

{

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

n = n + 1。

}

list.sort();

n = 0。

while(list [n])

{

document.write( " ");

document.write(list [n]);

document.write( "、");

n = n + 1。

}

}

// ==========================スクリプトの終わり

ユニバーサルコンバータ

td {font-family:Arial; フォントサイズ:10px。 text-align:center;}

.red {色:#ff0000;}


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

1時速

黒のフィールド

ユーザーによって記入されている

赤のフィールド

結果です

0.44704ミズ
1マイル/時0.44704ミズ
1mi.hr ^ -10.44704ミズ
1時速1.609344km /時
9キロメートル/時250センチメートル/秒
1.2345e + 8時速55187088ミズ
1時速1.4911649311738188e-9c
1cm.kg/min^2/µA^22777.77777777777H / mm
1cm.kg/min^2/µA^22777777.77777777m.kg/s²/A²


ヘルプ:単位はドット(。)またはスラッシュ(/)で区切る必要があります。 スペースは区切り文字ではありません。 指数は記号^と共に使用でき、正または負にすることができます。 指数²とÂは許可されています。 宛先単位が供給されていないか、またはソース単位と互換性がない場合、値は基本SI単位に変換されます。 単位は大文字と小文字を区別します。 値は科学的な形式で指定できます。


init_form();

list_units();


ユニバーサルコンバータについて:このJavascriptコンバータは、オンラインまたはオフラインで使用できるスタンドアロンファイルとして提供されています。 この言及が見えている限り、自由にコピーして配布することができます。 (see the source code for information on how to declare new units).バグ、提案、そして新しいユニットは[email protected]に送ることができます(新しいユニットを宣言する方法についてはソースコードを見てください)。

画像:©サインとシンボル - Shutterstock.com

前の記事 次の記事

トップのヒント