From 5eacc8e2608b6c6d011db012c5dd6986aef365b2 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Wed, 4 Jan 2023 20:37:51 +0200 Subject: [PATCH] Add R ronna, Q quetta, r ronto, Q quecto, Ri robi, Qi quebi prefixes. --- NEWS.md | 1 + README.md | 16 ++++-- debian/changelog | 5 +- definitions.units.patch | 112 ++++++++++++++++++++++++-------------- definitions.units.patched | 12 ++++ expected/crosstab.out | 108 ++++++++++++++++++------------------ expected/iec.out | 34 +++++++++--- expected/prefix.out | 24 +++++--- expected/tables.out | 8 +-- expected/unit.out | 4 +- expected/units.out | 46 ++++++++++------ powers.c | 15 ++++- powers.h | 16 ++++-- sql/iec.sql | 16 ++++-- sql/tables.sql | 8 +-- unit.c | 28 ++++++++-- unit_prefixes.data | 12 ++++ 17 files changed, 305 insertions(+), 160 deletions(-) diff --git a/NEWS.md b/NEWS.md index c7d42f2..3bf08d7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ 7.6: Jan 04, 2023 ----------------- * Import definitions.units September 2022 Version 3.15. +* Add R ronna, Q quetta, r ronto, Q quecto, Ri robi, Qi quebi prefixes. 7.4: May 20, 2021 - World Metrology Day --------------------------------------- diff --git a/README.md b/README.md index ab08a51..041e34e 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ Features * United States customary units: *inch (in), foot (ft), yard (yd), mile (mi), ounce (oz), pound (lb)* * about 2400 other units imported from GNU Units (including some humorous ones) -* prefix multiples: *da, h, k, M, G, T, P, E, Z, Y* -* prefix fractions: *d, c, m, μ, n, p, f, a, z, y* -* IEC binary prefix multiples: *Ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi* +* prefix multiples: *da, h, k, M, G, T, P, E, Z, Y, R, Q* +* prefix fractions: *d, c, m, μ, n, p, f, a, z, y, r, q* +* IEC binary prefix multiples: *Ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi, Ri, Qi* * other prefixes imported from GNU Units * operators: **+, -, *, /, ^**, conversion to arbitrary scale (**@, @@**) * aggregate functions @@ -94,6 +94,12 @@ CREATE EXTENSION earthradius ----------------------------------------- ["6.35675174834046 Mm","6.37813649 Mm") + +# SET extra_float_digits = -12; +# SELECT 'earthmass'::unit as earth; + earth +───────── + 5.97 Rg ``` Installation @@ -547,10 +553,10 @@ References License ------- -Copyright (C) 2016-2019 Christoph Berg +Copyright (C) 2016-2023 Christoph Berg The definitions.units file is -Copyright (C) 1996-2018 Free Software Foundation, Inc. +Copyright (C) 1996-2022 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/debian/changelog b/debian/changelog index 7931076..06c9bed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -postgresql-unit (7.6-1) UNRELEASED; urgency=medium +postgresql-unit (7.6-1) unstable; urgency=medium [ Debian Janitor ] * Remove constraints unnecessary since buster (oldstable): @@ -8,8 +8,9 @@ postgresql-unit (7.6-1) UNRELEASED; urgency=medium [ Christoph Berg ] * Import definitions.units September 2022 Version 3.15. + * Add R ronna, Q quetta, r ronto, Q quecto, Ri robi, Qi quebi prefixes. - -- Debian Janitor Mon, 24 Oct 2022 16:32:10 -0000 + -- Christoph Berg Wed, 04 Jan 2023 20:42:16 +0200 postgresql-unit (7.5-2) unstable; urgency=medium diff --git a/definitions.units.patch b/definitions.units.patch index 1faf45a..b13fd71 100644 --- a/definitions.units.patch +++ b/definitions.units.patch @@ -1,6 +1,6 @@ ---- definitions.units 2022-05-17 15:32:26.767162879 +0200 -+++ definitions.units.patched 2022-05-18 15:10:02.482372402 +0200 -@@ -227,7 +227,7 @@ +--- definitions.units 2023-01-04 18:22:06.602713513 +0200 ++++ definitions.units.patched 2023-01-04 19:54:54.681679346 +0200 +@@ -230,7 +230,7 @@ # equator to a pole. h_SI 6.62607015e-34 @@ -9,7 +9,7 @@ kg ! # The kilogram, symbol kg, is the SI unit of mass. It is kilogram kg # defined by taking the fixed numerical value of the Planck -@@ -276,7 +276,7 @@ +@@ -279,7 +279,7 @@ # https://en.wikipedia.org/wiki/Kibble_balance k_SI 1.380649e-23 @@ -18,7 +18,7 @@ k boltzmann K ! # The kelvin, symbol K, is the SI unit of thermodynamic -@@ -319,7 +319,7 @@ +@@ -322,7 +322,7 @@ # depend directly on temperature. e_SI 1.602176634e-19 @@ -27,7 +27,7 @@ A ! # The ampere, symbol A, is the SI unit of electric current. ampere A # It is defined by taking the fixed numerical value of the -@@ -422,7 +422,9 @@ +@@ -425,7 +425,9 @@ # A primitive non-SI unit # @@ -38,24 +38,46 @@ # of a random variable over a finite alphabet is defined # to be the sum of -p(i)*log2(p(i)) over the alphabet where # p(i) is the probability that the random variable takes -@@ -477,12 +479,16 @@ - tebi- 2^40 # Electrotechnical Commission aproved these - pebi- 2^50 # binary prefixes for use in 1998. If you - exbi- 2^60 # want to refer to "megabytes" using the -+zebi- 2^70 -+yobi- 2^80 - Ki- kibi # binary definition, use these prefixes. +@@ -442,6 +444,8 @@ + # # + ########################################################################### + ++quetta- 1e30 ++ronna- 1e27 + yotta- 1e24 # Greek or Latin octo, "eight" + zetta- 1e21 # Latin septem, "seven" + exa- 1e18 # Greek hex, "six" +@@ -464,6 +468,8 @@ + atto- 1e-18 # Danish-Norwegian atten, "eighteen" + zepto- 1e-21 # Latin septem, "seven" + yocto- 1e-24 # Greek or Latin octo, "eight" ++ronto- 1e-27 ++quecto- 1e-30 + + quarter- 1|4 + semi- 0.5 +@@ -482,6 +488,8 @@ + exbi- 2^60 + zebi- 2^70 # Zebi- and yobi- were added in the 2005 ed., + yobi- 2^80 # later superseded by ISO/IEC 80000-13:2008. ++robi- 2^90 ++quebi- 2^100 + Ki- kibi Mi- mebi Gi- gibi - Ti- tebi - Pi- pebi +@@ -490,7 +498,11 @@ Ei- exbi -+Zi- zebi -+Yi- yobi + Zi- zebi + Yi- yobi ++Ri- robi ++Qi- quebi ++Q- quetta ++R- ronna Y- yotta Z- zetta -@@ -498,6 +504,7 @@ + E- exa +@@ -505,12 +517,15 @@ c- centi m- milli u- micro # it should be a mu but u is easy to type @@ -63,7 +85,15 @@ n- nano p- pico f- femto -@@ -676,6 +683,14 @@ + a- atto + z- zepto + y- yocto ++r- ronto ++q- quecto + + # + # Names of some numbers +@@ -683,6 +698,14 @@ padm 1e15 shankh 1e17 @@ -78,7 +108,7 @@ ############################################################################# # # # Derived units which can be reduced to the primitive units # -@@ -945,7 +960,7 @@ +@@ -962,7 +985,7 @@ pointangle 1|32 circle # Used for reporting compass readings centrad 0.01 radian # Used for angular deviation of light # through a prism. @@ -87,7 +117,7 @@ seclongitude circle (seconds/day) # Astronomers measure longitude # (which they call right ascension) in # time units by dividing the equator into -@@ -1066,8 +1081,8 @@ +@@ -1083,8 +1106,8 @@ tempF(x) units=[1;K] domain=[-459.67,) range=[0,) \ (x+(-32)) degF + stdtemp ; (tempF+(-stdtemp))/degF + 32 tempfahrenheit() tempF @@ -98,7 +128,7 @@ degreesrankine degF # The Rankine scale has the -@@ -1079,7 +1094,7 @@ +@@ -1096,7 +1119,7 @@ tempreaumur(x) units=[1;K] domain=[-218.52,) range=[0,) \ x degreaumur+stdtemp ; (tempreaumur+(-stdtemp))/degreaumur @@ -107,16 +137,16 @@ # particularly in France. It is defined # to be 0 at the freezing point of water # and 80 at the boiling point. Reaumur -@@ -1167,7 +1182,7 @@ +@@ -1184,7 +1207,7 @@ # Basic constants -pi 3.14159265358979323846 +#pi 3.14159265358979323846 + tau 2 pi + phi (sqrt(5)+1)/2 light c - mu0_SI 2 alpha h_SI / e_SI^2 c_SI # Vacuum magnetic permeability - mu0 2 alpha h / e^2 c # Gets overridden in CGS modes -@@ -1310,6 +1325,15 @@ +@@ -1341,6 +1364,15 @@ H2O50C 0.98807 force gram / cm^3 H2O100C 0.95838 force gram / cm^3 @@ -131,8 +161,8 @@ + # Atomic constants - -@@ -1664,7 +1688,7 @@ + hartree 4.3597447222071e-18 J # Approximate electric potential energy +@@ -1715,7 +1747,7 @@ abampere 10 A # Current which produces a force of abamp abampere # 2 dyne/cm between two infinitely @@ -141,7 +171,7 @@ abA abampere biot abampere Bi biot -@@ -2482,8 +2506,8 @@ +@@ -2668,8 +2700,8 @@ # gravitational constant. This is a # fictional year, and doesn't # correspond to any celestial event. @@ -151,8 +181,8 @@ +#au astronomicalunit # ephemeris for the above described # astronomical unit. (See the NASA # site listed above.) - GMsun 1.32712440018e20 m^3 / s^2 # heliocentric gravitational constant -@@ -2851,11 +2875,6 @@ + GMsun 132712440041.279419 km^3 / s^2 # heliocentric gravitational constant +@@ -3003,11 +3035,6 @@ int 3937|1200 ft/m # Convert US Survey measures to int- int # international measures @@ -164,7 +194,7 @@ yard 3 ft yd yard mile 5280 ft # The mile was enlarged from 5000 ft -@@ -3003,6 +3022,7 @@ +@@ -3155,6 +3182,7 @@ # Liquid measure usgallon 231 in^3 # US liquid measure is derived from @@ -172,7 +202,7 @@ gal gallon # the British wine gallon of 1707. quart 1|4 gallon # See the "winegallon" entry below pint 1|2 quart # more historical information. -@@ -3504,7 +3524,7 @@ +@@ -3656,7 +3684,7 @@ number1can 10 usfloz number2can 19 usfloz @@ -181,7 +211,7 @@ number3can 4 uscups number5can 7 uscups number10can 105 usfloz -@@ -4469,10 +4489,10 @@ +@@ -4618,10 +4646,10 @@ btu btu_IT # International Table BTU is the default britishthermalunit btu @@ -196,7 +226,7 @@ btu_ISO 1055.06 J # Exact, rounded ISO definition based # on the IT calorie quad quadrillion btu -@@ -4635,7 +4655,7 @@ +@@ -4784,7 +4812,7 @@ # Celsius heat unit: energy to raise a pound of water 1 degC @@ -204,8 +234,8 @@ +celsiusheatunit cal lb (degC) / gram K chu celsiusheatunit - POWER watt -@@ -4695,13 +4715,13 @@ + # "Apparent" average power in an AC circuit, the product of rms voltage +@@ -4842,13 +4870,13 @@ Uvalue 1/Rvalue europeanUvalue watt / m^2 K RSI degC m^2 / W @@ -221,7 +251,7 @@ # Thermal Conductivity of a few materials -@@ -5167,8 +5187,8 @@ +@@ -5352,8 +5380,8 @@ # to symbols per second. Modern # modems transmit several bits # per symbol. @@ -232,7 +262,7 @@ # them do. But beware: for # transmission over modems, a # few extra bits are used so -@@ -6607,7 +6627,7 @@ +@@ -6800,7 +6828,7 @@ pa Pa ev eV @@ -241,7 +271,7 @@ oe Oe mh mH rd rod -@@ -6989,7 +7009,8 @@ +@@ -7182,7 +7210,8 @@ Mag Maz gravity # force Maz Volm kg / oldliter # mass based on water @@ -251,7 +281,7 @@ Gf Grafut Sf Surf Vm Volm -@@ -7779,7 +7800,7 @@ +@@ -7972,7 +8001,7 @@ ton uston scruple apscruple fluidounce usfluidounce diff --git a/definitions.units.patched b/definitions.units.patched index 7f5e4a7..f92bd9d 100644 --- a/definitions.units.patched +++ b/definitions.units.patched @@ -444,6 +444,8 @@ bit 1|8 B # Basic unit of information (entropy). The entropy in bits # # ########################################################################### +quetta- 1e30 +ronna- 1e27 yotta- 1e24 # Greek or Latin octo, "eight" zetta- 1e21 # Latin septem, "seven" exa- 1e18 # Greek hex, "six" @@ -466,6 +468,8 @@ femto- 1e-15 # Danish-Norwegian femten, "fifteen" atto- 1e-18 # Danish-Norwegian atten, "eighteen" zepto- 1e-21 # Latin septem, "seven" yocto- 1e-24 # Greek or Latin octo, "eight" +ronto- 1e-27 +quecto- 1e-30 quarter- 1|4 semi- 0.5 @@ -484,6 +488,8 @@ pebi- 2^50 # in IEC 60027-2 Amendment 2 (1999). exbi- 2^60 zebi- 2^70 # Zebi- and yobi- were added in the 2005 ed., yobi- 2^80 # later superseded by ISO/IEC 80000-13:2008. +robi- 2^90 +quebi- 2^100 Ki- kibi Mi- mebi Gi- gibi @@ -492,7 +498,11 @@ Pi- pebi Ei- exbi Zi- zebi Yi- yobi +Ri- robi +Qi- quebi +Q- quetta +R- ronna Y- yotta Z- zetta E- exa @@ -514,6 +524,8 @@ f- femto a- atto z- zepto y- yocto +r- ronto +q- quecto # # Names of some numbers diff --git a/expected/crosstab.out b/expected/crosstab.out index 6e899bf..3b7cbca 100644 --- a/expected/crosstab.out +++ b/expected/crosstab.out @@ -82,8 +82,10 @@ WHERE \crosstabview f | 1 | 1 m | 1 kg | 1 s | 1 A | 1 K | 1 mol | 1 cd | 1 B | 1 Hz | 1 N | 1 Pa | 1 J | 1 W | 1 C | 1 V | 1 F | 1 Ω | 1 S | 1 Wb | 1 T | 1 H | 1 lx | 1 Gy | 1 kat ---------------+---------------+---------+----------+---------+---------+---------+-----------+----------+---------+----------+---------+----------+---------+---------+---------+---------+---------+---------+---------+----------+---------+---------+----------+----------+----------- - 1e+27 | 1e+27 | 1e+27 m | 1e+27 kg | 1e+27 s | 1e+27 A | 1e+27 K | 1e+27 mol | 1e+27 cd | 1e+27 B | 1e+27 Hz | 1e+27 N | 1e+27 Pa | 1e+27 J | 1e+27 W | 1e+27 C | 1e+27 V | 1e+27 F | 1e+27 Ω | 1e+27 S | 1e+27 Wb | 1e+27 T | 1e+27 H | 1e+27 lx | 1e+27 Gy | 1e+27 kat - 1e+24 | 1e+24 | 1 Ym | 1e+24 kg | 1 Ys | 1 YA | 1 YK | 1 Ymol | 1 Ycd | 1 YB | 1 YHz | 1 YN | 1 YPa | 1 YJ | 1 YW | 1 YC | 1 YV | 1 YF | 1 YΩ | 1 YS | 1 YWb | 1 YT | 1 YH | 1 Ylx | 1 YGy | 1 Ykat + 1e+33 | 1e+33 | 1e+33 m | 1e+33 kg | 1e+33 s | 1e+33 A | 1e+33 K | 1e+33 mol | 1e+33 cd | 1e+33 B | 1e+33 Hz | 1e+33 N | 1e+33 Pa | 1e+33 J | 1e+33 W | 1e+33 C | 1e+33 V | 1e+33 F | 1e+33 Ω | 1e+33 S | 1e+33 Wb | 1e+33 T | 1e+33 H | 1e+33 lx | 1e+33 Gy | 1e+33 kat + 1e+30 | 1e+30 | 1 Qm | 1e+30 kg | 1 Qs | 1 QA | 1 QK | 1 Qmol | 1 Qcd | 1 QB | 1 QHz | 1 QN | 1 QPa | 1 QJ | 1 QW | 1 QC | 1 QV | 1 QF | 1 QΩ | 1 QS | 1 QWb | 1 QT | 1 QH | 1 Qlx | 1 QGy | 1 Qkat + 1e+27 | 1e+27 | 1 Rm | 1 Qg | 1 Rs | 1 RA | 1 RK | 1 Rmol | 1 Rcd | 1 RB | 1 RHz | 1 RN | 1 RPa | 1 RJ | 1 RW | 1 RC | 1 RV | 1 RF | 1 RΩ | 1 RS | 1 RWb | 1 RT | 1 RH | 1 Rlx | 1 RGy | 1 Rkat + 1e+24 | 1e+24 | 1 Ym | 1 Rg | 1 Ys | 1 YA | 1 YK | 1 Ymol | 1 Ycd | 1 YB | 1 YHz | 1 YN | 1 YPa | 1 YJ | 1 YW | 1 YC | 1 YV | 1 YF | 1 YΩ | 1 YS | 1 YWb | 1 YT | 1 YH | 1 Ylx | 1 YGy | 1 Ykat 1e+21 | 1e+21 | 1 Zm | 1 Yg | 1 Zs | 1 ZA | 1 ZK | 1 Zmol | 1 Zcd | 1 ZB | 1 ZHz | 1 ZN | 1 ZPa | 1 ZJ | 1 ZW | 1 ZC | 1 ZV | 1 ZF | 1 ZΩ | 1 ZS | 1 ZWb | 1 ZT | 1 ZH | 1 Zlx | 1 ZGy | 1 Zkat 1e+18 | 1e+18 | 1 Em | 1 Zg | 1 Es | 1 EA | 1 EK | 1 Emol | 1 Ecd | 1 EB | 1 EHz | 1 EN | 1 EPa | 1 EJ | 1 EW | 1 EC | 1 EV | 1 EF | 1 EΩ | 1 ES | 1 EWb | 1 ET | 1 EH | 1 Elx | 1 EGy | 1 Ekat 1e+15 | 1e+15 | 1 Pm | 1 Eg | 1 Ps | 1 PA | 1 PK | 1 Pmol | 1 Pcd | 1 PB | 1 PHz | 1 PN | 1 PPa | 1 PJ | 1 PW | 1 PC | 1 PV | 1 PF | 1 PΩ | 1 PS | 1 PWb | 1 PT | 1 PH | 1 Plx | 1 PGy | 1 Pkat @@ -100,10 +102,12 @@ WHERE 1e-18 | 1e-18 | 1 am | 1 fg | 1 as | 1 aA | 1 aK | 1 amol | 1 acd | 1 aB | 1 aHz | 1 aN | 1 aPa | 1 aJ | 1 aW | 1 aC | 1 aV | 1 aF | 1 aΩ | 1 aS | 1 aWb | 1 aT | 1 aH | 1 alx | 1 aGy | 1 akat 1e-21 | 1e-21 | 1 zm | 1 ag | 1 zs | 1 zA | 1 zK | 1 zmol | 1 zcd | 1 zB | 1 zHz | 1 zN | 1 zPa | 1 zJ | 1 zW | 1 zC | 1 zV | 1 zF | 1 zΩ | 1 zS | 1 zWb | 1 zT | 1 zH | 1 zlx | 1 zGy | 1 zkat 1e-24 | 1e-24 | 1 ym | 1 zg | 1 ys | 1 yA | 1 yK | 1 ymol | 1 ycd | 1 yB | 1 yHz | 1 yN | 1 yPa | 1 yJ | 1 yW | 1 yC | 1 yV | 1 yF | 1 yΩ | 1 yS | 1 yWb | 1 yT | 1 yH | 1 ylx | 1 yGy | 1 ykat - 1e-27 | 1e-27 | 1e-27 m | 1 yg | 1e-27 s | 1e-27 A | 1e-27 K | 1e-27 mol | 1e-27 cd | 1e-27 B | 1e-27 Hz | 1e-27 N | 1e-27 Pa | 1e-27 J | 1e-27 W | 1e-27 C | 1e-27 V | 1e-27 F | 1e-27 Ω | 1e-27 S | 1e-27 Wb | 1e-27 T | 1e-27 H | 1e-27 lx | 1e-27 Gy | 1e-27 kat - 1e-30 | 1e-30 | 1e-30 m | 1e-30 kg | 1e-30 s | 1e-30 A | 1e-30 K | 1e-30 mol | 1e-30 cd | 1e-30 B | 1e-30 Hz | 1e-30 N | 1e-30 Pa | 1e-30 J | 1e-30 W | 1e-30 C | 1e-30 V | 1e-30 F | 1e-30 Ω | 1e-30 S | 1e-30 Wb | 1e-30 T | 1e-30 H | 1e-30 lx | 1e-30 Gy | 1e-30 kat + 1e-27 | 1e-27 | 1 rm | 1 yg | 1 rs | 1 rA | 1 rK | 1 rmol | 1 rcd | 1 rB | 1 rHz | 1 rN | 1 rPa | 1 rJ | 1 rW | 1 rC | 1 rV | 1 rF | 1 rΩ | 1 rS | 1 rWb | 1 rT | 1 rH | 1 rlx | 1 rGy | 1 rkat + 1e-30 | 1e-30 | 1 qm | 1 rg | 1 qs | 1 qA | 1 qK | 1 qmol | 1 qcd | 1 qB | 1 qHz | 1 qN | 1 qPa | 1 qJ | 1 qW | 1 qC | 1 qV | 1 qF | 1 qΩ | 1 qS | 1 qWb | 1 qT | 1 qH | 1 qlx | 1 qGy | 1 qkat + 1e-33 | 1e-33 | 1e-33 m | 1 qg | 1e-33 s | 1e-33 A | 1e-33 K | 1e-33 mol | 1e-33 cd | 1e-33 B | 1e-33 Hz | 1e-33 N | 1e-33 Pa | 1e-33 J | 1e-33 W | 1e-33 C | 1e-33 V | 1e-33 F | 1e-33 Ω | 1e-33 S | 1e-33 Wb | 1e-33 T | 1e-33 H | 1e-33 lx | 1e-33 Gy | 1e-33 kat + 1e-36 | 1e-36 | 1e-36 m | 1e-36 kg | 1e-36 s | 1e-36 A | 1e-36 K | 1e-36 mol | 1e-36 cd | 1e-36 B | 1e-36 Hz | 1e-36 N | 1e-36 Pa | 1e-36 J | 1e-36 W | 1e-36 C | 1e-36 V | 1e-36 F | 1e-36 Ω | 1e-36 S | 1e-36 Wb | 1e-36 T | 1e-36 H | 1e-36 lx | 1e-36 Gy | 1e-36 kat 0 | 0 | 0 m | 0 kg | 0 s | 0 A | 0 K | 0 mol | 0 cd | 0 B | 0 Hz | 0 N | 0 Pa | 0 J | 0 W | 0 C | 0 V | 0 F | 0 Ω | 0 S | 0 Wb | 0 T | 0 H | 0 lx | 0 Gy | 0 kat -(21 rows) +(25 rows) -- test division WITH i(i) AS (VALUES ('-2'::unit), ('-1'), ('1'), ('2')) @@ -248,52 +252,52 @@ WHERE u <> 'kg' AND (p||u) <> 'dat' -- ambiguous \crosstabview - u | y | z | a | f | p | n | µ | mu | m | c | d | | da | h | k | M | G | T | P | E | Z | Y ------+-----------------+-----------------+-----------------+-----------------+--------------------+-----------------+-----------------+-----------------+-----------------+-----------------+----------------+----------------+----------------+-------------------------------+-----------------+-----------------+------------------+---------------------+-------------------+-----------------+-----------------+----------------- - m/m | 1e-24 | 1e-21 | 1e-18 | 1e-15 | 1e-12 | 1e-09 | 1e-06 | 1e-06 | 0.001 | 0.01 | 0.1 | 1 | 10 | 100 | 1000 | 1000000 | 1000000000 | 1000000000000 | 1e+15 | 1e+18 | 1e+21 | 1e+24 - m | 1 ym | 1 zm | 1 am | 1 fm | 1 pm | 1 nm | 1 µm | 1 µm | 1 mm | 10 mm | 100 mm | 1 m | 10 m | 100 m | 1 km | 1 Mm | 1 Gm | 1 Tm | 1 Pm | 1 Em | 1 Zm | 1 Ym - s | 1 ys | 1 zs | 1 as | 1 fs | 1 ps | 1 ns | 1 µs | 1 µs | 1 ms | 10 ms | 100 ms | 1 s | 10 s | 100 s | 1 ks | 1 Ms | 100 µT | 1 Ts | 1 Ps | 1 Es | 1 Zs | 1 Ys - A | 1 yA | 1 zA | 1 aA | 1 fA | 1 pA | 1 nA | 1 µA | 1 µA | 1 mA | 10 mA | 100 mA | 1 A | 10 A | 100 A | 1 kA | 1 MA | 1 GA | 1 TA | 1 PA | 1 EA | 1 ZA | 1 YA - K | 1 yK | 1 zK | 1 aK | 1 fK | 1 pK | 1 nK | 1 µK | 1 µK | 1 mK | 10 mK | 100 mK | 1 K | 10 K | 100 K | 1 kK | 1 MK | 1 GK | 1 TK | 1 PK | 1 EK | 1 ZK | 1 YK - mol | 1 ymol | 1 zmol | 1 amol | 1 fmol | 1 pmol | 1 nmol | 1 µmol | 1 µmol | 1 mmol | 10 mmol | 100 mmol | 1 mol | 10 mol | 100 mol | 1 kmol | 1 Mmol | 1 Gmol | 1 Tmol | 1 Pmol | 1 Emol | 1 Zmol | 1 Ymol - cd | 1 ycd | 1 zcd | 1 acd | 1 fcd | 1 pcd | 1 ncd | 1 µcd | 1 µcd | 1 mcd | 10 mcd | 100 mcd | 1 cd | 10 cd | 100 cd | 1 kcd | 1 Mcd | 1 Gcd | 1 Tcd | 1 Pcd | 1 Ecd | 1 Zcd | 1 Ycd - B | 1 yB | 1 zB | 1 aB | 1 fB | 1 pB | 1 nB | 1 µB | 1 µB | 1 mB | 10 mB | 100 mB | 1 B | 10 B | 100 B | 1 kB | 1 MB | 1 GB | 1 TB | 1 PB | 1 EB | 1 ZB | 1 YB - sr | 1e-24 | 1e-21 | 1e-18 | 1e-15 | 1e-12 | 1e-09 | 1e-06 | 1e-06 | 0.001 | 0.01 | 0.1 | 1 | 10 | 100 | 1000 | 1000000 | 1000000000 | 1000000000000 | 1e+15 | 1e+18 | 1e+21 | 1e+24 - Hz | 1 yHz | 1 zHz | 1 aHz | 1 fHz | 1 pHz | 1 nHz | 1 µHz | 1 µHz | 1 mHz | 10 mHz | 100 mHz | 1 Hz | 10 Hz | 100 Hz | 1 kHz | 1 MHz | 1 GHz | 1 THz | 1 PHz | 1 EHz | 1 ZHz | 1 YHz - N | 1 yN | 1 zN | 1 aN | 1 fN | 1 pN | 1 nN | 1 µN | 1 µN | 1 mN | 10 mN | 100 mN | 1 N | 10 N | 100 N | 1 kN | 1 MN | 1 GN | 1 TN | 1 PN | 1 EN | 1 ZN | 1 YN - Pa | 1 yPa | 1 zPa | 1 aPa | 1 fPa | 1 pPa | 1 nPa | 1 µPa | 1 µPa | 1 mPa | 10 mPa | 100 mPa | 1 Pa | 10 Pa | 100 Pa | 1 kPa | 1 MPa | 1 GPa | 1 TPa | 1 PPa | 1 EPa | 1 ZPa | 1 YPa - J | 1 yJ | 1 zJ | 1 aJ | 1 fJ | 1 pJ | 1 nJ | 1 µJ | 1 µJ | 1 mJ | 10 mJ | 100 mJ | 1 J | 10 J | 100 J | 1 kJ | 1 MJ | 1 GJ | 1 TJ | 1 PJ | 1 EJ | 1 ZJ | 1 YJ - W | 1 yW | 1 zW | 1 aW | 1 fW | 1 pW | 1 nW | 1 µW | 1 µW | 1 mW | 10 mW | 100 mW | 1 W | 10 W | 100 W | 1 kW | 1 MW | 1 GW | 1 TW | 1 PW | 1 EW | 1 ZW | 1 YW - C | 1 yC | 1 zC | 1 aC | 1 fC | 1 pC | 1 nC | 1 µC | 1 µC | 1 mC | 10 mC | 100 mC | 1 C | 10 C | 100 C | 1 kC | 1 MC | 1 GC | 1 TC | 1 PC | 1 EC | 1 ZC | 1 YC - V | 1 yV | 1 zV | 1 aV | 1 fV | 1 pV | 1 nV | 1 µV | 1 µV | 1 mV | 10 mV | 100 mV | 1 V | 10 V | 100 V | 1 kV | 1 MV | 1 GV | 1 TV | 1 PV | 1 EV | 1 ZV | 1 YV - F | 1 yF | 1 zF | 1 aF | 1 fF | 1 pF | 1 nF | 1 µF | 1 µF | 1 mF | 10 mF | 100 mF | 1 F | 10 F | 100 F | 1 kF | 1 MF | 1 GF | 1 TF | 1 PF | 1 EF | 1 ZF | 1 YF - Ω | 1 yΩ | 1 zΩ | 1 aΩ | 1 fΩ | 1 pΩ | 1 nΩ | 1 µΩ | 1 µΩ | 1 mΩ | 10 mΩ | 100 mΩ | 1 Ω | 10 Ω | 100 Ω | 1 kΩ | 1 MΩ | 1 GΩ | 1 TΩ | 1 PΩ | 1 EΩ | 1 ZΩ | 1 YΩ - ohm | 1 yΩ | 1 zΩ | 1 aΩ | 1 fΩ | 1 pΩ | 1 nΩ | 1 µΩ | 1 µΩ | 1 mΩ | 10 mΩ | 100 mΩ | 1 Ω | 10 Ω | 100 Ω | 1 kΩ | 1 MΩ | 1 GΩ | 1 TΩ | 1 PΩ | 1 EΩ | 1 ZΩ | 1 YΩ - S | 1 yS | 1 zS | 1 aS | 1 fS | 1 pS | 1 nS | 1 µS | 1 µS | 1 mS | 10 mS | 100 mS | 1 S | 10 S | 100 S | 1 kS | 1 MS | 1 GS | 1 TS | 1 PS | 1 ES | 1 ZS | 1 YS - Wb | 1 yWb | 1 zWb | 1 aWb | 1 fWb | 1 pWb | 1 nWb | 1 µWb | 1 µWb | 1 mWb | 10 mWb | 100 mWb | 1 Wb | 10 Wb | 100 Wb | 1 kWb | 1 MWb | 1 GWb | 1 TWb | 1 PWb | 1 EWb | 1 ZWb | 1 YWb - T | 1 yT | 1 zT | 1 aT | 1 fT | 1 pT | 1 nT | 1 µT | 1 µT | 1 mT | 10 mT | 100 mT | 1 T | 10 T | 100 T | 1 kT | 1 MT | 1 GT | 1 TT | 1 PT | 1 ET | 1 ZT | 1 YT - H | 1 yH | 1 zH | 1 aH | 1 fH | 1 pH | 1 nH | 1 µH | 1 µH | 1 mH | 10 mH | 100 mH | 1 H | 10 H | 100 H | 1 kH | 1 MH | 1 GH | 1 TH | 1 PH | 1 EH | 1 ZH | 1 YH - °C | 1 yK | 1 zK | 1 aK | 1 fK | 1 pK | 1 nK | 1 µK | 1 µK | 1 mK | 10 mK | 100 mK | 1 K | 10 K | 100 K | 1 kK | 1 MK | 1 GK | 1 TK | 1 PK | 1 EK | 1 ZK | 1 YK - lm | 1 ycd | 1 zcd | 1 acd | 1 fcd | 1 pcd | 1 ncd | 1 µcd | 1 µcd | 1 mcd | 10 mcd | 100 mcd | 1 cd | 10 cd | 100 cd | 1 kcd | 1 Mcd | 1 Gcd | 1 Tcd | 1 Pcd | 1 Ecd | 1 Zcd | 1 Ycd - lx | 1 ylx | 1 zlx | 1 alx | 1 flx | 1 plx | 1 nlx | 1 µlx | 1 µlx | 1 mlx | 10 mlx | 100 mlx | 1 lx | 10 lx | 100 lx | 1 klx | 1 Mlx | 1 Glx | 1 Tlx | 1 Plx | 1 Elx | 1 Zlx | 1 Ylx - Bq | 1 yHz | 1 zHz | 1 aHz | 1 fHz | 1 pHz | 1 nHz | 1 µHz | 1 µHz | 1 mHz | 10 mHz | 100 mHz | 1 Hz | 10 Hz | 100 Hz | 1 kHz | 1 MHz | 1 GHz | 1 THz | 1 PHz | 1 EHz | 1 ZHz | 1 YHz - Gy | 1 yGy | 1 zGy | 1 aGy | 1 fGy | 1 pGy | 1 nGy | 1 µGy | 1 µGy | 1 mGy | 10 mGy | 100 mGy | 1 Gy | 10 Gy | 100 Gy | 1 kGy | 1 MGy | 1 GGy | 1 TGy | 1 PGy | 1 EGy | 1 ZGy | 1 YGy - rad | 1e-26 Gy | 10 yGy | 10 zGy | 10 aGy | 10 fGy | 10 pGy | 10 nGy | 10 nGy | 10 µGy | 100 µGy | 1 mGy | 10 mGy | 100 mGy | 1 Gy | 10 Gy | 10 kGy | 10 MGy | 10 GGy | 10 TGy | 10 PGy | 10 EGy | 10 ZGy - Sv | 1 yGy | 1 zGy | 1 aGy | 1 fGy | 1 pGy | 1 nGy | 1 µGy | 1 µGy | 1 mGy | 10 mGy | 100 mGy | 1 Gy | 10 Gy | 100 Gy | 1 kGy | 1 MGy | 1 GGy | 1 TGy | 1 PGy | 1 EGy | 1 ZGy | 1 YGy - kat | 1 ykat | 1 zkat | 1 akat | 1 fkat | 1 pkat | 1 nkat | 1 µkat | 1 µkat | 1 mkat | 10 mkat | 100 mkat | 1 kat | 10 kat | 100 kat | 1 kkat | 1 Mkat | 1 Gkat | 1 Tkat | 1 Pkat | 1 Ekat | 1 Zkat | 1 Ykat - g | 1 yg | 1 zg | 1 ag | 1 fg | 1 pg | 1 ng | 1 µg | 1 µg | 1 mg | 10 mg | 100 mg | 1 g | 10 g | 100 g | 1 kg | 1 Mg | 1 Gg | 1 Tg | 1 Pg | 1 Eg | 1 Zg | 1 Yg - a | 1e-22 m^2 | 1e-19 m^2 | 1e-16 m^2 | 1e-13 m^2 | 1 Pa | 1e-07 m^2 | 0.0001 m^2 | 0.0001 m^2 | 0.1 m^2 | 1 m^2 | 86.4 ks | 100 m^2 | 1000 m^2 | 10000 m^2 | 100000 m^2 | 100000000 m^2 | 100000000000 m^2 | 100000000000000 m^2 | 1 Pa | 1e+20 m^2 | 1e+23 m^2 | 1e+26 m^2 - l | 1e-27 m^3 | 1e-24 m^3 | 1e-21 m^3 | 1e-18 m^3 | 1e-15 m^3 | 1e-12 m^3 | 1e-09 m^3 | 1e-09 m^3 | 1e-06 m^3 | 1e-05 m^3 | 0.0001 m^3 | 0.001 m^3 | 0.01 m^3 | 0.1 m^3 | 1 m^3 | 1000 m^3 | 1000000 m^3 | 1000000000 m^3 | 1000000000000 m^3 | 1e+15 m^3 | 1e+18 m^3 | 1e+21 m^3 - t | 1 ag | 1 fg | 98.0665 kPa | 304.8 mm | 0.000473176473 m^3 | 1 N | 1 g | 1 g | 1 kg | 200 mg | 100 kg | 1 Mg | | 100 Mg | 1 Gg | 1 Tg | 1 Pg | 1 Eg | 1 Zg | 1 Yg | 1e+24 kg | 1e+27 kg - bar | 100 zPa | 100 aPa | 100 fPa | 100 pPa | 100 nPa | 100 µPa | 100 mPa | 100 mPa | 100 Pa | 1 kPa | 10 kPa | 100 kPa | 1 MPa | 1.05457181764616e-34 m^2*kg/s | 100 MPa | 100 GPa | 100 TPa | 100 PPa | 100 EPa | 100 ZPa | 100 YPa | 1e+29 Pa - min | 60 ys | 60 zs | 60 as | 60 fs | 60 ps | 60 ns | 60 µs | 60 µs | 60 ms | 600 ms | 6 s | 60 s | 600 s | 6 ks | 60 ks | 60 Ms | 60 Gsec | 60 Ts | 60 Ps | 60 Es | 60 Zs | 60 Ys - hr | 3.6 zs | 3.6 as | 3.6 fs | 3.6 ps | 3.6 ns | 3.6 µs | 3.6 ms | 3.6 ms | 3.6 s | 36 s | 360 s | 3.6 ks | 36 ks | 360 ks | 3.6 Ms | 3.6 Gsec | 3.6 Ts | 3.6 Ps | 3.6 Es | 3.6 Zs | 3.6 Ys | 3.6e+27 s - d | 914.4 mm | 86.4 as | 86.4 fs | 86.4 ps | 86.4 ns | 86.4 µs | 86.4 ms | 86.4 ms | 86.4 s | 1 cd | 8.64 ks | 86.4 ks | 864 ks | 0.238480942392 m^3 | 86.4 Ms | 86.4 Gsec | 86.4 Ts | 86.4 Ps | 86.4 Es | 86.4 Zs | 86.4 Ys | 8.64e+28 s - in | 2.54e-26 m | 25.4 ym | 25.4 zm | 25.4 am | 0.020457405 m^3 | 25.4 pm | 25.4 nm | 25.4 nm | 60 s | 254 µm | 2.54 mm | 25.4 mm | 254 mm | 2.54 m | 600 g | 25.4 km | 25.4 Mm | 25.4 Gm | 25.4 Tm | 25.4 Pm | 25.4 Em | 25.4 Zm - ft | 3.048e-25 m | 304.8 ym | 304.8 zm | 304.8 am | 304.8 fm | 304.8 pm | 304.8 nm | 304.8 nm | 304.8 µm | 3.048 mm | 30.48 mm | 304.8 mm | 3.048 m | 30.48 m | 304.8 m | 304.8 km | 304.8 Mm | 304.8 Gm | 304.8 Tm | 304.8 Pm | 304.8 Em | 304.8 Zm - yd | 9.144e-25 m | 914.4 ym | 914.4 zm | 914.4 am | 914.4 fm | 914.4 pm | 914.4 nm | 914.4 nm | 914.4 µm | 9.144 mm | 91.44 mm | 914.4 mm | 9.144 m | 91.44 m | 914.4 m | 914.4 km | 914.4 Mm | 914.4 Gm | 914.4 Tm | 914.4 Pm | 914.4 Em | 914.4 Zm - mi | 1.609344 zm | 1.609344 am | 1.609344 fm | 1.609344 pm | 1.609344 nm | 1.852 km | 1.609344 mm | 1.609344 mm | 1.609344 m | 16.09344 m | 160.9344 m | 1.609344 km | 16.09344 km | 160.9344 km | 1.609344 Mm | 1.609344 Gm | 1.609344 Tm | 1.609344 Pm | 1.609344 Em | 1.609344 Zm | 1.609344 Ym | 1.609344e+27 m - oz | 28.349523125 yg | 28.349523125 zg | 28.349523125 ag | 28.349523125 fg | 28.349523125 pg | 28.349523125 ng | 28.349523125 µg | 28.349523125 µg | 28.349523125 mg | 283.49523125 mg | 2.8349523125 g | 28.349523125 g | 283.49523125 g | 2.8349523125 kg | 28.349523125 kg | 28.349523125 Mg | 28.349523125 Gg | 28.349523125 Tg | 28.349523125 Pg | 28.349523125 Eg | 28.349523125 Zg | 28.349523125 Yg - lb | 453.59237 yg | 453.59237 zg | 453.59237 ag | 453.59237 fg | 453.59237 pg | 453.59237 ng | 453.59237 µg | 453.59237 µg | 453.59237 mg | 4.5359237 g | 45.359237 g | 453.59237 g | 4.5359237 kg | 45.359237 kg | 453.59237 kg | 453.59237 Mg | 453.59237 Gg | 453.59237 Tg | 453.59237 Pg | 453.59237 Eg | 453.59237 Zg | 453.59237 Yg + u | q | r | y | z | a | f | p | n | µ | mu | m | c | d | | da | h | k | M | G | T | P | E | Z | Y | R | Q +-----+--------------------+---------------------+-----------------+-----------------+-----------------+-----------------+--------------------+-----------------+-----------------+-----------------+-----------------+-----------------+----------------+----------------+----------------+-------------------------------+-----------------+-----------------+------------------+---------------------+-------------------+-----------------+-----------------+-----------------+-----------------+----------------- + m/m | 1e-30 | 1e-27 | 1e-24 | 1e-21 | 1e-18 | 1e-15 | 1e-12 | 1e-09 | 1e-06 | 1e-06 | 0.001 | 0.01 | 0.1 | 1 | 10 | 100 | 1000 | 1000000 | 1000000000 | 1000000000000 | 1e+15 | 1e+18 | 1e+21 | 1e+24 | 1e+27 | 1e+30 + m | 1 qm | 1 rm | 1 ym | 1 zm | 1 am | 1 fm | 1 pm | 1 nm | 1 µm | 1 µm | 1 mm | 10 mm | 100 mm | 1 m | 10 m | 100 m | 1 km | 1 Mm | 1 Gm | 1 Tm | 1 Pm | 1 Em | 1 Zm | 1 Ym | 1 Rm | 1 Qm + s | 1 qs | 1 rs | 1 ys | 1 zs | 1 as | 1 fs | 1 ps | 1 ns | 1 µs | 1 µs | 1 ms | 10 ms | 100 ms | 1 s | 10 s | 100 s | 1 ks | 1 Ms | 100 µT | 1 Ts | 1 Ps | 1 Es | 1 Zs | 1 Ys | 1 Rs | 1 Qs + A | 1 qA | 1 rA | 1 yA | 1 zA | 1 aA | 1 fA | 1 pA | 1 nA | 1 µA | 1 µA | 1 mA | 10 mA | 100 mA | 1 A | 10 A | 100 A | 1 kA | 1 MA | 1 GA | 1 TA | 1 PA | 1 EA | 1 ZA | 1 YA | 1 RA | 1 QA + K | 1 qK | 1 rK | 1 yK | 1 zK | 1 aK | 1 fK | 1 pK | 1 nK | 1 µK | 1 µK | 1 mK | 10 mK | 100 mK | 1 K | 10 K | 100 K | 1 kK | 1 MK | 1 GK | 1 TK | 1 PK | 1 EK | 1 ZK | 1 YK | 1 RK | 1 QK + mol | 1 qmol | 1 rmol | 1 ymol | 1 zmol | 1 amol | 1 fmol | 1 pmol | 1 nmol | 1 µmol | 1 µmol | 1 mmol | 10 mmol | 100 mmol | 1 mol | 10 mol | 100 mol | 1 kmol | 1 Mmol | 1 Gmol | 1 Tmol | 1 Pmol | 1 Emol | 1 Zmol | 1 Ymol | 1 Rmol | 1 Qmol + cd | 1 qcd | 1 rcd | 1 ycd | 1 zcd | 1 acd | 1 fcd | 1 pcd | 1 ncd | 1 µcd | 1 µcd | 1 mcd | 10 mcd | 100 mcd | 1 cd | 10 cd | 100 cd | 1 kcd | 1 Mcd | 1 Gcd | 1 Tcd | 1 Pcd | 1 Ecd | 1 Zcd | 1 Ycd | 1 Rcd | 1 Qcd + B | 1 qB | 1 rB | 1 yB | 1 zB | 1 aB | 1 fB | 1 pB | 1 nB | 1 µB | 1 µB | 1 mB | 10 mB | 100 mB | 1 B | 10 B | 100 B | 1 kB | 1 MB | 1 GB | 1 TB | 1 PB | 1 EB | 1 ZB | 1 YB | 1 RB | 1 QB + sr | 1e-30 | 1e-27 | 1e-24 | 1e-21 | 1e-18 | 1e-15 | 1e-12 | 1e-09 | 1e-06 | 1e-06 | 0.001 | 0.01 | 0.1 | 1 | 10 | 100 | 1000 | 1000000 | 1000000000 | 1000000000000 | 1e+15 | 1e+18 | 1e+21 | 1e+24 | 1e+27 | 1e+30 + Hz | 1 qHz | 1 rHz | 1 yHz | 1 zHz | 1 aHz | 1 fHz | 1 pHz | 1 nHz | 1 µHz | 1 µHz | 1 mHz | 10 mHz | 100 mHz | 1 Hz | 10 Hz | 100 Hz | 1 kHz | 1 MHz | 1 GHz | 1 THz | 1 PHz | 1 EHz | 1 ZHz | 1 YHz | 1 RHz | 1 QHz + N | 1 qN | 1 rN | 1 yN | 1 zN | 1 aN | 1 fN | 1 pN | 1 nN | 1 µN | 1 µN | 1 mN | 10 mN | 100 mN | 1 N | 10 N | 100 N | 1 kN | 1 MN | 1 GN | 1 TN | 1 PN | 1 EN | 1 ZN | 1 YN | 1 RN | 1 QN + Pa | 1 qPa | 1 rPa | 1 yPa | 1 zPa | 1 aPa | 1 fPa | 1 pPa | 1 nPa | 1 µPa | 1 µPa | 1 mPa | 10 mPa | 100 mPa | 1 Pa | 10 Pa | 100 Pa | 1 kPa | 1 MPa | 1 GPa | 1 TPa | 1 PPa | 1 EPa | 1 ZPa | 1 YPa | 1 RPa | 1 QPa + J | 1 qJ | 1 rJ | 1 yJ | 1 zJ | 1 aJ | 1 fJ | 1 pJ | 1 nJ | 1 µJ | 1 µJ | 1 mJ | 10 mJ | 100 mJ | 1 J | 10 J | 100 J | 1 kJ | 1 MJ | 1 GJ | 1 TJ | 1 PJ | 1 EJ | 1 ZJ | 1 YJ | 1 RJ | 1 QJ + W | 1 qW | 1 rW | 1 yW | 1 zW | 1 aW | 1 fW | 1 pW | 1 nW | 1 µW | 1 µW | 1 mW | 10 mW | 100 mW | 1 W | 10 W | 100 W | 1 kW | 1 MW | 1 GW | 1 TW | 1 PW | 1 EW | 1 ZW | 1 YW | 1 RW | 1 QW + C | 1 qC | 1 rC | 1 yC | 1 zC | 1 aC | 1 fC | 1 pC | 1 nC | 1 µC | 1 µC | 1 mC | 10 mC | 100 mC | 1 C | 10 C | 100 C | 1 kC | 1 MC | 1 GC | 1 TC | 1 PC | 1 EC | 1 ZC | 1 YC | 1 RC | 1 QC + V | 1 qV | 1 rV | 1 yV | 1 zV | 1 aV | 1 fV | 1 pV | 1 nV | 1 µV | 1 µV | 1 mV | 10 mV | 100 mV | 1 V | 10 V | 100 V | 1 kV | 1 MV | 1 GV | 1 TV | 1 PV | 1 EV | 1 ZV | 1 YV | 1 RV | 1 QV + F | 1 qF | 1 rF | 1 yF | 1 zF | 1 aF | 1 fF | 1 pF | 1 nF | 1 µF | 1 µF | 1 mF | 10 mF | 100 mF | 1 F | 10 F | 100 F | 1 kF | 1 MF | 1 GF | 1 TF | 1 PF | 1 EF | 1 ZF | 1 YF | 1 RF | 1 QF + Ω | 1 qΩ | 1 rΩ | 1 yΩ | 1 zΩ | 1 aΩ | 1 fΩ | 1 pΩ | 1 nΩ | 1 µΩ | 1 µΩ | 1 mΩ | 10 mΩ | 100 mΩ | 1 Ω | 10 Ω | 100 Ω | 1 kΩ | 1 MΩ | 1 GΩ | 1 TΩ | 1 PΩ | 1 EΩ | 1 ZΩ | 1 YΩ | 1 RΩ | 1 QΩ + ohm | 1 qΩ | 1 rΩ | 1 yΩ | 1 zΩ | 1 aΩ | 1 fΩ | 1 pΩ | 1 nΩ | 1 µΩ | 1 µΩ | 1 mΩ | 10 mΩ | 100 mΩ | 1 Ω | 10 Ω | 100 Ω | 1 kΩ | 1 MΩ | 1 GΩ | 1 TΩ | 1 PΩ | 1 EΩ | 1 ZΩ | 1 YΩ | 1 RΩ | 1 QΩ + S | 1 qS | 1 rS | 1 yS | 1 zS | 1 aS | 1 fS | 1 pS | 1 nS | 1 µS | 1 µS | 1 mS | 10 mS | 100 mS | 1 S | 10 S | 100 S | 1 kS | 1 MS | 1 GS | 1 TS | 1 PS | 1 ES | 1 ZS | 1 YS | 1 RS | 1 QS + Wb | 1 qWb | 1 rWb | 1 yWb | 1 zWb | 1 aWb | 1 fWb | 1 pWb | 1 nWb | 1 µWb | 1 µWb | 1 mWb | 10 mWb | 100 mWb | 1 Wb | 10 Wb | 100 Wb | 1 kWb | 1 MWb | 1 GWb | 1 TWb | 1 PWb | 1 EWb | 1 ZWb | 1 YWb | 1 RWb | 1 QWb + T | 1 qT | 1 rT | 1 yT | 1 zT | 1 aT | 1 fT | 1 pT | 1 nT | 1 µT | 1 µT | 1 mT | 10 mT | 100 mT | 1 T | 10 T | 100 T | 1 kT | 1 MT | 1 GT | 1 TT | 1 PT | 1 ET | 1 ZT | 1 YT | 1 RT | 1 QT + H | 1 qH | 1 rH | 1 yH | 1 zH | 1 aH | 1 fH | 1 pH | 1 nH | 1 µH | 1 µH | 1 mH | 10 mH | 100 mH | 1 H | 10 H | 100 H | 1 kH | 1 MH | 1 GH | 1 TH | 1 PH | 1 EH | 1 ZH | 1 YH | 1 RH | 1 QH + °C | 1 qK | 1 rK | 1 yK | 1 zK | 1 aK | 1 fK | 1 pK | 1 nK | 1 µK | 1 µK | 1 mK | 10 mK | 100 mK | 1 K | 10 K | 100 K | 1 kK | 1 MK | 1 GK | 1 TK | 1 PK | 1 EK | 1 ZK | 1 YK | 1 RK | 1 QK + lm | 1 qcd | 1 rcd | 1 ycd | 1 zcd | 1 acd | 1 fcd | 1 pcd | 1 ncd | 1 µcd | 1 µcd | 1 mcd | 10 mcd | 100 mcd | 1 cd | 10 cd | 100 cd | 1 kcd | 1 Mcd | 1 Gcd | 1 Tcd | 1 Pcd | 1 Ecd | 1 Zcd | 1 Ycd | 1 Rcd | 1 Qcd + lx | 1 qlx | 1 rlx | 1 ylx | 1 zlx | 1 alx | 1 flx | 1 plx | 1 nlx | 1 µlx | 1 µlx | 1 mlx | 10 mlx | 100 mlx | 1 lx | 10 lx | 100 lx | 1 klx | 1 Mlx | 1 Glx | 1 Tlx | 1 Plx | 1 Elx | 1 Zlx | 1 Ylx | 1 Rlx | 1 Qlx + Bq | 1 qHz | 1 rHz | 1 yHz | 1 zHz | 1 aHz | 1 fHz | 1 pHz | 1 nHz | 1 µHz | 1 µHz | 1 mHz | 10 mHz | 100 mHz | 1 Hz | 10 Hz | 100 Hz | 1 kHz | 1 MHz | 1 GHz | 1 THz | 1 PHz | 1 EHz | 1 ZHz | 1 YHz | 1 RHz | 1 QHz + Gy | 1 qGy | 1 rGy | 1 yGy | 1 zGy | 1 aGy | 1 fGy | 1 pGy | 1 nGy | 1 µGy | 1 µGy | 1 mGy | 10 mGy | 100 mGy | 1 Gy | 10 Gy | 100 Gy | 1 kGy | 1 MGy | 1 GGy | 1 TGy | 1 PGy | 1 EGy | 1 ZGy | 1 YGy | 1 RGy | 1 QGy + rad | 1e-32 Gy | 10 qGy | 10 rGy | 10 yGy | 10 zGy | 10 aGy | 10 fGy | 10 pGy | 10 nGy | 10 nGy | 10 µGy | 100 µGy | 1 mGy | 10 mGy | 100 mGy | 1 Gy | 10 Gy | 10 kGy | 10 MGy | 10 GGy | 10 TGy | 10 PGy | 10 EGy | 10 ZGy | 10 YGy | 10 RGy + Sv | 1 qGy | 1 rGy | 1 yGy | 1 zGy | 1 aGy | 1 fGy | 1 pGy | 1 nGy | 1 µGy | 1 µGy | 1 mGy | 10 mGy | 100 mGy | 1 Gy | 10 Gy | 100 Gy | 1 kGy | 1 MGy | 1 GGy | 1 TGy | 1 PGy | 1 EGy | 1 ZGy | 1 YGy | 1 RGy | 1 QGy + kat | 1 qkat | 1 rkat | 1 ykat | 1 zkat | 1 akat | 1 fkat | 1 pkat | 1 nkat | 1 µkat | 1 µkat | 1 mkat | 10 mkat | 100 mkat | 1 kat | 10 kat | 100 kat | 1 kkat | 1 Mkat | 1 Gkat | 1 Tkat | 1 Pkat | 1 Ekat | 1 Zkat | 1 Ykat | 1 Rkat | 1 Qkat + g | 1 qg | 1 rg | 1 yg | 1 zg | 1 ag | 1 fg | 1 pg | 1 ng | 1 µg | 1 µg | 1 mg | 10 mg | 100 mg | 1 g | 10 g | 100 g | 1 kg | 1 Mg | 1 Gg | 1 Tg | 1 Pg | 1 Eg | 1 Zg | 1 Yg | 1 Rg | 1 Qg + a | 1e-28 m^2 | 1e-25 m^2 | 1e-22 m^2 | 1e-19 m^2 | 1e-16 m^2 | 1e-13 m^2 | 1 Pa | 1e-07 m^2 | 0.0001 m^2 | 0.0001 m^2 | 0.1 m^2 | 1 m^2 | 86.4 ks | 100 m^2 | 1000 m^2 | 10000 m^2 | 100000 m^2 | 100000000 m^2 | 100000000000 m^2 | 100000000000000 m^2 | 1 Pa | 1e+20 m^2 | 1e+23 m^2 | 1e+26 m^2 | 1e+29 m^2 | 1e+32 m^2 + l | 1e-33 m^3 | 1e-30 m^3 | 1e-27 m^3 | 1e-24 m^3 | 1e-21 m^3 | 1e-18 m^3 | 1e-15 m^3 | 1e-12 m^3 | 1e-09 m^3 | 1e-09 m^3 | 1e-06 m^3 | 1e-05 m^3 | 0.0001 m^3 | 0.001 m^3 | 0.01 m^3 | 0.1 m^3 | 1 m^3 | 1000 m^3 | 1000000 m^3 | 1000000000 m^3 | 1000000000000 m^3 | 1e+15 m^3 | 1e+18 m^3 | 1e+21 m^3 | 1e+24 m^3 | 1e+27 m^3 + t | 0.000946352946 m^3 | 1 zg | 1 ag | 1 fg | 98.0665 kPa | 304.8 mm | 0.000473176473 m^3 | 1 N | 1 g | 1 g | 1 kg | 200 mg | 100 kg | 1 Mg | | 100 Mg | 1 Gg | 1 Tg | 1 Pg | 1 Eg | 1 Zg | 1 Yg | 1 Rg | 1 Qg | 1e+30 kg | 1e+33 kg + bar | 100 rPa | 100 yPa | 100 zPa | 100 aPa | 100 fPa | 100 pPa | 100 nPa | 100 µPa | 100 mPa | 100 mPa | 100 Pa | 1 kPa | 10 kPa | 100 kPa | 1 MPa | 1.05457181764616e-34 m^2*kg/s | 100 MPa | 100 GPa | 100 TPa | 100 PPa | 100 EPa | 100 ZPa | 100 YPa | 100 RPa | 100 QPa | 1e+35 Pa + min | 60 qs | 60 rs | 60 ys | 60 zs | 60 as | 60 fs | 60 ps | 60 ns | 60 µs | 60 µs | 60 ms | 600 ms | 6 s | 60 s | 600 s | 6 ks | 60 ks | 60 Ms | 60 Gsec | 60 Ts | 60 Ps | 60 Es | 60 Zs | 60 Ys | 60 Rs | 60 Qs + hr | 3.6 rs | 3.6 ys | 3.6 zs | 3.6 as | 3.6 fs | 3.6 ps | 3.6 ns | 3.6 µs | 3.6 ms | 3.6 ms | 3.6 s | 36 s | 360 s | 3.6 ks | 36 ks | 360 ks | 3.6 Ms | 3.6 Gsec | 3.6 Ts | 3.6 Ps | 3.6 Es | 3.6 Zs | 3.6 Ys | 3.6 Rs | 3.6 Qs | 3.6e+33 s + d | 86.4 rs | 5.0292 m | 914.4 mm | 86.4 as | 86.4 fs | 86.4 ps | 86.4 ns | 86.4 µs | 86.4 ms | 86.4 ms | 86.4 s | 1 cd | 8.64 ks | 86.4 ks | 864 ks | 0.238480942392 m^3 | 86.4 Ms | 86.4 Gsec | 86.4 Ts | 86.4 Ps | 86.4 Es | 86.4 Zs | 86.4 Ys | 86.4 Rs | 86.4 Qs | 8.64e+34 s + in | 2.54e-32 m | 303.030303030303 µm | 25.4 rm | 25.4 ym | 25.4 zm | 25.4 am | 0.020457405 m^3 | 25.4 pm | 25.4 nm | 25.4 nm | 60 s | 254 µm | 2.54 mm | 25.4 mm | 254 mm | 2.54 m | 600 g | 25.4 km | 25.4 Mm | 25.4 Gm | 25.4 Tm | 25.4 Pm | 25.4 Em | 25.4 Zm | 25.4 Ym | 25.4 Rm + ft | 3.048e-31 m | 304.8 qm | 304.8 rm | 304.8 ym | 304.8 zm | 304.8 am | 304.8 fm | 304.8 pm | 304.8 nm | 304.8 nm | 304.8 µm | 3.048 mm | 30.48 mm | 304.8 mm | 3.048 m | 30.48 m | 304.8 m | 304.8 km | 304.8 Mm | 304.8 Gm | 304.8 Tm | 304.8 Pm | 304.8 Em | 304.8 Zm | 304.8 Ym | 304.8 Rm + yd | 9.144e-31 m | 914.4 qm | 914.4 rm | 914.4 ym | 914.4 zm | 914.4 am | 914.4 fm | 914.4 pm | 914.4 nm | 914.4 nm | 914.4 µm | 9.144 mm | 91.44 mm | 914.4 mm | 9.144 m | 91.44 m | 914.4 m | 914.4 km | 914.4 Mm | 914.4 Gm | 914.4 Tm | 914.4 Pm | 914.4 Em | 914.4 Zm | 914.4 Ym | 914.4 Rm + mi | 1.609344 rm | 1.609344 ym | 1.609344 zm | 1.609344 am | 1.609344 fm | 1.609344 pm | 1.609344 nm | 1.852 km | 1.609344 mm | 1.609344 mm | 1.609344 m | 16.09344 m | 160.9344 m | 1.609344 km | 16.09344 km | 160.9344 km | 1.609344 Mm | 1.609344 Gm | 1.609344 Tm | 1.609344 Pm | 1.609344 Em | 1.609344 Zm | 1.609344 Ym | 1.609344 Rm | 1.609344 Qm | 1.609344e+33 m + oz | 28.349523125 qg | 28.349523125 rg | 28.349523125 yg | 28.349523125 zg | 28.349523125 ag | 28.349523125 fg | 28.349523125 pg | 28.349523125 ng | 28.349523125 µg | 28.349523125 µg | 28.349523125 mg | 283.49523125 mg | 2.8349523125 g | 28.349523125 g | 283.49523125 g | 2.8349523125 kg | 28.349523125 kg | 28.349523125 Mg | 28.349523125 Gg | 28.349523125 Tg | 28.349523125 Pg | 28.349523125 Eg | 28.349523125 Zg | 28.349523125 Yg | 28.349523125 Rg | 28.349523125 Qg + lb | 453.59237 qg | 453.59237 rg | 453.59237 yg | 453.59237 zg | 453.59237 ag | 453.59237 fg | 453.59237 pg | 453.59237 ng | 453.59237 µg | 453.59237 µg | 453.59237 mg | 4.5359237 g | 45.359237 g | 453.59237 g | 4.5359237 kg | 45.359237 kg | 453.59237 kg | 453.59237 Mg | 453.59237 Gg | 453.59237 Tg | 453.59237 Pg | 453.59237 Eg | 453.59237 Zg | 453.59237 Yg | 453.59237 Rg | 453.59237 Qg (45 rows) diff --git a/expected/iec.out b/expected/iec.out index 4c09066..abd73e4 100644 --- a/expected/iec.out +++ b/expected/iec.out @@ -8,7 +8,9 @@ VALUES ('1 PiB'::unit), ('1 EiB'::unit), ('1 ZiB'::unit), - ('1 YiB'::unit); + ('1 YiB'::unit), + ('1 RiB'::unit), + ('1 QiB'::unit); column1 --------------------- 1 mB @@ -21,7 +23,9 @@ VALUES 1.15292150460685 EB 1.18059162071741 ZB 1.20892581961463 YB -(10 rows) + 1.23794003928538 RB + 1.26765060022823 QB +(12 rows) VALUES ('1 B'::unit @ 'B'), @@ -32,7 +36,9 @@ VALUES ('1 PiB'::unit @ 'PiB'), ('1 EiB'::unit @ 'EiB'), ('1 ZiB'::unit @ 'ZiB'), - ('1 YiB'::unit @ 'YiB'); + ('1 YiB'::unit @ 'YiB'), + ('1 RiB'::unit @ 'RiB'), + ('1 QiB'::unit @ 'QiB'); column1 --------- 1 B @@ -44,7 +50,9 @@ VALUES 1 EiB 1 ZiB 1 YiB -(9 rows) + 1 RiB + 1 QiB +(11 rows) VALUES ('1 B'::unit @ 'B'), @@ -55,7 +63,9 @@ VALUES ('1 PB'::unit @ 'PiB'), ('1 EB'::unit @ 'EiB'), ('1 ZB'::unit @ 'ZiB'), - ('1 YB'::unit @ 'YiB'); + ('1 YB'::unit @ 'YiB'), + ('1 RB'::unit @ 'RiB'), + ('1 QB'::unit @ 'QiB'); column1 ----------------------- 1 B @@ -67,7 +77,9 @@ VALUES 0.867361737988404 EiB 0.8470329472543 ZiB 0.827180612553028 YiB -(9 rows) + 0.807793566946316 RiB + 0.788860905221012 QiB +(11 rows) -- errors SELECT '1 kiB'::unit; @@ -100,7 +112,9 @@ VALUES ('1 EiB'::unit, '1 EB'::unit), ('1 ZiB'::unit, '1 ZB'::unit), ('1 YiB'::unit, '1 YB'::unit), - ('1024 YiB'::unit, '1000 YB'::unit); + ('1 RiB'::unit, '1 RB'::unit), + ('1 QiB'::unit, '1 QB'::unit), + ('1024 QiB'::unit, '1000 QB'::unit); column1 | column2 ------------------------+---------------------- 0.001 B | 0.001 B @@ -113,6 +127,8 @@ VALUES 1 EiB | 888.178419700125 PiB 1 ZiB | 867.361737988404 EiB 1 YiB | 847.0329472543 ZiB - 1.23794003928538e+27 B | 827.180612553028 YiB -(11 rows) + 1 RiB | 827.180612553028 YiB + 1 QiB | 807.793566946316 RiB + 1.29807421463371e+33 B | 788.860905221012 QiB +(13 rows) diff --git a/expected/prefix.out b/expected/prefix.out index dc3d45a..a0826c5 100644 --- a/expected/prefix.out +++ b/expected/prefix.out @@ -4,8 +4,10 @@ FROM factors; f | meter | kilogram ---------------+---------+---------- - 1e+27 | 1e+27 m | 1e+27 kg - 1e+24 | 1 Ym | 1e+24 kg + 1e+33 | 1e+33 m | 1e+33 kg + 1e+30 | 1 Qm | 1e+30 kg + 1e+27 | 1 Rm | 1 Qg + 1e+24 | 1 Ym | 1 Rg 1e+21 | 1 Zm | 1 Yg 1e+18 | 1 Em | 1 Zg 1e+15 | 1 Pm | 1 Eg @@ -22,10 +24,12 @@ FROM 1e-18 | 1 am | 1 fg 1e-21 | 1 zm | 1 ag 1e-24 | 1 ym | 1 zg - 1e-27 | 1e-27 m | 1 yg - 1e-30 | 1e-30 m | 1e-30 kg + 1e-27 | 1 rm | 1 yg + 1e-30 | 1 qm | 1 rg + 1e-33 | 1e-33 m | 1 qg + 1e-36 | 1e-36 m | 1e-36 kg 0 | 0 m | 0 kg -(21 rows) +(25 rows) SELECT p, (p||'m/m')::unit AS factor, @@ -39,7 +43,9 @@ FROM prefixes; p | factor | 0.001 m | meter | 1000 m | 0.001 g | gram | 1000 g ----+---------------+---------+--------+---------+----------+--------+---------- - y | 1e-24 | 1e-27 m | 1 ym | 1 zm | 1e-30 kg | 1 yg | 1 zg + q | 1e-30 | 1e-33 m | 1 qm | 1 rm | 1e-36 kg | 1 qg | 1 rg + r | 1e-27 | 1 qm | 1 rm | 1 ym | 1 qg | 1 rg | 1 yg + y | 1e-24 | 1 rm | 1 ym | 1 zm | 1 rg | 1 yg | 1 zg z | 1e-21 | 1 ym | 1 zm | 1 am | 1 yg | 1 zg | 1 ag a | 1e-18 | 1 zm | 1 am | 1 fm | 1 zg | 1 ag | 1 fg f | 1e-15 | 1 am | 1 fm | 1 pm | 1 ag | 1 fg | 1 pg @@ -60,6 +66,8 @@ FROM P | 1e+15 | 1 Tm | 1 Pm | 1 Em | 1 Tg | 1 Pg | 1 Eg E | 1e+18 | 1 Pm | 1 Em | 1 Zm | 1 Pg | 1 Eg | 1 Zg Z | 1e+21 | 1 Em | 1 Zm | 1 Ym | 1 Eg | 1 Zg | 1 Yg - Y | 1e+24 | 1 Zm | 1 Ym | 1e+27 m | 1 Zg | 1 Yg | 1e+24 kg -(22 rows) + Y | 1e+24 | 1 Zm | 1 Ym | 1 Rm | 1 Zg | 1 Yg | 1 Rg + R | 1e+27 | 1 Ym | 1 Rm | 1 Qm | 1 Yg | 1 Rg | 1 Qg + Q | 1e+30 | 1 Rm | 1 Qm | 1e+33 m | 1 Rg | 1 Qg | 1e+30 kg +(26 rows) diff --git a/expected/tables.out b/expected/tables.out index a995d15..1429a73 100644 --- a/expected/tables.out +++ b/expected/tables.out @@ -3,16 +3,16 @@ DROP TABLE IF EXISTS prefixes; CREATE TABLE prefixes (p text); DELETE FROM prefixes; INSERT INTO prefixes VALUES - ('y'),('z'),('a'),('f'),('p'),('n'),('µ'),('mu'),('m'),('c'),('d'), + ('q'),('r'),('y'),('z'),('a'),('f'),('p'),('n'),('µ'),('mu'),('m'),('c'),('d'), (''), - ('da'),('h'),('k'),('M'),('G'),('T'),('P'),('E'),('Z'),('Y'); + ('da'),('h'),('k'),('M'),('G'),('T'),('P'),('E'),('Z'),('Y'),('R'),('Q'); DROP TABLE IF EXISTS factors; CREATE TABLE factors (f double precision); DELETE FROM factors; INSERT INTO factors VALUES - (1e27), (1e24), (1e21), (1e18), (1e15), (1e12), (1e9), (1e6), (1e3), + (1e33), (1e30), (1e27), (1e24), (1e21), (1e18), (1e15), (1e12), (1e9), (1e6), (1e3), (1), - (1e-3), (1e-6), (1e-9), (1e-12), (1e-15), (1e-18), (1e-21), (1e-24), (1e-27), (1e-30), + (1e-3), (1e-6), (1e-9), (1e-12), (1e-15), (1e-18), (1e-21), (1e-24), (1e-27), (1e-30), (1e-33), (1e-36), (0); DROP TABLE IF EXISTS units; CREATE TABLE units (u text, unit unit, base boolean, coherent boolean, duplicate boolean); diff --git a/expected/unit.out b/expected/unit.out index 850ec88..70b4efa 100644 --- a/expected/unit.out +++ b/expected/unit.out @@ -328,6 +328,8 @@ ORDER BY lower(p) COLLATE "C", lower(u) COLLATE "C"; p | a | 1 Pa p | in | 0.020457405 m^3 p | t | 0.000473176473 m^3 + q | t | 0.000946352946 m^3 + r | d | 5.0292 m y | d | 914.4 mm -(15 rows) +(17 rows) diff --git a/expected/units.out b/expected/units.out index 9b9fe63..cea77f6 100644 --- a/expected/units.out +++ b/expected/units.out @@ -4,6 +4,10 @@ SET extra_float_digits = 0; SELECT prefix, factor, definition FROM unit_prefixes ORDER BY factor, prefix COLLATE "C"; prefix | factor | definition ----------+----------------------+------------ + q | 1e-30 | quecto + quecto | 1e-30 | 1e-30 + r | 1e-27 | ronto + ronto | 1e-27 | 1e-27 y | 1e-24 | yocto yocto | 1e-24 | 1e-24 z | 1e-21 | zepto @@ -118,7 +122,15 @@ SELECT prefix, factor, definition FROM unit_prefixes ORDER BY factor, prefix COL yotta | 1e+24 | 1e24 Yi | 1.20892581961463e+24 | yobi yobi | 1.20892581961463e+24 | 2^80 -(114 rows) + R | 1e+27 | ronna + ronna | 1e+27 | 1e27 + Ri | 1.23794003928538e+27 | robi + robi | 1.23794003928538e+27 | 2^90 + Q | 1e+30 | quetta + quetta | 1e+30 | 1e30 + Qi | 1.26765060022823e+30 | quebi + quebi | 1.26765060022823e+30 | 2^100 +(126 rows) RESET extra_float_digits; SELECT name, unit, definition FROM unit_units ORDER BY dimension(unit), unit, name COLLATE "C"; @@ -600,9 +612,9 @@ SELECT name, unit, definition FROM unit_units ORDER BY dimension(unit), unit, na stdatmT0 | 288.15 K | 288.15 K natural_temp | 11.6045181215501 kK | natural_energy / boltzmann atomictemperature | 315.775024804067 kK | atomicenergy / boltzmann - plancktemperature_red | 2.82607552243842e+31 K | planckenergy_red / k - T_P | 1.41678416215734e+32 K | plancktemperature - plancktemperature | 1.41678416215734e+32 K | planckenergy / k + plancktemperature_red | 28.2607552243842 QK | planckenergy_red / k + T_P | 141.678416215734 QK | plancktemperature + plancktemperature | 141.678416215734 QK | planckenergy / k mired | 1000000 K^-1 | / microK ㎀ | 1 pA | pA hlu_current | 94.0966939781648 pA | hlu_charge / sec @@ -823,11 +835,11 @@ SELECT name, unit, definition FROM unit_units ORDER BY dimension(unit), unit, na kat | 1 kat | katal katal | 1 kat | mol/sec natural_mass | 1.7826619216279e-36 kg | natural_energy / c^2 - atomicmass | 9.10938370154308e-31 kg | electronmass - electronmass | 9.10938370154308e-31 kg | 5.48579909065e-4 u - m_e | 9.10938370154308e-31 kg | electronmass - m_mu | 1.88353162739427e-28 kg | muonmass - muonmass | 1.88353162739427e-28 kg | 0.1134289259 u + atomicmass | 910.938370154308 qg | electronmass + electronmass | 910.938370154308 qg | 5.48579909065e-4 u + m_e | 910.938370154308 qg | electronmass + m_mu | 188.353162739427 rg | muonmass + muonmass | 188.353162739427 rg | 0.1134289259 u amu_phys | 1.65981 yg | 1.65981e-27 kg amu_chem | 1.66026 yg | 1.66026e-27 kg Da | 1.6605390666 yg | dalton @@ -1076,13 +1088,13 @@ SELECT name, unit, definition FROM unit_units ORDER BY dimension(unit), unit, na moonmass | 73.4578924831068 Yg | 4902.800118 km^3 / s^2 G mercurymass | 330.100063692073 Yg | 22031.868551 km^3 / s^2 G marsmass | 641.690901158174 Yg | 42828.375816 km^3 / s^2 G - venusmass | 4.86730581484201e+24 kg | 324858.592000 km^3 / s^2 G - earthmass | 5.97216839978724e+24 kg | 398600.435507 km^3 / s^2 G - earthmoonmass | 6.04562629227035e+24 kg | earthmass+moonmass - uranusmass | 8.68189383156286e+25 kg | 5794556.400000 km^3 / s^2 G - neptunemass | 1.02430623444856e+26 kg | 6836527.100580 km^3 / s^2 G - saturnmass | 5.68457888344845e+26 kg | 37940584.841800 km^3 / s^2 G - jupitermass | 1.8985176587807e+27 kg | 126712764.100000 km^3 / s^2 G + venusmass | 4.86730581484201 Rg | 324858.592000 km^3 / s^2 G + earthmass | 5.97216839978724 Rg | 398600.435507 km^3 / s^2 G + earthmoonmass | 6.04562629227035 Rg | earthmass+moonmass + uranusmass | 86.8189383156286 Rg | 5794556.400000 km^3 / s^2 G + neptunemass | 102.430623444856 Rg | 6836527.100580 km^3 / s^2 G + saturnmass | 568.457888344845 Rg | 37940584.841800 km^3 / s^2 G + jupitermass | 1.8985176587807 Qg | 126712764.100000 km^3 / s^2 G solarmass | 1.98840987131653e+30 kg | GMsun/G sunmass | 1.98840987131653e+30 kg | solarmass pyron | 697.8 kg/s^3 | cal_IT / cm^2 min @@ -2367,7 +2379,7 @@ SELECT name, unit, definition FROM unit_units ORDER BY dimension(unit), unit, na crocodile | 1 MV | megavolt ㎹ | 1 MV | MV planckvolt_red | 737.469815192278 YV | planckenergy_red / planckcharge_red - planckvolt | 3.69712538089572e+27 V | planckenergy / planckcharge + planckvolt | 3.69712538089572 RV | planckenergy / planckcharge cminv | 19.8644585714893 yJ | h c / cm invcm | 19.8644585714893 yJ | cminv wavenumber | 19.8644585714893 yJ | cminv diff --git a/powers.c b/powers.c index 2df7f7b..35201eb 100644 --- a/powers.c +++ b/powers.c @@ -1,10 +1,17 @@ +#include #include -#define p(n, p, x) printf("#define POWER_%-3d %-22g /* %s %-22a */\n", n, x, p, x) +#define p(n, p, x) printf("#define POWER_%-3d %-22a /* %s %-22a */\n", n, nextafter(x, 0), p, x) int main () { - p(27, " ", 1e27); + printf("/* powers-of-10 constants */\n"); + printf("/* constants here are rounded down so >= comparisons work better */\n\n"); + + + p(33, " ", 1e33); + p(30, "Q", 1e30); + p(27, "R", 1e27); p(24, "Y", 1e24); p(21, "Z", 1e21); p(18, "E", 1e18); @@ -22,5 +29,7 @@ int main () p(-18, "a", 1e-18); p(-21, "z", 1e-21); p(-24, "y", 1e-24); - p(-27, " ", 1e-27); + p(-27, "r", 1e-27); + p(-30, "q", 1e-30); + p(-33, " ", 1e-33); } diff --git a/powers.h b/powers.h index 2ff1e56..d276857 100644 --- a/powers.h +++ b/powers.h @@ -1,7 +1,9 @@ /* powers-of-10 constants */ -/* some constants here are rounded down so >= comparisons work better */ +/* constants here are rounded down so >= comparisons work better */ -#define POWER_27 1e+27 /* 0x1.9d971e4fe8402p+89 */ +#define POWER_33 0x1.8a6e32246c99bp+109 /* 0x1.8a6e32246c99cp+109 */ +#define POWER_30 0x1.93e5939a08ce9p+99 /* Q 0x1.93e5939a08ceap+99 */ +#define POWER_27 0x1.9d971e4fe8401p+89 /* R 0x1.9d971e4fe8402p+89 */ #define POWER_24 0x1.a784379d99db3p+79 /* Y 0x1.a784379d99db4p+79 */ #define POWER_21 0x1.b1ae4d6e2ef4fp+69 /* Z 0x1.b1ae4d6e2ef5p+69 */ #define POWER_18 0x1.bc16d674ec7ffp+59 /* E 0x1.bc16d674ec8p+59 */ @@ -13,10 +15,12 @@ #define POWER_0 0x1.fffffffffffffp-1 /* 0x1p+0 */ #define POWER__3 0x1.0624dd2f1a9fbp-10 /* m 0x1.0624dd2f1a9fcp-10 */ #define POWER__6 0x1.0c6f7a0b5ed8cp-20 /* µ 0x1.0c6f7a0b5ed8dp-20 */ -#define POWER__9 1e-09 /* n 0x1.12e0be826d695p-30 */ -#define POWER__12 0x1.19799812dea10p-40 /* p 0x1.19799812dea11p-40 */ -#define POWER__15 1e-15 /* f 0x1.203af9ee75616p-50 */ +#define POWER__9 0x1.12e0be826d694p-30 /* n 0x1.12e0be826d695p-30 */ +#define POWER__12 0x1.19799812dea1p-40 /* p 0x1.19799812dea11p-40 */ +#define POWER__15 0x1.203af9ee75615p-50 /* f 0x1.203af9ee75616p-50 */ #define POWER__18 0x1.2725dd1d243abp-60 /* a 0x1.2725dd1d243acp-60 */ #define POWER__21 0x1.2e3b40a0e9b4ep-70 /* z 0x1.2e3b40a0e9b4fp-70 */ #define POWER__24 0x1.357c299a88ea6p-80 /* y 0x1.357c299a88ea7p-80 */ -#define POWER__27 0x1.3ce9a36f23c0fp-90 /* 0x1.3ce9a36f23c1p-90 */ +#define POWER__27 0x1.3ce9a36f23c0fp-90 /* r 0x1.3ce9a36f23c1p-90 */ +#define POWER__30 0x1.4484bfeebc29fp-100 /* q 0x1.4484bfeebc2ap-100 */ +#define POWER__33 0x1.4c4e977ba1f5bp-110 /* 0x1.4c4e977ba1f5cp-110 */ diff --git a/sql/iec.sql b/sql/iec.sql index fd31084..90716e9 100644 --- a/sql/iec.sql +++ b/sql/iec.sql @@ -8,7 +8,9 @@ VALUES ('1 PiB'::unit), ('1 EiB'::unit), ('1 ZiB'::unit), - ('1 YiB'::unit); + ('1 YiB'::unit), + ('1 RiB'::unit), + ('1 QiB'::unit); VALUES ('1 B'::unit @ 'B'), @@ -19,7 +21,9 @@ VALUES ('1 PiB'::unit @ 'PiB'), ('1 EiB'::unit @ 'EiB'), ('1 ZiB'::unit @ 'ZiB'), - ('1 YiB'::unit @ 'YiB'); + ('1 YiB'::unit @ 'YiB'), + ('1 RiB'::unit @ 'RiB'), + ('1 QiB'::unit @ 'QiB'); VALUES ('1 B'::unit @ 'B'), @@ -30,7 +34,9 @@ VALUES ('1 PB'::unit @ 'PiB'), ('1 EB'::unit @ 'EiB'), ('1 ZB'::unit @ 'ZiB'), - ('1 YB'::unit @ 'YiB'); + ('1 YB'::unit @ 'YiB'), + ('1 RB'::unit @ 'RiB'), + ('1 QB'::unit @ 'QiB'); -- errors SELECT '1 kiB'::unit; @@ -53,4 +59,6 @@ VALUES ('1 EiB'::unit, '1 EB'::unit), ('1 ZiB'::unit, '1 ZB'::unit), ('1 YiB'::unit, '1 YB'::unit), - ('1024 YiB'::unit, '1000 YB'::unit); + ('1 RiB'::unit, '1 RB'::unit), + ('1 QiB'::unit, '1 QB'::unit), + ('1024 QiB'::unit, '1000 QB'::unit); diff --git a/sql/tables.sql b/sql/tables.sql index 9ec8270..e76e278 100644 --- a/sql/tables.sql +++ b/sql/tables.sql @@ -4,17 +4,17 @@ DROP TABLE IF EXISTS prefixes; CREATE TABLE prefixes (p text); DELETE FROM prefixes; INSERT INTO prefixes VALUES - ('y'),('z'),('a'),('f'),('p'),('n'),('µ'),('mu'),('m'),('c'),('d'), + ('q'),('r'),('y'),('z'),('a'),('f'),('p'),('n'),('µ'),('mu'),('m'),('c'),('d'), (''), - ('da'),('h'),('k'),('M'),('G'),('T'),('P'),('E'),('Z'),('Y'); + ('da'),('h'),('k'),('M'),('G'),('T'),('P'),('E'),('Z'),('Y'),('R'),('Q'); DROP TABLE IF EXISTS factors; CREATE TABLE factors (f double precision); DELETE FROM factors; INSERT INTO factors VALUES - (1e27), (1e24), (1e21), (1e18), (1e15), (1e12), (1e9), (1e6), (1e3), + (1e33), (1e30), (1e27), (1e24), (1e21), (1e18), (1e15), (1e12), (1e9), (1e6), (1e3), (1), - (1e-3), (1e-6), (1e-9), (1e-12), (1e-15), (1e-18), (1e-21), (1e-24), (1e-27), (1e-30), + (1e-3), (1e-6), (1e-9), (1e-12), (1e-15), (1e-18), (1e-21), (1e-24), (1e-27), (1e-30), (1e-33), (1e-36), (0); DROP TABLE IF EXISTS units; diff --git a/unit.c b/unit.c index ff32f13..e2aee08 100644 --- a/unit.c +++ b/unit.c @@ -1,5 +1,5 @@ /* -Copyright (C) 2016-2019 Christoph Berg +Copyright (C) 2016-2023 Christoph Berg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -336,8 +336,12 @@ unit_cstring (Unit *unit) char *prefix = "k"; double factor = 1.0; - if (v_abs >= POWER_24) { + if (v_abs >= POWER_30) { /* do nothing */ + } else if (v_abs >= POWER_27) { + prefix = "Q"; factor = 1e-27; + } else if (v_abs >= POWER_24) { + prefix = "R"; factor = 1e-24; } else if (v_abs >= POWER_21) { prefix = "Y"; factor = 1e-21; } else if (v_abs >= POWER_18) { @@ -372,6 +376,10 @@ unit_cstring (Unit *unit) prefix = "z"; factor = 1e24; } else if (v_abs >= POWER__27) { prefix = "y"; factor = 1e27; + } else if (v_abs >= POWER__30) { + prefix = "r"; factor = 1e30; + } else if (v_abs >= POWER__33) { + prefix = "q"; factor = 1e33; } /* else: smaller value or 0 (or -0), print using kg */ print_output("%s %sg", float8out_unit (unit->value * factor), @@ -384,8 +392,12 @@ unit_cstring (Unit *unit) char *prefix = ""; double factor = 1.0; - if (v_abs >= 0x1p+90) { + if (v_abs >= 0x1p+110) { // do nothing + } else if (v_abs >= 0x1p+100) { + prefix = "Qi"; factor = 0x1p-100; + } else if (v_abs >= 0x1p+90) { + prefix = "Ri"; factor = 0x1p-90; } else if (v_abs >= 0x1p+80) { prefix = "Yi"; factor = 0x1p-80; } else if (v_abs >= 0x1p+70) { @@ -424,8 +436,12 @@ unit_cstring (Unit *unit) return output; } - if (v_abs >= 1e27) { + if (v_abs >= 1e33) { // do nothing + } else if (v_abs >= POWER_30) { + prefix = "Q"; factor = 1e-30; + } else if (v_abs >= POWER_27) { + prefix = "R"; factor = 1e-27; } else if (v_abs >= POWER_24) { prefix = "Y"; factor = 1e-24; } else if (v_abs >= POWER_21) { @@ -462,6 +478,10 @@ unit_cstring (Unit *unit) prefix = "z"; factor = 1e21; } else if (v_abs >= POWER__24) { prefix = "y"; factor = 1e24; + } else if (v_abs >= POWER__27) { + prefix = "r"; factor = 1e27; + } else if (v_abs >= POWER__30) { + prefix = "q"; factor = 1e30; } /* else do nothing */ /* print with SI prefix */ diff --git a/unit_prefixes.data b/unit_prefixes.data index 45c15ae..9a29171 100644 --- a/unit_prefixes.data +++ b/unit_prefixes.data @@ -1,3 +1,5 @@ +quetta 1e+30 1e30 \N +ronna 1e+27 1e27 \N yotta 1e+24 1e24 \N zetta 1e+21 1e21 \N exa 1e+18 1e18 \N @@ -20,6 +22,8 @@ femto 1e-15 1e-15 \N atto 1e-18 1e-18 \N zepto 1e-21 1e-21 \N yocto 1e-24 1e-24 \N +ronto 1e-27 1e-27 \N +quecto 1e-30 1e-30 \N quarter 0.25 1|4 \N semi 0.5 0.5 \N demi 0.5 0.5 \N @@ -36,6 +40,8 @@ pebi 1.125899906842624e+15 2^50 \N exbi 1.152921504606847e+18 2^60 \N zebi 1.1805916207174113e+21 2^70 \N yobi 1.2089258196146292e+24 2^80 \N +robi 1.2379400392853803e+27 2^90 \N +quebi 1.2676506002282294e+30 2^100 \N Ki 1024 kibi \N Mi 1048576 mebi \N Gi 1073741824 gibi \N @@ -44,6 +50,10 @@ Pi 1.125899906842624e+15 pebi \N Ei 1.152921504606847e+18 exbi \N Zi 1.1805916207174113e+21 zebi \N Yi 1.2089258196146292e+24 yobi \N +Ri 1.2379400392853803e+27 robi \N +Qi 1.2676506002282294e+30 quebi \N +Q 1e+30 quetta \N +R 1e+27 ronna \N Y 1e+24 yotta \N Z 1e+21 zetta \N E 1e+18 exa \N @@ -65,6 +75,8 @@ f 1e-15 femto \N a 1e-18 atto \N z 1e-21 zepto \N y 1e-24 yocto \N +r 1e-27 ronto \N +q 1e-30 quecto \N US 1.000002000004 US \N survey 1.000002000004 US \N geodetic 1.000002000004 US \N