What is negative infinity?- Negative infinity is a number in java script, which is derived by 'dividing negative number by zero'. - A number object needs not to be created to access this static property. - The value of negative infinity is the same as the negative value of the infinity property of the global object.
The values behave different than the mathematical infinity:
1. Any positive value, including POSITIVE_INFINITY, multiplied by NEGATIVE_INFINITY is NEGATIVE_INFINITY. 2. Any negative value, including NEGATIVE_INFINITY, multiplied by NEGATIVE_INFINITY is POSITIVE_INFINITY. 3. Zero multiplied by NEGATIVE_INFINITY is NaN. 4. NaN multiplied by NEGATIVE_INFINITY is NaN. 5. NEGATIVE_INFINITY, divided by any negative value except NEGATIVE_INFINITY, is POSITIVE_INFINITY. 6. NEGATIVE_INFINITY, divided by any positive value except POSITIVE_INFINITY, is NEGATIVE_INFINITY. 7. NEGATIVE_INFINITY, divided by either NEGATIVE_INFINITY or POSITIVE_INFINITY, is NaN. 8. Any number divided by NEGATIVE_INFINITY is zero.
|