Hacker News new | ask | show | jobs
by sbanach 5028 days ago
Sure adaml_623,

0x3dcccccd in IEEE 754-2008 (binary32) corresponds to the interval (0.09999999776482582, 0.10000000521540642) - which contains 0.1.

Disclaimers: I worked this out with double precision, and if you care about if the endpoints are inclusive/exclusive, the wikipedia article will help.

1 comments

X \elem S is not the same as X == S, in many important contexts.
Agreed. I "proved my point" but I didn't do it "by supplying 0.1 in a binary floating point format", because that wasn't what my point was.