by paulddraper · 2y ago · 0 comments
I'm confused by this.
What is the precision of 0.1, relative to IEEE 754?
If I read it correctly, that statement is saying:
json_number_precision(json_number) <= ieee_754_precision
^ How do I calculate these values?It does seem unclear what it means to exceed precision (given rounding is such an expected part of the way we use these numbers). Magnitude feels easier as at least you definitely run out of bits in the exponent.
So including the string "0.1" in a message is fine because v = 0.1 implies 0.05 < v < 0.15, but including 0.100000000000000000000000000000000000 would not be.