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

Converting a IEEE float to a string is tricky, too, IMO more tricky.

It would be a lot slower, too, and wouldn’t work. How do you define “compare the result”? The strings “0.0” and “-0.0” would have to be equal to each other, and the string “NaN” not equal to itself, “1000” larger than “0.999E3”, etc.



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

Search: