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

For floats, 1.0 / 0.0 produces Infinity according to the IEEE standard. I prefer it that way because it perfectly makes sense for the algorithms I usually deal with and having to check whether the denominator is zero or not makes code slower, which isn't an option if you're crunching tens of millions of numbers a second. It also unnecessarely bloats code.


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

Search: