unitsTest.txt (16152B)
1 # Test data for unit conversions 2 # Copyright © 1991-2025 Unicode, Inc. 3 # For terms of use, see http://www.unicode.org/copyright.html 4 # SPDX-License-Identifier: Unicode-3.0 5 # CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/) 6 # 7 # Format: 8 # Quantity ; x ; y ; conversion to y (rational) ; test: 1000 x ⟹ y 9 # 10 # Use: convert 1000 x units to the y unit; the result should match the final column, 11 # at the given precision. For example, when the last column is 159.1549, 12 # round to 4 decimal digits before comparing. 13 # Note that certain conversions are approximate, such as degrees to radians 14 # 15 # Generation: Use GenerateUnitTestData.java to regenerate unitsTest.txt. 16 17 acceleration ; meter-per-square-second ; meter-per-square-second ; 1 * x ; 1,000.00 18 acceleration ; g-force ; meter-per-square-second ; 9.80665 * x ; 9806.65 19 angle ; arc-second ; revolution ; 0.0000625/81 * x ; 7.716049E-4 20 angle ; arc-minute ; revolution ; 0.00125/27 * x ; 0.0462963 21 angle ; degree ; revolution ; 0.025/9 * x ; 2.777778 22 angle ; radian ; revolution ; 65,501,488/411557987 * x ; 159.1549 23 angle ; revolution ; revolution ; 1 * x ; 1,000.00 24 area ; square-centimeter ; square-meter ; 0.0001 * x ; 0.1 25 area ; square-inch ; square-meter ; 0.00064516 * x ; 0.64516 26 area ; square-foot ; square-meter ; 0.09290304 * x ; 92.90304 27 area ; square-yard ; square-meter ; 0.83612736 * x ; 836.1274 28 area ; square-meter ; square-meter ; 1 * x ; 1,000.00 29 area ; bu-jp ; square-meter ; 400/121 * x ; 3305.785 30 area ; se-jp ; square-meter ; 12,000/121 * x ; 99173.55 31 area ; dunam ; square-meter ; 1,000 * x ; 1000000.0 32 area ; acre ; square-meter ; 4,046.8564224 * x ; 4046856.0 33 area ; cho ; square-meter ; 1,200,000/121 * x ; 9917355.0 34 area ; hectare ; square-meter ; 10,000 * x ; 1.0E7 35 area ; square-kilometer ; square-meter ; 1,000,000 * x ; 1.0E9 36 area ; square-mile ; square-meter ; 2,589,988.110336 * x ; 2.589988E9 37 catalytic-activity ; katal ; item-per-second ; 602,214,076,000,000,000,000,000 * x ; 6.022141E26 38 concentration ; milligram-ofglucose-per-deciliter ; kilogram-item-per-kilogram-cubic-meter ; 60,221,407,600,000,000,000,000,000,000/1801557 * x ; 3.342742E25 39 concentration ; millimole-per-liter ; item-per-cubic-meter ; 602,214,076,000,000,000,000,000 * x ; 6.022141E26 40 concentration-mass ; ofglucose ; item-per-kilogram ; 6,022,140,760,000,000,000,000,000,000,000/1801557 * x ; 3.342742E27 41 consumption ; liter-per-100-kilometer ; cubic-meter-per-meter ; 0.00000001 * x ; 1.0E-5 42 consumption ; liter-per-kilometer ; cubic-meter-per-meter ; 0.000001 * x ; 0.001 43 consumption-inverse ; mile-per-gallon-imperial ; meter-per-cubic-meter ; 160,934,400,000/454609 * x ; 3.540062E8 44 consumption-inverse ; mile-per-gallon ; meter-per-cubic-meter ; 48,000,000,000/112903 * x ; 4.251437E8 45 digital ; bit ; bit ; 1 * x ; 1,000.00 46 digital ; byte ; bit ; 8 * x ; 8000.0 47 digital ; kilobit ; bit ; 1,000 * x ; 1000000.0 48 digital ; kilobyte ; bit ; 8,000 * x ; 8000000.0 49 digital ; megabit ; bit ; 1,000,000 * x ; 1.0E9 50 digital ; megabyte ; bit ; 8,000,000 * x ; 8.0E9 51 digital ; gigabit ; bit ; 1,000,000,000 * x ; 1.0E12 52 digital ; gigabyte ; bit ; 8,000,000,000 * x ; 8.0E12 53 digital ; terabit ; bit ; 1,000,000,000,000 * x ; 1.0E15 54 digital ; terabyte ; bit ; 8,000,000,000,000 * x ; 8.0E15 55 digital ; petabyte ; bit ; 8,000,000,000,000,000 * x ; 8.0E18 56 duration ; nanosecond ; second ; 0.000000001 * x ; 1.0E-6 57 duration ; microsecond ; second ; 0.000001 * x ; 0.001 58 duration ; millisecond ; second ; 0.001 * x ; 1.0 59 duration ; second ; second ; 1 * x ; 1,000.00 60 duration ; minute ; second ; 60 * x ; 60000.0 61 duration ; hour ; second ; 3,600 * x ; 3600000.0 62 duration ; day ; second ; 86,400 * x ; 8.64E7 63 duration ; day-person ; second ; 86,400 * x ; 8.64E7 64 duration ; week ; second ; 604,800 * x ; 6.048E8 65 duration ; week-person ; second ; 604,800 * x ; 6.048E8 66 duration ; fortnight ; second ; 1,209,600 * x ; 1.2096E9 67 electric-capacitance ; farad ; pow4-second-square-ampere-per-kilogram-square-meter ; 1 * x ; 1000.0 68 electric-charge ; coulomb ; second-ampere ; 1 * x ; 1000.0 69 electric-conductance ; siemens ; cubic-second-square-ampere-per-kilogram-square-meter ; 1 * x ; 1000.0 70 electric-current ; milliampere ; ampere ; 0.001 * x ; 1.0 71 electric-current ; ampere ; ampere ; 1 * x ; 1,000.00 72 electric-inductance ; henry ; kilogram-square-meter-per-square-second-square-ampere ; 1 * x ; 1000.0 73 electric-resistance ; ohm ; kilogram-square-meter-per-cubic-second-square-ampere ; 1 * x ; 1000.0 74 energy ; electronvolt ; kilogram-square-meter-per-square-second ; 0.0000000000000000001602177 * x ; 1.602177E-16 75 energy ; joule ; kilogram-square-meter-per-square-second ; 1 * x ; 1000.0 76 energy ; newton-meter ; kilogram-square-meter-per-square-second ; 1 * x ; 1000.0 77 energy ; pound-force-foot ; kilogram-square-meter-per-square-second ; 1.3558179483314004 * x ; 1355.818 78 energy ; calorie ; kilogram-square-meter-per-square-second ; 4.184 * x ; 4184.0 79 energy ; calorie-it ; kilogram-square-meter-per-square-second ; 4.1868 * x ; 4186.8 80 energy ; kilojoule ; kilogram-square-meter-per-square-second ; 1,000 * x ; 1000000.0 81 energy ; british-thermal-unit ; kilogram-square-meter-per-square-second ; 9,489.1523804/9 * x ; 1054350.0 82 energy ; british-thermal-unit-it ; kilogram-square-meter-per-square-second ; 1,055.05585262 * x ; 1055056.0 83 energy ; foodcalorie ; kilogram-square-meter-per-square-second ; 4,184 * x ; 4184000.0 84 energy ; kilocalorie ; kilogram-square-meter-per-square-second ; 4,184 * x ; 4184000.0 85 energy ; kilowatt-hour ; kilogram-square-meter-second-per-cubic-second ; 3,600,000 * x ; 3.6E9 86 energy ; therm-us ; kilogram-square-meter-per-square-second ; 105,480,400 * x ; 1.054804E11 87 force ; newton ; kilogram-meter-per-square-second ; 1 * x ; 1000.0 88 force ; pound-force ; kilogram-meter-per-square-second ; 4.4482216152605 * x ; 4448.222 89 force ; kilogram-force ; kilogram-meter-per-square-second ; 9.80665 * x ; 9806.65 90 force ; kilowatt-hour-per-100-kilometer ; kilogram-square-meter-second-per-meter-cubic-second ; 36 * x ; 36000.0 91 frequency ; hertz ; revolution-per-second ; 1 * x ; 1000.0 92 frequency ; kilohertz ; revolution-per-second ; 1,000 * x ; 1000000.0 93 frequency ; megahertz ; revolution-per-second ; 1,000,000 * x ; 1.0E9 94 frequency ; gigahertz ; revolution-per-second ; 1,000,000,000 * x ; 1.0E12 95 graphics ; dot ; pixel ; 1 * x ; 1000.0 96 graphics ; pixel ; pixel ; 1 * x ; 1,000.00 97 graphics ; megapixel ; pixel ; 1,000,000 * x ; 1.0E9 98 illuminance ; lux ; candela-per-square-meter ; 1 * x ; 1000.0 99 ionizing-radiation ; gray ; square-meter-per-square-second ; 1 * x ; 1000.0 100 ionizing-radiation ; sievert ; square-meter-per-square-second ; 1 * x ; 1000.0 101 length ; picometer ; meter ; 0.000000000001 * x ; 1.0E-9 102 length ; nanometer ; meter ; 0.000000001 * x ; 1.0E-6 103 length ; micrometer ; meter ; 0.000001 * x ; 0.001 104 length ; rin ; meter ; 0.004/121 * x ; 0.03305785 105 length ; point ; meter ; 0.003175/9 * x ; 0.3527778 106 length ; millimeter ; meter ; 0.001 * x ; 1.0 107 length ; sun ; meter ; 0.4/121 * x ; 3.305785 108 length ; centimeter ; meter ; 0.01 * x ; 10.0 109 length ; inch ; meter ; 0.0254 * x ; 25.4 110 length ; shaku-length ; meter ; 4/121 * x ; 33.05785 111 length ; shaku-cloth ; meter ; 5/121 * x ; 41.32231 112 length ; decimeter ; meter ; 0.1 * x ; 100.0 113 length ; ken ; meter ; 24/121 * x ; 198.3471 114 length ; foot ; meter ; 0.3048 * x ; 304.8 115 length ; jo-jp ; meter ; 40/121 * x ; 330.5785 116 length ; yard ; meter ; 0.9144 * x ; 914.4 117 length ; meter ; meter ; 1 * x ; 1,000.00 118 length ; fathom ; meter ; 1.8288 * x ; 1828.8 119 length ; rod ; meter ; 5.0292 * x ; 5029.2 120 length ; chain ; meter ; 20.1168 * x ; 20116.8 121 length ; furlong ; meter ; 201.168 * x ; 201168.0 122 length ; ri-jp ; meter ; 51,840/121 * x ; 428429.8 123 length ; kilometer ; meter ; 1,000 * x ; 1000000.0 124 length ; mile ; meter ; 1,609.344 * x ; 1609344.0 125 length ; nautical-mile ; meter ; 1,852 * x ; 1852000.0 126 length ; mile-scandinavian ; meter ; 10,000 * x ; 1.0E7 127 length ; earth-radius ; meter ; 6,378,100 * x ; 6.3781E9 128 length ; solar-radius ; meter ; 695,700,000 * x ; 6.957E11 129 length ; astronomical-unit ; meter ; 149,597,870,700 * x ; 1.495979E14 130 length ; light-year ; meter ; 9,460,730,472,580,800 * x ; 9.46073E18 131 length ; parsec ; meter ; 12,699,352,539,696,155,673,600,000/411557987 * x ; 3.085678E19 132 luminous-flux ; lumen ; candela-square-meter-per-square-meter ; 1 * x ; 1000.0 133 luminous-intensity ; candela ; candela ; 1 * x ; 1,000.00 134 magnetic-flux ; weber ; kilogram-square-meter-per-square-second-ampere ; 1 * x ; 1000.0 135 magnetic-induction ; tesla ; kilogram-per-square-second-ampere ; 1 * x ; 1000.0 136 mass ; dalton ; kilogram ; 0.00000000000000000000000000166053878283 * x ; 1.660539E-24 137 mass ; microgram ; kilogram ; 0.000000001 * x ; 1.0E-6 138 mass ; milligram ; kilogram ; 0.000001 * x ; 0.001 139 mass ; grain ; kilogram ; 0.00006479891 * x ; 0.06479891 140 mass ; carat ; kilogram ; 0.0002 * x ; 0.2 141 mass ; fun ; kilogram ; 0.000375 * x ; 0.375 142 mass ; gram ; kilogram ; 0.001 * x ; 1.0 143 mass ; ounce ; kilogram ; 0.028349523125 * x ; 28.34952 144 mass ; ounce-troy ; kilogram ; 0.03110348 * x ; 31.10348 145 mass ; pound ; kilogram ; 0.45359237 * x ; 453.5924 146 mass ; kilogram ; kilogram ; 1 * x ; 1,000.00 147 mass ; stone ; kilogram ; 6.35029318 * x ; 6350.293 148 mass ; slug ; kilogram ; 5,560.277019075625/381 * x ; 14593.9 149 mass ; ton ; kilogram ; 907.18474 * x ; 907184.7 150 mass ; tonne ; kilogram ; 1,000 * x ; 1000000.0 151 mass ; earth-mass ; kilogram ; 5,972,200,000,000,000,000,000,000 * x ; 5.9722E27 152 mass ; solar-mass ; kilogram ; 1,988,470,000,000,000,000,000,000,000,000 * x ; 1.98847E33 153 night-duration ; night ; night ; 1 * x ; 1,000.00 154 portion ; part-per-1e9 ; part ; 0.000000001 * x ; 1.0E-6 155 portion ; part-per-1e6 ; part ; 0.000001 * x ; 0.001 156 portion ; permyriad ; part ; 0.0001 * x ; 0.1 157 portion ; permille ; part ; 0.001 * x ; 1.0 158 portion ; percent ; part ; 0.01 * x ; 10.0 159 portion ; karat ; part ; 0.125/3 * x ; 41.66667 160 portion ; part ; part ; 1 * x ; 1,000.00 161 power ; milliwatt ; kilogram-square-meter-per-cubic-second ; 0.001 * x ; 1.0 162 power ; watt ; kilogram-square-meter-per-cubic-second ; 1 * x ; 1000.0 163 power ; horsepower ; kilogram-square-meter-per-cubic-second ; 745.69987158227022 * x ; 745699.9 164 power ; kilowatt ; kilogram-square-meter-per-cubic-second ; 1,000 * x ; 1000000.0 165 power ; megawatt ; kilogram-square-meter-per-cubic-second ; 1,000,000 * x ; 1.0E9 166 power ; gigawatt ; kilogram-square-meter-per-cubic-second ; 1,000,000,000 * x ; 1.0E12 167 power ; solar-luminosity ; kilogram-square-meter-per-cubic-second ; 382,800,000,000,000,000,000,000,000 * x ; 3.828E29 168 pressure ; pascal ; kilogram-per-meter-square-second ; 1 * x ; 1000.0 169 pressure ; hectopascal ; kilogram-per-meter-square-second ; 100 * x ; 100000.0 170 pressure ; millibar ; kilogram-per-meter-square-second ; 100 * x ; 100000.0 171 pressure ; millimeter-ofhg ; kilogram-meter-per-square-meter-square-second ; 133.322387415 * x ; 133322.4 172 pressure ; kilopascal ; kilogram-per-meter-square-second ; 1,000 * x ; 1000000.0 173 pressure ; inch-ofhg ; kilogram-meter-per-square-meter-square-second ; 3,386.388640341 * x ; 3386389.0 174 pressure ; pound-force-per-square-inch ; kilogram-meter-per-square-meter-square-second ; 111,205,540.3815125/16129 * x ; 6894757.0 175 pressure ; bar ; kilogram-per-meter-square-second ; 100,000 * x ; 1.0E8 176 pressure ; atmosphere ; kilogram-per-meter-square-second ; 101,325 * x ; 1.01325E8 177 pressure ; megapascal ; kilogram-per-meter-square-second ; 1,000,000 * x ; 1.0E9 178 pressure ; gasoline-energy-density ; kilogram-per-meter-square-second ; 722,250,000,000,000,000/22532213 * x ; 3.205411E13 179 pressure-per-length ; ofhg ; kilogram-per-square-meter-square-second ; 133,322.387415 * x ; 1.333224E8 180 radioactivity ; becquerel ; per-second ; 1 * x ; 1000.0 181 resolution ; dot-per-inch ; pixel-per-meter ; 5,000/127 * x ; 39370.08 182 resolution ; pixel-per-inch ; pixel-per-meter ; 5,000/127 * x ; 39370.08 183 resolution ; dot-per-centimeter ; pixel-per-meter ; 100 * x ; 100000.0 184 resolution ; pixel-per-centimeter ; pixel-per-meter ; 100 * x ; 100000.0 185 solid-angle ; steradian ; square-revolution ; 4,290,444,930,214,144/169379976663492169 * x ; 25.3303 186 speed ; beaufort ; meter-per-second ; special:beaufort(x) ; 58.6 187 speed ; kilometer-per-hour ; meter-per-second ; 2.5/9 * x ; 277.7778 188 speed ; mile-per-hour ; meter-per-second ; 0.44704 * x ; 447.04 189 speed ; knot ; meter-per-second ; 4.63/9 * x ; 514.4444 190 speed ; meter-per-second ; meter-per-second ; 1 * x ; 1,000.00 191 speed ; light-speed ; meter-per-second ; 299,792,458 * x ; 2.997925E11 192 substance-amount ; item ; item ; 1 * x ; 1,000.00 193 substance-amount ; mole ; item ; 602,214,076,000,000,000,000,000 * x ; 6.022141E26 194 temperature ; rankine ; kelvin ; 5/9 * x ; 555.5556 195 temperature ; fahrenheit ; kelvin ; 5/9 * x + 2,298.35/9 ; 810.9278 196 temperature ; kelvin ; kelvin ; 1 * x ; 1,000.00 197 temperature ; celsius ; kelvin ; 1 * x + 273.15 ; 1273.15 198 typewidth ; em ; em ; 1 * x ; 1,000.00 199 voltage ; volt ; kilogram-square-meter-per-cubic-second-ampere ; 1 * x ; 1000.0 200 volume ; drop ; cubic-meter ; 0.0000001540287998046875/3 * x ; 5.134293E-5 201 volume ; pinch ; cubic-meter ; 0.00000023104319970703125 * x ; 2.310432E-4 202 volume ; cubic-centimeter ; cubic-meter ; 0.000001 * x ; 0.001 203 volume ; milliliter ; cubic-meter ; 0.000001 * x ; 0.001 204 volume ; sai ; cubic-meter ; 0.002401/1331 * x ; 0.001803907 205 volume ; dessert-spoon ; cubic-meter ; 0.00000184834559765625 * x ; 0.001848346 206 volume ; dessert-spoon-imperial ; cubic-meter ; 0.0000022197705078125 * x ; 0.002219771 207 volume ; dram ; cubic-meter ; 0.0000036966911953125 * x ; 0.003696691 208 volume ; teaspoon ; cubic-meter ; 0.00000492892159375 * x ; 0.004928922 209 volume ; kosaji ; cubic-meter ; 0.000005 * x ; 0.005 210 volume ; centiliter ; cubic-meter ; 0.00001 * x ; 0.01 211 volume ; tablespoon ; cubic-meter ; 0.00001478676478125 * x ; 0.01478676 212 volume ; osaji ; cubic-meter ; 0.000015 * x ; 0.015 213 volume ; cubic-inch ; cubic-meter ; 0.000016387064 * x ; 0.01638706 214 volume ; shaku ; cubic-meter ; 0.02401/1331 * x ; 0.01803907 215 volume ; fluid-ounce-imperial ; cubic-meter ; 0.0000284130625 * x ; 0.02841306 216 volume ; fluid-ounce ; cubic-meter ; 0.0000295735295625 * x ; 0.02957353 217 volume ; fluid-ounce-metric ; cubic-meter ; 0.00003 * x ; 0.03 218 volume ; jigger ; cubic-meter ; 0.00004436029434375 * x ; 0.04436029 219 volume ; cup-jp ; cubic-meter ; 0.0001 * x ; 0.1 220 volume ; deciliter ; cubic-meter ; 0.0001 * x ; 0.1 221 volume ; cup ; cubic-meter ; 0.0002365882365 * x ; 0.2365882 222 volume ; cup-metric ; cubic-meter ; 0.00025 * x ; 0.25 223 volume ; cup-imperial ; cubic-meter ; 0.000284130625 * x ; 0.2841306 224 volume ; pint ; cubic-meter ; 0.000473176473 * x ; 0.4731765 225 volume ; pint-metric ; cubic-meter ; 0.0005 * x ; 0.5 226 volume ; pint-imperial ; cubic-meter ; 0.00056826125 * x ; 0.5682612 227 volume ; quart ; cubic-meter ; 0.000946352946 * x ; 0.9463529 228 volume ; liter ; cubic-meter ; 0.001 * x ; 1.0 229 volume ; quart-imperial ; cubic-meter ; 0.0011365225 * x ; 1.136522 230 volume ; gallon ; cubic-meter ; 0.003785411784 * x ; 3.785412 231 volume ; gallon-imperial ; cubic-meter ; 0.00454609 * x ; 4.54609 232 volume ; to-jp ; cubic-meter ; 24.01/1331 * x ; 18.03907 233 volume ; cubic-foot ; cubic-meter ; 0.028316846592 * x ; 28.31685 234 volume ; bushel ; cubic-meter ; 0.03523907016688 * x ; 35.23907 235 volume ; hectoliter ; cubic-meter ; 0.1 * x ; 100.0 236 volume ; barrel ; cubic-meter ; 0.158987294928 * x ; 158.9873 237 volume ; koku ; cubic-meter ; 240.1/1331 * x ; 180.3907 238 volume ; cubic-yard ; cubic-meter ; 0.764554857984 * x ; 764.5549 239 volume ; cubic-meter ; cubic-meter ; 1 * x ; 1,000.00 240 volume ; megaliter ; cubic-meter ; 1,000 * x ; 1000000.0 241 volume ; acre-foot ; cubic-meter ; 1,233.48183754752 * x ; 1233482.0 242 volume ; cubic-kilometer ; cubic-meter ; 1,000,000,000 * x ; 1.0E12 243 volume ; cubic-mile ; cubic-meter ; 4,168,181,825.440579584 * x ; 4.168182E12 244 year-duration ; month ; year ; 0.25/3 * x ; 83.33333 245 year-duration ; month-person ; year ; 0.25/3 * x ; 83.33333 246 year-duration ; quarter ; year ; 0.25 * x ; 250.0 247 year-duration ; year ; year ; 1 * x ; 1,000.00 248 year-duration ; year-person ; year ; 1 * x ; 1000.0 249 year-duration ; decade ; year ; 10 * x ; 10000.0 250 year-duration ; century ; year ; 100 * x ; 100000.0