Inconsistent use of multiples of bytes causing accuracy errors
This is from seeing a reported 9.8GB limit in #11126 (closed), vs. the documented 10GB.
9.8GB isn't 10GB, even if interpreting GB as GiB or vice versa as 10GiB ≈ 10.07GB
and 10GB ≈ 9.31GiB
. My guess is that this is a combination of the string coming from a bytes→GiB conversion, and defining 10MB=10MiB and then multiplying that by 1000 to give GB, so you end up with (1024**2*1000)/1024**3 ≈ 0.98
.
I think it would be good to work out if everything should be GB or GiB, and make sure that is used consistently as that doesn't appear to be the case from this, although it could have been from ±constant.
I personally prefer consistently using IEC multiples (e.g. 10GiB) as it isn't ambiguous or too easily confused with SI or JEDEC (link showing the multiples). That would also take updating of messages, which already seem to be using GiB but using a GB suffix.