-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use correct units for base 2 #80
Comments
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 |
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 |
ok 👍 |
…y (defaults to `jedec`), fixes #80
For formatting the data size with base 2, the units need to be
kiB
,MiB
,GiB
instead ofkB
,MB
,GB
according to IEC standards.The text was updated successfully, but these errors were encountered: