poke-devel
[Top][All Lists]
Advanced

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

Re: [COMMITTED] pkl, testsuite, doc: defunit, support for arbitrary name


From: Alfred M. Szmidt
Subject: Re: [COMMITTED] pkl, testsuite, doc: defunit, support for arbitrary named units
Date: Sat, 29 Feb 2020 09:37:11 -0500

I think following the lead of GNU Coreutils would be wise here
(https://www.gnu.org/software/coreutils/manual/html_node/Block-size.html):

defunit kB      = 10 ** 3;
# `K' is special: the SI prefix is `k' and the ISO/IEC 80000-13 prefix
# is `Ki', but tradition and POSIX use `k' to mean `KiB'.
defunit k       = 2 ** 10;
defunit K       = 2 ** 10;
defunit KiB     = 2 ** 10;
defunit MB      = 10 ** 6;
defunit M       = 2 ** 20;
defunit MiB     = 2 ** 20;
defunit GB      = 10 ** 9;
defunit G       = 2 ** 30;
defunit GiB     = 2 ** 30;
defunit TB      = 10 ** 12;
defunit T       = 2 ** 40;
defunit TiB     = 2 ** 40;
defunit PB      = 10 ** 15;
defunit P       = 2 ** 50;
defunit PiB     = 2 ** 50;
defunit EB      = 10 ** 18;
defunit E       = 2 ** 60;
defunit EiB     = 2 ** 60;
defunit ZB      = 10 ** 21;
defunit Z       = 2 ** 70;
defunit ZiB     = 2 ** 70;
defunit YB      = 10 ** 24;
defunit Y       = 2 ** 80;
defunit YiB     = 2 ** 80;



reply via email to

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