In javascript division by zero will result to a value called infinity( or -infinity). Also, any arithmetic operation on infinity with a real number will result to infinity. I would like to know how is infinity value, and the functions that operate over it have been implemented.
Asked
Active
Viewed 166 times
0
-
3[Read about IEEE 754 floating point.](http://en.wikipedia.org/wiki/IEEE_floating_point) – Pointy Nov 24 '13 at 21:56
-
"any arithmetic operation on infinity with a real number will result to infinity" - false. You clearly haven't tried `Infinity * 0` ;) – Niet the Dark Absol Nov 24 '13 at 21:57
1 Answers
1
Infinity is 1.7976931348623157E+308
in Javascript, which is a number that exceeds the upper limit of the floating point numbers. There is also -Infinity, which is a number that exceeds the lower limirt of the floating point numbers (-1.7976931348623157E+10308
).
Scientific notation, didn't want to exceed the char limit ;)

Cilan
- 13,101
- 3
- 34
- 51