convert

変換前単位で表される数値を、変換後単位の数値に変換します。接頭語(k(キロ)やm(ミリ))等には対応していません。

構文
  1. Double = convert( num, before, after )
引数
num
単位換算する数値
before
変換前の単位
after
変換後の単位
戻値
指定した単位に変換した数値

プログラム

////////////////////////////////////////////////// // 【引数】 // num : 単位換算する数値 // before : 変換前の単位 // after : 変換後の単位 // 【戻値】 // 指定した単位に変換した数値 ////////////////////////////////////////////////// FUNCTION convert(num, before, after) HASHTBL unit // 重量 unit["g,sg"] = "num * 6.85217658567918 * POWER(10, -5)" unit["g,lbm"] = "num * 2.20462262184878 * POWER(10, -3)" unit["g,u"] = "num * 6.02217 * POWER(10, +23)" unit["g,ozm"] = "num * 3.52739619495804 * POWER(10, -2)" unit["sg,g"] = "num * 1.45939029372064 * POWER(10, +4)" unit["sg,lbm"] = "num * 3.21740485564304 * POWER(10, +1)" unit["sg,u"] = "num * 8.78869644513561 * POWER(10, +27)" unit["sg,ozm"] = "num * 5.14784776902887 * POWER(10, +2)" unit["lbm,g"] = "num * 4.5359237 * POWER(10, +2)" unit["lbm,sg"] = "num * 3.10809501715673 * POWER(10, -2)" unit["lbm,u"] = "num * 2.7316103628429 * POWER(10, +26)" unit["lbm,ozm"] = "num * 1.6 * POWER(10, +1)" unit["u,g"] = "num * 1.66053100460465 * POWER(10, -24)" unit["u,sg"] = "num * 1.13782516695463 * POWER(10, -28)" unit["u,lbm"] = "num * 3.66084421703269 * POWER(10, -27)" unit["u,ozm"] = "num * 5.8573507472523 * POWER(10, -26)" unit["ozm,g"] = "num * 2.8349523125 * POWER(10, +1)" unit["ozm,sg"] = "num * 1.94255938572295 * POWER(10, -3)" unit["ozm,lbm"] = "num * 6.25 * POWER(10, -2)" unit["ozm,u"] = "num * 1.70725647677681 * POWER(10, +25)" // 距離 unit["m,mi"] = "num * 6.21371192237334 * POWER(10, -4)" unit["m,Nmi"] = "num * 5.39956803455724 * POWER(10, -4)" unit["m,in"] = "num * 3.93700787401575 * POWER(10, +1)" unit["m,ft"] = "num * 3.28083989501312 * POWER(10, +0)" unit["m,yd"] = "num * 1.09361329833771 * POWER(10, +0)" unit["m,ang"] = "num * 1 * POWER(10, +10)" unit["m,pica"] = "num * 2.36220472440945 * POWER(10, +2)" unit["mi,m"] = "num * 1.609344 * POWER(10, +3)" unit["mi,Nmi"] = "num * 8.68976241900648 * POWER(10, -1)" unit["mi,in"] = "num * 6.336 * POWER(10, +4)" unit["mi,ft"] = "num * 5.28 * POWER(10, +3)" unit["mi,yd"] = "num * 1.76 * POWER(10, +3)" unit["mi,ang"] = "num * 1.609344 * POWER(10, +13)" unit["mi,pica"] = "num * 3.8016 * POWER(10, +5)" unit["Nmi,m"] = "num * 1.852 * POWER(10, +3)" unit["Nmi,mi"] = "num * 1.15077944802354 * POWER(10, +0)" unit["Nmi,in"] = "num * 7.29133858267717 * POWER(10, +4)" unit["Nmi,ft"] = "num * 6.0761154855643 * POWER(10, +3)" unit["Nmi,yd"] = "num * 2.02537182852143 * POWER(10, +3)" unit["Nmi,ang"] = "num * 1.852 * POWER(10, +13)" unit["Nmi,pica"] = "num * 4.3748031496063 * POWER(10, +5)" unit["in,m"] = "num * 2.54 * POWER(10, -2)" unit["in,mi"] = "num * 1.57828282828283 * POWER(10, -5)" unit["in,Nmi"] = "num * 1.37149028077754 * POWER(10, -5)" unit["in,ft"] = "num * 8.33333333333333 * POWER(10, -2)" unit["in,yd"] = "num * 2.77777777777778 * POWER(10, -2)" unit["in,ang"] = "num * 2.54 * POWER(10, +8)" unit["in,pica"] = "num * 6 * POWER(10, +0)" unit["ft,m"] = "num * 3.048 * POWER(10, -1)" unit["ft,mi"] = "num * 1.89393939393939 * POWER(10, -4)" unit["ft,Nmi"] = "num * 1.64578833693305 * POWER(10, -4)" unit["ft,in"] = "num * 1.2 * POWER(10, +1)" unit["ft,yd"] = "num * 3.33333333333333 * POWER(10, -1)" unit["ft,ang"] = "num * 3.048 * POWER(10, +9)" unit["ft,pica"] = "num * 7.2 * POWER(10, +1)" unit["yd,m"] = "num * 9.144 * POWER(10, -1)" unit["yd,mi"] = "num * 5.68181818181818 * POWER(10, -4)" unit["yd,Nmi"] = "num * 4.93736501079914 * POWER(10, -4)" unit["yd,in"] = "num * 3.6 * POWER(10, +1)" unit["yd,ft"] = "num * 3 * POWER(10, +0)" unit["yd,ang"] = "num * 9.144 * POWER(10, +9)" unit["yd,pica"] = "num * 2.16 * POWER(10, +2)" unit["ang,m"] = "num * 1 * POWER(10, -10)" unit["ang,mi"] = "num * 6.21371192237334 * POWER(10, -14)" unit["ang,Nmi"] = "num * 5.39956803455724 * POWER(10, -14)" unit["ang,in"] = "num * 3.93700787401575 * POWER(10, -9)" unit["ang,ft"] = "num * 3.28083989501312 * POWER(10, -10)" unit["ang,yd"] = "num * 1.09361329833771 * POWER(10, -10)" unit["ang,pica"] = "num * 2.36220472440945 * POWER(10, -8)" unit["pica,m"] = "num * 4.23333333333333 * POWER(10, -3)" unit["pica,mi"] = "num * 2.63047138047138 * POWER(10, -6)" unit["pica,Nmi"] = "num * 2.28581713462923 * POWER(10, -6)" unit["pica,in"] = "num * 1.66666666666667 * POWER(10, -1)" unit["pica,ft"] = "num * 1.38888888888889 * POWER(10, -2)" unit["pica,yd"] = "num * 4.62962962962963 * POWER(10, -3)" unit["pica,ang"] = "num * 4.23333333333333 * POWER(10, +7)" // 時間 unit["yr,day"] = "num * 3.6525 * POWER(10, +2)" unit["yr,hr"] = "num * 8.766 * POWER(10, +3)" unit["yr,mn"] = "num * 5.2596 * POWER(10, +5)" unit["yr,sec"] = "num * 3.15576 * POWER(10, +7)" unit["day,yr"] = "num * 2.7378507871321 * POWER(10, -3)" unit["day,hr"] = "num * 2.4 * POWER(10, +1)" unit["day,mn"] = "num * 1.44 * POWER(10, +3)" unit["day,sec"] = "num * 8.64 * POWER(10, +4)" unit["hr,yr"] = "num * 1.14077116130504 * POWER(10, -4)" unit["hr,day"] = "num * 4.16666666666667 * POWER(10, -2)" unit["hr,mn"] = "num * 6 * POWER(10, +1)" unit["hr,sec"] = "num * 3.6 * POWER(10, +3)" unit["mn,yr"] = "num * 1.90128526884174 * POWER(10, -6)" unit["mn,day"] = "num * 6.94444444444444 * POWER(10, -4)" unit["mn,hr"] = "num * 1.66666666666667 * POWER(10, -2)" unit["mn,sec"] = "num * 6 * POWER(10, +1)" unit["sec,yr"] = "num * 3.16880878140289 * POWER(10, -8)" unit["sec,day"] = "num * 1.15740740740741 * POWER(10, -5)" unit["sec,hr"] = "num * 2.77777777777778 * POWER(10, -4)" unit["sec,mn"] = "num * 1.66666666666667 * POWER(10, -2)" // 圧力 unit["Pa,atm"] = "num * 9.86923266716013 * POWER(10, -6)" unit["Pa,mmHg"] = "num * 7.5006168270417 * POWER(10, -3)" unit["atm,Pa"] = "num * 1.01325 * POWER(10, +5)" unit["atm,mmHg"] = "num * 7.6 * POWER(10, +2)" unit["mmHg,Pa"] = "num * 1.33322368421053 * POWER(10, +2)" unit["mmHg,atm"] = "num * 1.31578947368421 * POWER(10, -3)" // 物理的な力 unit["N,dyn"] = "num * 1 * POWER(10, +5)" unit["N,lbf"] = "num * 2.2480894309971 * POWER(10, -1)" unit["dyn,N"] = "num * 1 * POWER(10, -5)" unit["dyn,lbf"] = "num * 2.2480894309971 * POWER(10, -6)" unit["lbf,N"] = "num * 4.4482216152605 * POWER(10, +0)" unit["lbf,dyn"] = "num * 4.4482216152605 * POWER(10, +5)" // エネルギー unit["J,e"] = "num * 1 * POWER(10, +7)" unit["J,cal"] = "num * 2.38845896627496 * POWER(10, -1)" unit["J,eV"] = "num * 6.241457 * POWER(10, +18)" unit["J,HPh"] = "num * 3.72506135998619 * POWER(10, -7)" unit["J,Wh"] = "num * 2.77777777777778 * POWER(10, -4)" unit["J,flb"] = "num * 7.37562149277265 * POWER(10, -1)" unit["J,BTU"] = "num * 9.47817120313317 * POWER(10, -4)" unit["J,c"] = "num * 2.39005736137667 * POWER(10, -1)" unit["e,J"] = "num * 1 * POWER(10, -7)" unit["e,cal"] = "num * 2.38845896627496 * POWER(10, -8)" unit["e,eV"] = "num * 6.241457 * POWER(10, +11)" unit["e,HPh"] = "num * 3.72506135998619 * POWER(10, -14)" unit["e,Wh"] = "num * 2.77777777777778 * POWER(10, -11)" unit["e,flb"] = "num * 7.37562149277265 * POWER(10, -8)" unit["e,BTU"] = "num * 9.47817120313317 * POWER(10, -11)" unit["e,c"] = "num * 2.39005736137667 * POWER(10, -8)" unit["cal,J"] = "num * 4.1868 * POWER(10, +0)" unit["cal,e"] = "num * 4.1868 * POWER(10, +7)" unit["cal,eV"] = "num * 2.61317321676 * POWER(10, +19)" unit["cal,HPh"] = "num * 1.55960869019902 * POWER(10, -6)" unit["cal,Wh"] = "num * 1.163 * POWER(10, -3)" unit["cal,flb"] = "num * 3.08802520659405 * POWER(10, +0)" unit["cal,BTU"] = "num * 3.9683207193278 * POWER(10, -3)" unit["cal,c"] = "num * 1.00066921606119 * POWER(10, +0)" unit["eV,J"] = "num * 1.60219000146921 * POWER(10, -19)" unit["eV,e"] = "num * 1.60219000146921 * POWER(10, -12)" unit["eV,cal"] = "num * 3.82676507468522 * POWER(10, -20)" unit["eV,HPh"] = "num * 5.96825606582916 * POWER(10, -26)" unit["eV,Wh"] = "num * 4.45052778185891 * POWER(10, -23)" unit["eV,flb"] = "num * 1.18171470103417 * POWER(10, -19)" unit["eV,BTU"] = "num * 1.51858311338733 * POWER(10, -22)" unit["eV,c"] = "num * 3.82932600733558 * POWER(10, -20)" unit["HPh,J"] = "num * 2.68451953769617 * POWER(10, +6)" unit["HPh,e"] = "num * 2.68451953769617 * POWER(10, +13)" unit["HPh,cal"] = "num * 6.41186475995073 * POWER(10, +5)" unit["HPh,eV"] = "num * 1.67553132601905 * POWER(10, +25)" unit["HPh,Wh"] = "num * 7.4569987158227 * POWER(10, +2)" unit["HPh,flb"] = "num * 1.98 * POWER(10, +6)" unit["HPh,BTU"] = "num * 2.54443357764402 * POWER(10, +3)" unit["HPh,c"] = "num * 6.41615568283024 * POWER(10, +5)" unit["Wh,J"] = "num * 3.6 * POWER(10, +3)" unit["Wh,e"] = "num * 3.6 * POWER(10, +10)" unit["Wh,cal"] = "num * 8.59845227858985 * POWER(10, +2)" unit["Wh,eV"] = "num * 2.24692452 * POWER(10, +22)" unit["Wh,HPh"] = "num * 1.34102208959503 * POWER(10, -3)" unit["Wh,flb"] = "num * 2.65522373739816 * POWER(10, +3)" unit["Wh,BTU"] = "num * 3.41214163312794 * POWER(10, +0)" unit["Wh,c"] = "num * 8.60420650095602 * POWER(10, +2)" unit["flb,J"] = "num * 1.3558179483314 * POWER(10, +0)" unit["flb,e"] = "num * 1.3558179483314 * POWER(10, +7)" unit["flb,cal"] = "num * 3.23831553532865 * POWER(10, -1)" unit["flb,eV"] = "num * 8.46227942433866 * POWER(10, +18)" unit["flb,HPh"] = "num * 5.05050505050505 * POWER(10, -7)" unit["flb,Wh"] = "num * 3.76616096758722 * POWER(10, -4)" unit["flb,BTU"] = "num * 1.28506746345658 * POWER(10, -3)" unit["flb,c"] = "num * 3.24048266809608 * POWER(10, -1)" unit["BTU,J"] = "num * 1.05505585262 * POWER(10, +3)" unit["BTU,e"] = "num * 1.05505585262 * POWER(10, +10)" unit["BTU,cal"] = "num * 2.51995761111111 * POWER(10, +2)" unit["BTU,eV"] = "num * 6.58508573672607 * POWER(10, +21)" unit["BTU,HPh"] = "num * 3.93014778922204 * POWER(10, -4)" unit["BTU,Wh"] = "num * 2.93071070172222 * POWER(10, -1)" unit["BTU,flb"] = "num * 7.78169262265965 * POWER(10, +2)" unit["BTU,c"] = "num * 2.52164400721797 * POWER(10, +2)" unit["c,J"] = "num * 4.184 * POWER(10, +0)" unit["c,e"] = "num * 4.184 * POWER(10, +7)" unit["c,cal"] = "num * 9.99331231489443 * POWER(10, -1)" unit["c,eV"] = "num * 2.6114256088 * POWER(10, +19)" unit["c,HPh"] = "num * 1.55856567301822 * POWER(10, -6)" unit["c,Wh"] = "num * 1.16222222222222 * POWER(10, -3)" unit["c,flb"] = "num * 3.08596003257608 * POWER(10, +0)" unit["c,BTU"] = "num * 3.96566683139092 * POWER(10, -3)" // 仕事率 unit["HP,W"] = "num * 7.4569987158227 * POWER(10, +2)" unit["W,HP"] = "num * 1.34102208959503 * POWER(10, -3)" // 磁力 unit["T,ga"] = "num * 1 * POWER(10, +4)" unit["ga,T"] = "num * 1 * POWER(10, -4)" // 温度 unit["C,F"] = "num * (9/5) + 32" unit["C,K"] = "num + 273.15" unit["F,C"] = "(num - 32) * (9/5)" unit["F,K"] = "(num - 32) * (5/9) + 273.15" unit["K,C"] = "num - 23373.15" unit["K,F"] = "(num - 273.15) * (9/5) + 32" // 体積(容積) unit["tsp,tbs"] = "num * 3.33333333333333 * POWER(10, -1)" unit["tsp,oz"] = "num * 1.66666666666667 * POWER(10, -1)" unit["tsp,cup"] = "num * 2.08333333333333 * POWER(10, -2)" unit["tsp,us_pt"] = "num * 1.04166666666667 * POWER(10, -2)" unit["tsp,uk_pt"] = "num * 8.67368942321863 * POWER(10, -3)" unit["tsp,qt"] = "num * 5.20833333333333 * POWER(10, -3)" unit["tsp,gal"] = "num * 1.30208333333333 * POWER(10, -3)" unit["tbs,tsp"] = "num * 3 * POWER(10, +0)" unit["tbs,oz"] = "num * 5 * POWER(10, -1)" unit["tbs,cup"] = "num * 6.25 * POWER(10, -2)" unit["tbs,us_pt"] = "num * 3.125 * POWER(10, -2)" unit["tbs,uk_pt"] = "num * 2.60210682696559 * POWER(10, -2)" unit["tbs,qt"] = "num * 1.5625 * POWER(10, -2)" unit["tbs,gal"] = "num * 3.90625 * POWER(10, -3)" unit["oz,tsp"] = "num * 6 * POWER(10, +0)" unit["oz,tbs"] = "num * 2 * POWER(10, +0)" unit["oz,cup"] = "num * 1.25 * POWER(10, -1)" unit["oz,us_pt"] = "num * 6.25 * POWER(10, -2)" unit["oz,uk_pt"] = "num * 5.20421365393118 * POWER(10, -2)" unit["oz,qt"] = "num * 3.125 * POWER(10, -2)" unit["oz,gal"] = "num * 7.8125 * POWER(10, -3)" unit["cup,tsp"] = "num * 4.8 * POWER(10, +1)" unit["cup,tbs"] = "num * 1.6 * POWER(10, +1)" unit["cup,oz"] = "num * 8 * POWER(10, +0)" unit["cup,us_pt"] = "num * 5 * POWER(10, -1)" unit["cup,uk_pt"] = "num * 4.16337092314494 * POWER(10, -1)" unit["cup,qt"] = "num * 2.5 * POWER(10, -1)" unit["cup,gal"] = "num * 6.25 * POWER(10, -2)" unit["us_pt,tsp"] = "num * 9.6 * POWER(10, +1)" unit["us_pt,tbs"] = "num * 3.2 * POWER(10, +1)" unit["us_pt,oz"] = "num * 1.6 * POWER(10, +1)" unit["us_pt,cup"] = "num * 2 * POWER(10, +0)" unit["us_pt,uk_pt"] = "num * 8.32674184628989 * POWER(10, -1)" unit["us_pt,qt"] = "num * 5 * POWER(10, -1)" unit["us_pt,gal"] = "num * 1.25 * POWER(10, -1)" unit["uk_pt,tsp"] = "num * 1.15291192848466 * POWER(10, +2)" unit["uk_pt,tbs"] = "num * 3.84303976161554 * POWER(10, +1)" unit["uk_pt,oz"] = "num * 1.92151988080777 * POWER(10, +1)" unit["uk_pt,cup"] = "num * 2.40189985100971 * POWER(10, +0)" unit["uk_pt,us_pt"] = "num * 1.20094992550486 * POWER(10, +0)" unit["uk_pt,qt"] = "num * 6.00474962752428 * POWER(10, -1)" unit["uk_pt,gal"] = "num * 1.50118740688107 * POWER(10, -1)" unit["qt,tsp"] = "num * 1.92 * POWER(10, +2)" unit["qt,tbs"] = "num * 6.4 * POWER(10, +1)" unit["qt,oz"] = "num * 3.2 * POWER(10, +1)" unit["qt,cup"] = "num * 4 * POWER(10, +0)" unit["qt,us_pt"] = "num * 2 * POWER(10, +0)" unit["qt,uk_pt"] = "num * 1.66534836925798 * POWER(10, +0)" unit["qt,gal"] = "num * 2.5 * POWER(10, -1)" unit["gal,tsp"] = "num * 7.68 * POWER(10, +2)" unit["gal,tbs"] = "num * 2.56 * POWER(10, +2)" unit["gal,oz"] = "num * 1.28 * POWER(10, +2)" unit["gal,cup"] = "num * 1.6 * POWER(10, +1)" unit["gal,us_pt"] = "num * 8 * POWER(10, +0)" unit["gal,uk_pt"] = "num * 6.66139347703191 * POWER(10, +0)" unit["gal,qt"] = "num * 4 * POWER(10, +0)" RESULT = EVAL(unit[before + "," + after]) FEND

