[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 25e7290d36: Add new SI prefixes
From: |
Mattias Engdegård |
Subject: |
master 25e7290d36: Add new SI prefixes |
Date: |
Thu, 24 Nov 2022 08:31:33 -0500 (EST) |
branch: master
commit 25e7290d36723525eef189e3b7b194e1110f4d31
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Add new SI prefixes
* lisp/calc/calc-units.el (math-unit-prefixes):
* lisp/files.el (file-size-human-readable):
Add ronna, quetta, ronto and quecto. (We get the future IEC binary
prefixes Ri and Qi (robi and quebi) in `file-size-human-readable` for
free.)
---
lisp/calc/calc-units.el | 9 +++++++--
lisp/files.el | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index c8405c7d1a..42156b9460 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -317,7 +317,9 @@ If you change this, be sure to set `math-units-table' to
nil to ensure
that the combined units table will be rebuilt.")
(defvar math-unit-prefixes
- '( ( ?Y (^ 10 24) "Yotta" )
+ '( ( ?Q (^ 10 30) "quetta" )
+ ( ?R (^ 10 27) "ronna" )
+ ( ?Y (^ 10 24) "Yotta" )
( ?Z (^ 10 21) "Zetta" )
( ?E (^ 10 18) "Exa" )
( ?P (^ 10 15) "Peta" )
@@ -340,7 +342,10 @@ that the combined units table will be rebuilt.")
( ?f (^ 10 -15) "Femto" )
( ?a (^ 10 -18) "Atto" )
( ?z (^ 10 -21) "zepto" )
- ( ?y (^ 10 -24) "yocto" )))
+ ( ?y (^ 10 -24) "yocto" )
+ ( ?r (^ 10 -27) "ronto" )
+ ( ?q (^ 10 -30) "quecto" )
+ ))
(defvar math-standard-units-systems
'( ( base nil )
diff --git a/lisp/files.el b/lisp/files.el
index 60c0eb917e..f1f890430f 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1533,7 +1533,7 @@ in all cases, since that is the standard symbol for byte."
(let ((power (if (or (null flavor) (eq flavor 'iec))
1024.0
1000.0))
- (prefixes '("" "k" "M" "G" "T" "P" "E" "Z" "Y")))
+ (prefixes '("" "k" "M" "G" "T" "P" "E" "Z" "Y" "R" "Q")))
(while (and (>= file-size power) (cdr prefixes))
(setq file-size (/ file-size power)
prefixes (cdr prefixes)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 25e7290d36: Add new SI prefixes,
Mattias Engdegård <=