Hacker News new | past | comments | ask | show | jobs | submit login

> 1.0/0.0 -> Infinity (at least in javascript)

The IEEE floating point standard (for any precision) defines anything divided by zero to be the infinity value (all bits except the sign set to 1).

You where saying?




Please don't be so vain. Division by zero is undefined, that is (supposed) to be taught in high school. The fact is that computers have to display some value when x/0, and that value is defined by IEEE standard in the context programing languages for consistency.

Pretty good wiki on the topic: http://en.wikipedia.org/wiki/Division_by_zero




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: