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.)
This commit is contained in:
parent
9fcff114b8
commit
25e7290d36
2 changed files with 8 additions and 3 deletions
|
@ -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 )
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Add table
Reference in a new issue