Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're missing the point -- there is no such thing as a precisely correct conversion to a floating point number.

Your suggestion would make type conversion utterly unusable as it would fail seemingly randomly -- for example on simple numbers such as "0.1"



Sure there is such a thing. 0.25 can be precisely converted to float. You're right that such a thing would fail a lot, but that doesn't mean the goal is impossible, merely that achieving it is not very useful.


I did not say it was "impossible," I said it would be "utterly unusable."

I am happy to see you agree with me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: