Closed ryank109 closed 8 years ago
Hi,
Should the standard be a parameter? SI and JEDEC are currently supported, to do a third I feel that we need to specify which base 2 standard you expect for output.
Not sure if you need a parameter for this, since SI = base10, (Ki, Mi, Gi) = base2? I was just noticing that the symbols were wrong for the formatted outputs.
There might be also concerns for changing this that might affect the current usage of the library. So, if I may suggest, have the default be base 10
instead of base 2
? That way, people do not get any sudden changes in their application and have correct number and units. :)
Oh boy, people wouldn't be happy! 2.0.x was base 10, and there's bugs about how "your math is wrong" or something silly.
JEDEC (base 2) is the standard for memory, and is what most software & people expect to read. IEC is a newer representation, and I think it makes sense as a feature, but I guarantee you it should be an option and not a default. The majority of the existing user base is expecting JEDEC by default; it's a pretty big user base stats.
You are definitely right about how it's being used. It seems the standard does note that it is misusing the units to avoid confusion, but also mentions that it is deprecated as well. https://en.wikipedia.org/wiki/JEDEC_memory_standards#cite_note-4 -- pardon my reference to the wiki page.. :)
I guess I can always pass in base 10
option for format, so not necessary to add anything. If you feel there should be more discussion around this, feel free to keep the issue open, otherwise, you can close it. Thanks.
ok :+1:
For formatting the data size with base 2, the units need to be
kiB
,MiB
,GiB
instead ofkB
,MB
,GB
according to IEC standards.