Hacker News new | ask | show | jobs
by maggit 481 days ago
Exact integers doesn't seem to be its strong suite. Can it even represent 3 exactly?

Running code from the linked notebook (https://github.com/AdamScherlis/notebooks-python/blob/main/m...), I can see that a 32 bit representation of the number 3 decodes to the following float: 2.999999983422908

(This is from running `decode(encode(3, 32))`)

1 comments

Yeah I think any numbers away from 0 or infinity aren’t its strong suit.