emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Should Calc predefined units table include information units?


From: Mitchell Perilstein
Subject: Should Calc predefined units table include information units?
Date: Sun, 18 Oct 2020 13:38:00 -0400

Summary

    Calc's predefined `math-standard-units` table does not include information units: bits, bytes,
    data rates, and SI/IEC multiples thereof.  I argue that it should, and offer to implement them.

Motivations

    a. The predefined Calc units table is mostly physical base units and derivations. But in recent
    times, it's been widely suspected that information theory forms reality and somehow underlies
    those base units.

    b. Information units are encountered often by many users in daily practical use. It's curious
    that you can use Calc to compute Yottabarns per fathom but not the kilobytes needed to write it
    to disk.

Package vs Predefined

    The first question should be, why not make a package defining info units to
    `calc-additional-units` and put that on Elpa? We can, and if people think this is a bad idea I
    will put out a package.  But I'm proposing this addition belongs in Emacs as above.
    
Proposed Scope

    Again from a practical standpoint, the scope can be limited to common computing use: it might
    be too far afield to implement the exotic information units such as Erlangs.  So I'm proposing
    a practical subset:

    * lisp/calc/calc-units.el: add to `math-standard-units` table...
        - `bits` as base unit
        - bytes `B` as derived unit.  Note Barns exists as `b` but this is all consistent.
        - decimal derived byte units (SI), ie powers of 1000, with SI prefixes
        - binary byte units (IEC), ie powers of 1024, with IEC prefixes like kibi and mebi
        - bps rate unit, 1 bit/sec
        - Bps rate unit, 1 byte/sec
        - decimal derived rate units: kbps mbps gbps tbps pbps ebps zbps ybps
        - binary derived rate units: kibps mibps gibps tibps pibps eibps zibps yibps
    * doc/misc/calc.texi - add a paragraph in 11.3, Predefined Units, explaining the predefined binary
      and decimal information units
    * test/lisp/calc/calc-tests.el
    * Changelog

    If the group thinks this is a good idea, I'll work on a patch as above.  Thanks for reading.
    
References

    * https://www.iso.org/obp/ui/#iso:std:iec:80000:-13:ed-1:v1:en - Unfortunately the IEC standard is paywalled
    * https://en.wikipedia.org/wiki/Units_of_information#Units_derived_from_bit
    * https://en.wikipedia.org/wiki/Bit_rate

--
PGP key: 0xB869E17B71E9B43C
Fingerprint: 3DD7 A2E8 13E7 C09A 400A 152C B869 E17B 71E9 B43C

reply via email to

[Prev in Thread] Current Thread [Next in Thread]