プログラム実行例

メートルをヤードに変換(単位換算)

1メートルを1ヤードに変換します。

PRINT convert(1, "m", "yd") ////////////////////////////////////////////////// // 【引数】 // num : 単位換算する数値 // before : 変換前の単位 // after : 変換後の単位 // 【戻値】 // 指定した単位に変換した数値 ////////////////////////////////////////////////// FUNCTION convert(num, before, after) HASHTBL unit // 重量 unit["g,sg"] = "num * 6.85217658567918 * POWER(10, -5)" unit["g,lbm"] = "num * 2.20462262184878 * POWER(10, -3)" unit["g,u"] = "num * 6.02217 * POWER(10, +23)" unit["g,ozm"] = "num * 3.52739619495804 * POWER(10, -2)" unit["sg,g"] = "num * 1.45939029372064 * POWER(10, +4)" unit["sg,lbm"] = "num * 3.21740485564304 * POWER(10, +1)" unit["sg,u"] = "num * 8.78869644513561 * POWER(10, +27)" unit["sg,ozm"] = "num * 5.14784776902887 * POWER(10, +2)" unit["lbm,g"] = "num * 4.5359237 * POWER(10, +2)" unit["lbm,sg"] = "num * 3.10809501715673 * POWER(10, -2)" unit["lbm,u"] = "num * 2.7316103628429 * POWER(10, +26)" unit["lbm,ozm"] = "num * 1.6 * POWER(10, +1)" unit["u,g"] = "num * 1.66053100460465 * POWER(10, -24)" unit["u,sg"] = "num * 1.13782516695463 * POWER(10, -28)" unit["u,lbm"] = "num * 3.66084421703269 * POWER(10, -27)" unit["u,ozm"] = "num * 5.8573507472523 * POWER(10, -26)" unit["ozm,g"] = "num * 2.8349523125 * POWER(10, +1)" unit["ozm,sg"] = "num * 1.94255938572295 * POWER(10, -3)" unit["ozm,lbm"] = "num * 6.25 * POWER(10, -2)" unit["ozm,u"] = "num * 1.70725647677681 * POWER(10, +25)" // 距離 unit["m,mi"] = "num * 6.21371192237334 * POWER(10, -4)" unit["m,Nmi"] = "num * 5.39956803455724 * POWER(10, -4)" unit["m,in"] = "num * 3.93700787401575 * POWER(10, +1)" unit["m,ft"] = "num * 3.28083989501312 * POWER(10, +0)" unit["m,yd"] = "num * 1.09361329833771 * POWER(10, +0)" unit["m,ang"] = "num * 1 * POWER(10, +10)" unit["m,pica"] = "num * 2.36220472440945 * POWER(10, +2)" unit["mi,m"] = "num * 1.609344 * POWER(10, +3)" unit["mi,Nmi"] = "num * 8.68976241900648 * POWER(10, -1)" unit["mi,in"] = "num * 6.336 * POWER(10, +4)" unit["mi,ft"] = "num * 5.28 * POWER(10, +3)" unit["mi,yd"] = "num * 1.76 * POWER(10, +3)" unit["mi,ang"] = "num * 1.609344 * POWER(10, +13)" unit["mi,pica"] = "num * 3.8016 * POWER(10, +5)" unit["Nmi,m"] = "num * 1.852 * POWER(10, +3)" unit["Nmi,mi"] = "num * 1.15077944802354 * POWER(10, +0)" unit["Nmi,in"] = "num * 7.29133858267717 * POWER(10, +4)" unit["Nmi,ft"] = "num * 6.0761154855643 * POWER(10, +3)" unit["Nmi,yd"] = "num * 2.02537182852143 * POWER(10, +3)" unit["Nmi,ang"] = "num * 1.852 * POWER(10, +13)" unit["Nmi,pica"] = "num * 4.3748031496063 * POWER(10, +5)" unit["in,m"] = "num * 2.54 * POWER(10, -2)" unit["in,mi"] = "num * 1.57828282828283 * POWER(10, -5)" unit["in,Nmi"] = "num * 1.37149028077754 * POWER(10, -5)" unit["in,ft"] = "num * 8.33333333333333 * POWER(10, -2)" unit["in,yd"] = "num * 2.77777777777778 * POWER(10, -2)" unit["in,ang"] = "num * 2.54 * POWER(10, +8)" unit["in,pica"] = "num * 6 * POWER(10, +0)" unit["ft,m"] = "num * 3.048 * POWER(10, -1)" unit["ft,mi"] = "num * 1.89393939393939 * POWER(10, -4)" unit["ft,Nmi"] = "num * 1.64578833693305 * POWER(10, -4)" unit["ft,in"] = "num * 1.2 * POWER(10, +1)" unit["ft,yd"] = "num * 3.33333333333333 * POWER(10, -1)" unit["ft,ang"] = "num * 3.048 * POWER(10, +9)" unit["ft,pica"] = "num * 7.2 * POWER(10, +1)" unit["yd,m"] = "num * 9.144 * POWER(10, -1)" unit["yd,mi"] = "num * 5.68181818181818 * POWER(10, -4)" unit["yd,Nmi"] = "num * 4.93736501079914 * POWER(10, -4)" unit["yd,in"] = "num * 3.6 * POWER(10, +1)" unit["yd,ft"] = "num * 3 * POWER(10, +0)" unit["yd,ang"] = "num * 9.144 * POWER(10, +9)" unit["yd,pica"] = "num * 2.16 * POWER(10, +2)" unit["ang,m"] = "num * 1 * POWER(10, -10)" unit["ang,mi"] = "num * 6.21371192237334 * POWER(10, -14)" unit["ang,Nmi"] = "num * 5.39956803455724 * POWER(10, -14)" unit["ang,in"] = "num * 3.93700787401575 * POWER(10, -9)" unit["ang,ft"] = "num * 3.28083989501312 * POWER(10, -10)" unit["ang,yd"] = "num * 1.09361329833771 * POWER(10, -10)" unit["ang,pica"] = "num * 2.36220472440945 * POWER(10, -8)" unit["pica,m"] = "num * 4.23333333333333 * POWER(10, -3)" unit["pica,mi"] = "num * 2.63047138047138 * POWER(10, -6)" unit["pica,Nmi"] = "num * 2.28581713462923 * POWER(10, -6)" unit["pica,in"] = "num * 1.66666666666667 * POWER(10, -1)" unit["pica,ft"] = "num * 1.38888888888889 * POWER(10, -2)" unit["pica,yd"] = "num * 4.62962962962963 * POWER(10, -3)" unit["pica,ang"] = "num * 4.23333333333333 * POWER(10, +7)" // 時間 unit["yr,day"] = "num * 3.6525 * POWER(10, +2)" unit["yr,hr"] = "num * 8.766 * POWER(10, +3)" unit["yr,mn"] = "num * 5.2596 * POWER(10, +5)" unit["yr,sec"] = "num * 3.15576 * POWER(10, +7)" unit["day,yr"] = "num * 2.7378507871321 * POWER(10, -3)" unit["day,hr"] = "num * 2.4 * POWER(10, +1)" unit["day,mn"] = "num * 1.44 * POWER(10, +3)" unit["day,sec"] = "num * 8.64 * POWER(10, +4)" unit["hr,yr"] = "num * 1.14077116130504 * POWER(10, -4)" unit["hr,day"] = "num * 4.16666666666667 * POWER(10, -2)" unit["hr,mn"] = "num * 6 * POWER(10, +1)" unit["hr,sec"] = "num * 3.6 * POWER(10, +3)" unit["mn,yr"] = "num * 1.90128526884174 * POWER(10, -6)" unit["mn,day"] = "num * 6.94444444444444 * POWER(10, -4)" unit["mn,hr"] = "num * 1.66666666666667 * POWER(10, -2)" unit["mn,sec"] = "num * 6 * POWER(10, +1)" unit["sec,yr"] = "num * 3.16880878140289 * POWER(10, -8)" unit["sec,day"] = "num * 1.15740740740741 * POWER(10, -5)" unit["sec,hr"] = "num * 2.77777777777778 * POWER(10, -4)" unit["sec,mn"] = "num * 1.66666666666667 * POWER(10, -2)" // 圧力 unit["Pa,atm"] = "num * 9.86923266716013 * POWER(10, -6)" unit["Pa,mmHg"] = "num * 7.5006168270417 * POWER(10, -3)" unit["atm,Pa"] = "num * 1.01325 * POWER(10, +5)" unit["atm,mmHg"] = "num * 7.6 * POWER(10, +2)" unit["mmHg,Pa"] = "num * 1.33322368421053 * POWER(10, +2)" unit["mmHg,atm"] = "num * 1.31578947368421 * POWER(10, -3)" // 物理的な力 unit["N,dyn"] = "num * 1 * POWER(10, +5)" unit["N,lbf"] = "num * 2.2480894309971 * POWER(10, -1)" unit["dyn,N"] = "num * 1 * POWER(10, -5)" unit["dyn,lbf"] = "num * 2.2480894309971 * POWER(10, -6)" unit["lbf,N"] = "num * 4.4482216152605 * POWER(10, +0)" unit["lbf,dyn"] = "num * 4.4482216152605 * POWER(10, +5)" // エネルギー unit["J,e"] = "num * 1 * POWER(10, +7)" unit["J,cal"] = "num * 2.38845896627496 * POWER(10, -1)" unit["J,eV"] = "num * 6.241457 * POWER(10, +18)" unit["J,HPh"] = "num * 3.72506135998619 * POWER(10, -7)" unit["J,Wh"] = "num * 2.77777777777778 * POWER(10, -4)" unit["J,flb"] = "num * 7.37562149277265 * POWER(10, -1)" unit["J,BTU"] = "num * 9.47817120313317 * POWER(10, -4)" unit["J,c"] = "num * 2.39005736137667 * POWER(10, -1)" unit["e,J"] = "num * 1 * POWER(10, -7)" unit["e,cal"] = "num * 2.38845896627496 * POWER(10, -8)" unit["e,eV"] = "num * 6.241457 * POWER(10, +11)" unit["e,HPh"] = "num * 3.72506135998619 * POWER(10, -14)" unit["e,Wh"] = "num * 2.77777777777778 * POWER(10, -11)" unit["e,flb"] = "num * 7.37562149277265 * POWER(10, -8)" unit["e,BTU"] = "num * 9.47817120313317 * POWER(10, -11)" unit["e,c"] = "num * 2.39005736137667 * POWER(10, -8)" unit["cal,J"] = "num * 4.1868 * POWER(10, +0)" unit["cal,e"] = "num * 4.1868 * POWER(10, +7)" unit["cal,eV"] = "num * 2.61317321676 * POWER(10, +19)" unit["cal,HPh"] = "num * 1.55960869019902 * POWER(10, -6)" unit["cal,Wh"] = "num * 1.163 * POWER(10, -3)" unit["cal,flb"] = "num * 3.08802520659405 * POWER(10, +0)" unit["cal,BTU"] = "num * 3.9683207193278 * POWER(10, -3)" unit["cal,c"] = "num * 1.00066921606119 * POWER(10, +0)" unit["eV,J"] = "num * 1.60219000146921 * POWER(10, -19)" unit["eV,e"] = "num * 1.60219000146921 * POWER(10, -12)" unit["eV,cal"] = "num * 3.82676507468522 * POWER(10, -20)" unit["eV,HPh"] = "num * 5.96825606582916 * POWER(10, -26)" unit["eV,Wh"] = "num * 4.45052778185891 * POWER(10, -23)" unit["eV,flb"] = "num * 1.18171470103417 * POWER(10, -19)" unit["eV,BTU"] = "num * 1.51858311338733 * POWER(10, -22)" unit["eV,c"] = "num * 3.82932600733558 * POWER(10, -20)" unit["HPh,J"] = "num * 2.68451953769617 * POWER(10, +6)" unit["HPh,e"] = "num * 2.68451953769617 * POWER(10, +13)" unit["HPh,cal"] = "num * 6.41186475995073 * POWER(10, +5)" unit["HPh,eV"] = "num * 1.67553132601905 * POWER(10, +25)" unit["HPh,Wh"] = "num * 7.4569987158227 * POWER(10, +2)" unit["HPh,flb"] = "num * 1.98 * POWER(10, +6)" unit["HPh,BTU"] = "num * 2.54443357764402 * POWER(10, +3)" unit["HPh,c"] = "num * 6.41615568283024 * POWER(10, +5)" unit["Wh,J"] = "num * 3.6 * POWER(10, +3)" unit["Wh,e"] = "num * 3.6 * POWER(10, +10)" unit["Wh,cal"] = "num * 8.59845227858985 * POWER(10, +2)" unit["Wh,eV"] = "num * 2.24692452 * POWER(10, +22)" unit["Wh,HPh"] = "num * 1.34102208959503 * POWER(10, -3)" unit["Wh,flb"] = "num * 2.65522373739816 * POWER(10, +3)" unit["Wh,BTU"] = "num * 3.41214163312794 * POWER(10, +0)" unit["Wh,c"] = "num * 8.60420650095602 * POWER(10, +2)" unit["flb,J"] = "num * 1.3558179483314 * POWER(10, +0)" unit["flb,e"] = "num * 1.3558179483314 * POWER(10, +7)" unit["flb,cal"] = "num * 3.23831553532865 * POWER(10, -1)" unit["flb,eV"] = "num * 8.46227942433866 * POWER(10, +18)" unit["flb,HPh"] = "num * 5.05050505050505 * POWER(10, -7)" unit["flb,Wh"] = "num * 3.76616096758722 * POWER(10, -4)" unit["flb,BTU"] = "num * 1.28506746345658 * POWER(10, -3)" unit["flb,c"] = "num * 3.24048266809608 * POWER(10, -1)" unit["BTU,J"] = "num * 1.05505585262 * POWER(10, +3)" unit["BTU,e"] = "num * 1.05505585262 * POWER(10, +10)" unit["BTU,cal"] = "num * 2.51995761111111 * POWER(10, +2)" unit["BTU,eV"] = "num * 6.58508573672607 * POWER(10, +21)" unit["BTU,HPh"] = "num * 3.93014778922204 * POWER(10, -4)" unit["BTU,Wh"] = "num * 2.93071070172222 * POWER(10, -1)" unit["BTU,flb"] = "num * 7.78169262265965 * POWER(10, +2)" unit["BTU,c"] = "num * 2.52164400721797 * POWER(10, +2)" unit["c,J"] = "num * 4.184 * POWER(10, +0)" unit["c,e"] = "num * 4.184 * POWER(10, +7)" unit["c,cal"] = "num * 9.99331231489443 * POWER(10, -1)" unit["c,eV"] = "num * 2.6114256088 * POWER(10, +19)" unit["c,HPh"] = "num * 1.55856567301822 * POWER(10, -6)" unit["c,Wh"] = "num * 1.16222222222222 * POWER(10, -3)" unit["c,flb"] = "num * 3.08596003257608 * POWER(10, +0)" unit["c,BTU"] = "num * 3.96566683139092 * POWER(10, -3)" // 仕事率 unit["HP,W"] = "num * 7.4569987158227 * POWER(10, +2)" unit["W,HP"] = "num * 1.34102208959503 * POWER(10, -3)" // 磁力 unit["T,ga"] = "num * 1 * POWER(10, +4)" unit["ga,T"] = "num * 1 * POWER(10, -4)" // 温度 unit["C,F"] = "num * (9/5) + 32" unit["C,K"] = "num + 273.15" unit["F,C"] = "(num - 32) * (9/5)" unit["F,K"] = "(num - 32) * (5/9) + 273.15" unit["K,C"] = "num - 23373.15" unit["K,F"] = "(num - 273.15) * (9/5) + 32" // 体積(容積) unit["tsp,tbs"] = "num * 3.33333333333333 * POWER(10, -1)" unit["tsp,oz"] = "num * 1.66666666666667 * POWER(10, -1)" unit["tsp,cup"] = "num * 2.08333333333333 * POWER(10, -2)" unit["tsp,us_pt"] = "num * 1.04166666666667 * POWER(10, -2)" unit["tsp,uk_pt"] = "num * 8.67368942321863 * POWER(10, -3)" unit["tsp,qt"] = "num * 5.20833333333333 * POWER(10, -3)" unit["tsp,gal"] = "num * 1.30208333333333 * POWER(10, -3)" unit["tbs,tsp"] = "num * 3 * POWER(10, +0)" unit["tbs,oz"] = "num * 5 * POWER(10, -1)" unit["tbs,cup"] = "num * 6.25 * POWER(10, -2)" unit["tbs,us_pt"] = "num * 3.125 * POWER(10, -2)" unit["tbs,uk_pt"] = "num * 2.60210682696559 * POWER(10, -2)" unit["tbs,qt"] = "num * 1.5625 * POWER(10, -2)" unit["tbs,gal"] = "num * 3.90625 * POWER(10, -3)" unit["oz,tsp"] = "num * 6 * POWER(10, +0)" unit["oz,tbs"] = "num * 2 * POWER(10, +0)" unit["oz,cup"] = "num * 1.25 * POWER(10, -1)" unit["oz,us_pt"] = "num * 6.25 * POWER(10, -2)" unit["oz,uk_pt"] = "num * 5.20421365393118 * POWER(10, -2)" unit["oz,qt"] = "num * 3.125 * POWER(10, -2)" unit["oz,gal"] = "num * 7.8125 * POWER(10, -3)" unit["cup,tsp"] = "num * 4.8 * POWER(10, +1)" unit["cup,tbs"] = "num * 1.6 * POWER(10, +1)" unit["cup,oz"] = "num * 8 * POWER(10, +0)" unit["cup,us_pt"] = "num * 5 * POWER(10, -1)" unit["cup,uk_pt"] = "num * 4.16337092314494 * POWER(10, -1)" unit["cup,qt"] = "num * 2.5 * POWER(10, -1)" unit["cup,gal"] = "num * 6.25 * POWER(10, -2)" unit["us_pt,tsp"] = "num * 9.6 * POWER(10, +1)" unit["us_pt,tbs"] = "num * 3.2 * POWER(10, +1)" unit["us_pt,oz"] = "num * 1.6 * POWER(10, +1)" unit["us_pt,cup"] = "num * 2 * POWER(10, +0)" unit["us_pt,uk_pt"] = "num * 8.32674184628989 * POWER(10, -1)" unit["us_pt,qt"] = "num * 5 * POWER(10, -1)" unit["us_pt,gal"] = "num * 1.25 * POWER(10, -1)" unit["uk_pt,tsp"] = "num * 1.15291192848466 * POWER(10, +2)" unit["uk_pt,tbs"] = "num * 3.84303976161554 * POWER(10, +1)" unit["uk_pt,oz"] = "num * 1.92151988080777 * POWER(10, +1)" unit["uk_pt,cup"] = "num * 2.40189985100971 * POWER(10, +0)" unit["uk_pt,us_pt"] = "num * 1.20094992550486 * POWER(10, +0)" unit["uk_pt,qt"] = "num * 6.00474962752428 * POWER(10, -1)" unit["uk_pt,gal"] = "num * 1.50118740688107 * POWER(10, -1)" unit["qt,tsp"] = "num * 1.92 * POWER(10, +2)" unit["qt,tbs"] = "num * 6.4 * POWER(10, +1)" unit["qt,oz"] = "num * 3.2 * POWER(10, +1)" unit["qt,cup"] = "num * 4 * POWER(10, +0)" unit["qt,us_pt"] = "num * 2 * POWER(10, +0)" unit["qt,uk_pt"] = "num * 1.66534836925798 * POWER(10, +0)" unit["qt,gal"] = "num * 2.5 * POWER(10, -1)" unit["gal,tsp"] = "num * 7.68 * POWER(10, +2)" unit["gal,tbs"] = "num * 2.56 * POWER(10, +2)" unit["gal,oz"] = "num * 1.28 * POWER(10, +2)" unit["gal,cup"] = "num * 1.6 * POWER(10, +1)" unit["gal,us_pt"] = "num * 8 * POWER(10, +0)" unit["gal,uk_pt"] = "num * 6.66139347703191 * POWER(10, +0)" unit["gal,qt"] = "num * 4 * POWER(10, +0)" RESULT = EVAL(unit[before + "," + after]) FEND
結果
1.09361329833771

変換前単位/変換後単位

重量

単位記号説明
gグラム
sgスラグ
lbmポンド(常衝)
uU(原子質量単位)
ozmオンス(常衝)
mメートル
mi法定マイル
Nmi海里
inインチ
ftフィート
ydヤード
angオングストローム
picaパイカ

時間

単位記号説明
yr
day
hr時間
mn
sec

圧力

単位記号説明
Paパスカル
atm気圧
mmHgミリメートル Hg(トール)

物理的な力

単位記号説明
Nニュートン
dynダイン
lbfポンド フォース

エネルギー

単位記号説明
Jジュール
eエルグ
calカロリー(生理学的代謝熱量)
eV電子ボルト
HPh馬力/時
Whワット/時
flbフィートポンド
BTUBTU(英熱量)
cカロリー(物理学的熱量)

仕事率

単位記号説明
HP馬力
Wワット

磁力

単位記号説明
Tテスラ
gaガウス

温度

単位記号説明
C摂氏
F華氏

体積(容積)

単位記号説明
tsp小さじ
tbs大さじ
oz液量オンス
cupカップ
us_ptパイント(米)
uk_ptパイント(英)
qtクォート
galガロン
lリットル