Skip to content

Commit 5eacc8e

Browse files
committed
Add R ronna, Q quetta, r ronto, Q quecto, Ri robi, Qi quebi prefixes.
1 parent 8226f52 commit 5eacc8e

17 files changed

+305
-160
lines changed

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
7.6: Jan 04, 2023
22
-----------------
33
* Import definitions.units September 2022 Version 3.15.
4+
* Add R ronna, Q quetta, r ronto, Q quecto, Ri robi, Qi quebi prefixes.
45

56
7.4: May 20, 2021 - World Metrology Day
67
---------------------------------------

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Features
3434
* United States customary units: *inch (in), foot (ft), yard (yd), mile (mi),
3535
ounce (oz), pound (lb)*
3636
* about 2400 other units imported from GNU Units (including some humorous ones)
37-
* prefix multiples: *da, h, k, M, G, T, P, E, Z, Y*
38-
* prefix fractions: *d, c, m, μ, n, p, f, a, z, y*
39-
* IEC binary prefix multiples: *Ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi*
37+
* prefix multiples: *da, h, k, M, G, T, P, E, Z, Y, R, Q*
38+
* prefix fractions: *d, c, m, μ, n, p, f, a, z, y, r, q*
39+
* IEC binary prefix multiples: *Ki, Mi, Gi, Ti, Pi, Ei, Zi, Yi, Ri, Qi*
4040
* other prefixes imported from GNU Units
4141
* operators: **+, -, *, /, ^**, conversion to arbitrary scale (**@, @@**)
4242
* aggregate functions
@@ -94,6 +94,12 @@ CREATE EXTENSION
9494
earthradius
9595
-----------------------------------------
9696
["6.35675174834046 Mm","6.37813649 Mm")
97+
98+
# SET extra_float_digits = -12;
99+
# SELECT 'earthmass'::unit as earth;
100+
earth
101+
─────────
102+
5.97 Rg
97103
```
98104

99105
Installation
@@ -547,10 +553,10 @@ References
547553
License
548554
-------
549555

550-
Copyright (C) 2016-2019 Christoph Berg
556+
Copyright (C) 2016-2023 Christoph Berg
551557

552558
The definitions.units file is
553-
Copyright (C) 1996-2018 Free Software Foundation, Inc.
559+
Copyright (C) 1996-2022 Free Software Foundation, Inc.
554560

555561
This program is free software; you can redistribute it and/or modify
556562
it under the terms of the GNU General Public License as published by

debian/changelog

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
postgresql-unit (7.6-1) UNRELEASED; urgency=medium
1+
postgresql-unit (7.6-1) unstable; urgency=medium
22

33
[ Debian Janitor ]
44
* Remove constraints unnecessary since buster (oldstable):
@@ -8,8 +8,9 @@ postgresql-unit (7.6-1) UNRELEASED; urgency=medium
88

99
[ Christoph Berg ]
1010
* Import definitions.units September 2022 Version 3.15.
11+
* Add R ronna, Q quetta, r ronto, Q quecto, Ri robi, Qi quebi prefixes.
1112

12-
-- Debian Janitor <[email protected]> Mon, 24 Oct 2022 16:32:10 -0000
13+
-- Christoph Berg <[email protected]> Wed, 04 Jan 2023 20:42:16 +0200
1314

1415
postgresql-unit (7.5-2) unstable; urgency=medium
1516

definitions.units.patch

+71-41
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- definitions.units 2022-05-17 15:32:26.767162879 +0200
2-
+++ definitions.units.patched 2022-05-18 15:10:02.482372402 +0200
3-
@@ -227,7 +227,7 @@
1+
--- definitions.units 2023-01-04 18:22:06.602713513 +0200
2+
+++ definitions.units.patched 2023-01-04 19:54:54.681679346 +0200
3+
@@ -230,7 +230,7 @@
44
# equator to a pole.
55

66
h_SI 6.62607015e-34
@@ -9,7 +9,7 @@
99

1010
kg ! # The kilogram, symbol kg, is the SI unit of mass. It is
1111
kilogram kg # defined by taking the fixed numerical value of the Planck
12-
@@ -276,7 +276,7 @@
12+
@@ -279,7 +279,7 @@
1313
# https://en.wikipedia.org/wiki/Kibble_balance
1414

1515
k_SI 1.380649e-23
@@ -18,7 +18,7 @@
1818
k boltzmann
1919

2020
K ! # The kelvin, symbol K, is the SI unit of thermodynamic
21-
@@ -319,7 +319,7 @@
21+
@@ -322,7 +322,7 @@
2222
# depend directly on temperature.
2323

2424
e_SI 1.602176634e-19
@@ -27,7 +27,7 @@
2727

2828
A ! # The ampere, symbol A, is the SI unit of electric current.
2929
ampere A # It is defined by taking the fixed numerical value of the
30-
@@ -422,7 +422,9 @@
30+
@@ -425,7 +425,9 @@
3131
# A primitive non-SI unit
3232
#
3333

@@ -38,32 +38,62 @@
3838
# of a random variable over a finite alphabet is defined
3939
# to be the sum of -p(i)*log2(p(i)) over the alphabet where
4040
# p(i) is the probability that the random variable takes
41-
@@ -477,12 +479,16 @@
42-
tebi- 2^40 # Electrotechnical Commission aproved these
43-
pebi- 2^50 # binary prefixes for use in 1998. If you
44-
exbi- 2^60 # want to refer to "megabytes" using the
45-
+zebi- 2^70
46-
+yobi- 2^80
47-
Ki- kibi # binary definition, use these prefixes.
41+
@@ -442,6 +444,8 @@
42+
# #
43+
###########################################################################
44+
45+
+quetta- 1e30
46+
+ronna- 1e27
47+
yotta- 1e24 # Greek or Latin octo, "eight"
48+
zetta- 1e21 # Latin septem, "seven"
49+
exa- 1e18 # Greek hex, "six"
50+
@@ -464,6 +468,8 @@
51+
atto- 1e-18 # Danish-Norwegian atten, "eighteen"
52+
zepto- 1e-21 # Latin septem, "seven"
53+
yocto- 1e-24 # Greek or Latin octo, "eight"
54+
+ronto- 1e-27
55+
+quecto- 1e-30
56+
57+
quarter- 1|4
58+
semi- 0.5
59+
@@ -482,6 +488,8 @@
60+
exbi- 2^60
61+
zebi- 2^70 # Zebi- and yobi- were added in the 2005 ed.,
62+
yobi- 2^80 # later superseded by ISO/IEC 80000-13:2008.
63+
+robi- 2^90
64+
+quebi- 2^100
65+
Ki- kibi
4866
Mi- mebi
4967
Gi- gibi
50-
Ti- tebi
51-
Pi- pebi
68+
@@ -490,7 +498,11 @@
5269
Ei- exbi
53-
+Zi- zebi
54-
+Yi- yobi
70+
Zi- zebi
71+
Yi- yobi
72+
+Ri- robi
73+
+Qi- quebi
5574

75+
+Q- quetta
76+
+R- ronna
5677
Y- yotta
5778
Z- zetta
58-
@@ -498,6 +504,7 @@
79+
E- exa
80+
@@ -505,12 +517,15 @@
5981
c- centi
6082
m- milli
6183
u- micro # it should be a mu but u is easy to type
6284
+mu- micro
6385
n- nano
6486
p- pico
6587
f- femto
66-
@@ -676,6 +683,14 @@
88+
a- atto
89+
z- zepto
90+
y- yocto
91+
+r- ronto
92+
+q- quecto
93+
94+
#
95+
# Names of some numbers
96+
@@ -683,6 +698,14 @@
6797
padm 1e15
6898
shankh 1e17
6999

@@ -78,7 +108,7 @@
78108
#############################################################################
79109
# #
80110
# Derived units which can be reduced to the primitive units #
81-
@@ -945,7 +960,7 @@
111+
@@ -962,7 +985,7 @@
82112
pointangle 1|32 circle # Used for reporting compass readings
83113
centrad 0.01 radian # Used for angular deviation of light
84114
# through a prism.
@@ -87,7 +117,7 @@
87117
seclongitude circle (seconds/day) # Astronomers measure longitude
88118
# (which they call right ascension) in
89119
# time units by dividing the equator into
90-
@@ -1066,8 +1081,8 @@
120+
@@ -1083,8 +1106,8 @@
91121
tempF(x) units=[1;K] domain=[-459.67,) range=[0,) \
92122
(x+(-32)) degF + stdtemp ; (tempF+(-stdtemp))/degF + 32
93123
tempfahrenheit() tempF
@@ -98,7 +128,7 @@
98128

99129

100130
degreesrankine degF # The Rankine scale has the
101-
@@ -1079,7 +1094,7 @@
131+
@@ -1096,7 +1119,7 @@
102132

103133
tempreaumur(x) units=[1;K] domain=[-218.52,) range=[0,) \
104134
x degreaumur+stdtemp ; (tempreaumur+(-stdtemp))/degreaumur
@@ -107,16 +137,16 @@
107137
# particularly in France. It is defined
108138
# to be 0 at the freezing point of water
109139
# and 80 at the boiling point. Reaumur
110-
@@ -1167,7 +1182,7 @@
140+
@@ -1184,7 +1207,7 @@
111141

112142
# Basic constants
113143

114144
-pi 3.14159265358979323846
115145
+#pi 3.14159265358979323846
146+
tau 2 pi
147+
phi (sqrt(5)+1)/2
116148
light c
117-
mu0_SI 2 alpha h_SI / e_SI^2 c_SI # Vacuum magnetic permeability
118-
mu0 2 alpha h / e^2 c # Gets overridden in CGS modes
119-
@@ -1310,6 +1325,15 @@
149+
@@ -1341,6 +1364,15 @@
120150
H2O50C 0.98807 force gram / cm^3
121151
H2O100C 0.95838 force gram / cm^3
122152

@@ -131,8 +161,8 @@
131161
+
132162
# Atomic constants
133163

134-
135-
@@ -1664,7 +1688,7 @@
164+
hartree 4.3597447222071e-18 J # Approximate electric potential energy
165+
@@ -1715,7 +1747,7 @@
136166

137167
abampere 10 A # Current which produces a force of
138168
abamp abampere # 2 dyne/cm between two infinitely
@@ -141,7 +171,7 @@
141171
abA abampere
142172
biot abampere
143173
Bi biot
144-
@@ -2482,8 +2506,8 @@
174+
@@ -2668,8 +2700,8 @@
145175
# gravitational constant. This is a
146176
# fictional year, and doesn't
147177
# correspond to any celestial event.
@@ -151,8 +181,8 @@
151181
+#au astronomicalunit # ephemeris for the above described
152182
# astronomical unit. (See the NASA
153183
# site listed above.)
154-
GMsun 1.32712440018e20 m^3 / s^2 # heliocentric gravitational constant
155-
@@ -2851,11 +2875,6 @@
184+
GMsun 132712440041.279419 km^3 / s^2 # heliocentric gravitational constant
185+
@@ -3003,11 +3035,6 @@
156186
int 3937|1200 ft/m # Convert US Survey measures to
157187
int- int # international measures
158188

@@ -164,15 +194,15 @@
164194
yard 3 ft
165195
yd yard
166196
mile 5280 ft # The mile was enlarged from 5000 ft
167-
@@ -3003,6 +3022,7 @@
197+
@@ -3155,6 +3182,7 @@
168198
# Liquid measure
169199

170200
usgallon 231 in^3 # US liquid measure is derived from
171201
+gallon usgallon
172202
gal gallon # the British wine gallon of 1707.
173203
quart 1|4 gallon # See the "winegallon" entry below
174204
pint 1|2 quart # more historical information.
175-
@@ -3504,7 +3524,7 @@
205+
@@ -3656,7 +3684,7 @@
176206

177207
number1can 10 usfloz
178208
number2can 19 usfloz
@@ -181,7 +211,7 @@
181211
number3can 4 uscups
182212
number5can 7 uscups
183213
number10can 105 usfloz
184-
@@ -4469,10 +4489,10 @@
214+
@@ -4618,10 +4646,10 @@
185215

186216
btu btu_IT # International Table BTU is the default
187217
britishthermalunit btu
@@ -196,16 +226,16 @@
196226
btu_ISO 1055.06 J # Exact, rounded ISO definition based
197227
# on the IT calorie
198228
quad quadrillion btu
199-
@@ -4635,7 +4655,7 @@
229+
@@ -4784,7 +4812,7 @@
200230

201231
# Celsius heat unit: energy to raise a pound of water 1 degC
202232

203233
-celsiusheatunit cal lb degC / gram K
204234
+celsiusheatunit cal lb (degC) / gram K
205235
chu celsiusheatunit
206236

207-
POWER watt
208-
@@ -4695,13 +4715,13 @@
237+
# "Apparent" average power in an AC circuit, the product of rms voltage
238+
@@ -4842,13 +4870,13 @@
209239
Uvalue 1/Rvalue
210240
europeanUvalue watt / m^2 K
211241
RSI degC m^2 / W
@@ -221,7 +251,7 @@
221251

222252

223253
# Thermal Conductivity of a few materials
224-
@@ -5167,8 +5187,8 @@
254+
@@ -5352,8 +5380,8 @@
225255
# to symbols per second. Modern
226256
# modems transmit several bits
227257
# per symbol.
@@ -232,7 +262,7 @@
232262
# them do. But beware: for
233263
# transmission over modems, a
234264
# few extra bits are used so
235-
@@ -6607,7 +6627,7 @@
265+
@@ -6800,7 +6828,7 @@
236266

237267
pa Pa
238268
ev eV
@@ -241,7 +271,7 @@
241271
oe Oe
242272
mh mH
243273
rd rod
244-
@@ -6989,7 +7009,8 @@
274+
@@ -7182,7 +7210,8 @@
245275
Mag Maz gravity # force
246276
Maz Volm kg / oldliter # mass based on water
247277

@@ -251,7 +281,7 @@
251281
Gf Grafut
252282
Sf Surf
253283
Vm Volm
254-
@@ -7779,7 +7800,7 @@
284+
@@ -7972,7 +8001,7 @@
255285
ton uston
256286
scruple apscruple
257287
fluidounce usfluidounce

definitions.units.patched

+12
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,8 @@ bit 1|8 B # Basic unit of information (entropy). The entropy in bits
444444
# #
445445
###########################################################################
446446

447+
quetta- 1e30
448+
ronna- 1e27
447449
yotta- 1e24 # Greek or Latin octo, "eight"
448450
zetta- 1e21 # Latin septem, "seven"
449451
exa- 1e18 # Greek hex, "six"
@@ -466,6 +468,8 @@ femto- 1e-15 # Danish-Norwegian femten, "fifteen"
466468
atto- 1e-18 # Danish-Norwegian atten, "eighteen"
467469
zepto- 1e-21 # Latin septem, "seven"
468470
yocto- 1e-24 # Greek or Latin octo, "eight"
471+
ronto- 1e-27
472+
quecto- 1e-30
469473

470474
quarter- 1|4
471475
semi- 0.5
@@ -484,6 +488,8 @@ pebi- 2^50 # in IEC 60027-2 Amendment 2 (1999).
484488
exbi- 2^60
485489
zebi- 2^70 # Zebi- and yobi- were added in the 2005 ed.,
486490
yobi- 2^80 # later superseded by ISO/IEC 80000-13:2008.
491+
robi- 2^90
492+
quebi- 2^100
487493
Ki- kibi
488494
Mi- mebi
489495
Gi- gibi
@@ -492,7 +498,11 @@ Pi- pebi
492498
Ei- exbi
493499
Zi- zebi
494500
Yi- yobi
501+
Ri- robi
502+
Qi- quebi
495503

504+
Q- quetta
505+
R- ronna
496506
Y- yotta
497507
Z- zetta
498508
E- exa
@@ -514,6 +524,8 @@ f- femto
514524
a- atto
515525
z- zepto
516526
y- yocto
527+
r- ronto
528+
q- quecto
517529

518530
#
519531
# Names of some numbers

0 commit comments

Comments
 (0)