From 4cc569319077cf25906d50bee8b9340e73392cc1 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Fri, 7 Apr 2023 11:34:06 -0400 Subject: [PATCH] Update units for current SI prefixes Following Resolution 3 of the 27th General Conference on Weights and Measures (CGPM) in 2022 [0], update oslo units to include 'ronna' and 'quetta' for decimal prefixes. Although ISO/IEC 80000-13 has not yet been updated for the binary equivalents, it's safe to assume ISO will follow current practice [1], so those are added as well. [0] https://www.bipm.org/en/cgpm-2022/resolution-3 [1] https://iopscience.iop.org/article/10.1088/1681-7575/ac6afd Change-Id: I6e6b3fe9fe24533553f655a687a3c4e6714fde6f --- oslo_utils/units.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/oslo_utils/units.py b/oslo_utils/units.py index d87e908b..b6c8069b 100644 --- a/oslo_utils/units.py +++ b/oslo_utils/units.py @@ -34,6 +34,10 @@ Zi = 1024 ** 7 "Binary zetta unit" Yi = 1024 ** 8 "Binary yotta unit" +Ri = 1024 ** 9 +"Binary ronna unit" +Qi = 1024 ** 10 +"Binary quetta unit" # Decimal unit constants. k = 1000 @@ -52,3 +56,7 @@ Z = 1000 ** 7 "Decimal zetta unit" Y = 1000 ** 8 "Decimal yotta unit" +R = 1000 ** 9 +"Decimal ronna unit" +Q = 1000 ** 10 +"Decimal quetta unit"