SRFI 166: comments on numeric/si Masanori Ogino (18 Jun 2020 00:44 UTC)
Re: SRFI 166: comments on numeric/si Alex Shinn (18 Jun 2020 13:35 UTC)
Re: SRFI 166: comments on numeric/si Marc Nieper-Wißkirchen (19 Jun 2020 09:15 UTC)
Re: SRFI 166: comments on numeric/si Masanori Ogino (20 Jun 2020 03:05 UTC)
Re: SRFI 166: comments on numeric/si Alex Shinn (24 Jun 2020 03:55 UTC)
Re: SRFI 166: comments on numeric/si Masanori Ogino (24 Jun 2020 07:20 UTC)

SRFI 166: comments on numeric/si Masanori Ogino 18 Jun 2020 00:44 UTC

Hello,

I have read the text and implementation in Chibi, and I have some
comments regarding numeric/si.
I wonder if they haven't been discussed yet, but I'd speak up just in case.

1. 1024-based vs. 1000-based

I understand that numeric/si uses 1024 by default in line with the
tradition of the computer industry. However, the 1024-based prefixes
are used mostly with memory and storage capacity.
numeric/si, on the other hand, is designed as a part of the
general-purpose formatting library and not limited to quantities
suitable for use with the binary prefix.
Moreover, even storage vendors usually use SI/1000-based prefixes in
their product packages. (probably because it shows a bigger number,
though.)
I'd suggest reconsidering the decision on the default base.

2. binary prefix with a negative exponent

Chibi's implementation implements 1024-based prefixes with negative
exponents, ex. mi, μi, etc. However, they are not widely used as far
as I know, nor defined in IEC 80000-13.
I'd propose to specify the use of base 1024 with a negative exponent
as an error. (I mean, something like 'it is an error' in RnRS.)

Anyway, thank you for the excellent work!

Best,
--
Masanori Ogino