-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
22
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
The pow method of the Math class in java.lang doesn't work properly when the second argument is 0. For example,
double infinity = 1/0.0, nan = 1%0.0;
Now,
Math.pow(0,0)
Math.pow(nan, 0)
Math.pow(infinity, 0)
Math.pow(0/0.0, 0)
All of these and many more are returning 1.0 as output. However, all these expressions are interdeterminate and undefined, so technically the outputs should be NaN in all these cases. This is the bug that Math.pow(anything, 0) is returning 1.0 regardless of the fact that it might be undefined. Please fix this bug as soon as possible
FREQUENCY : always
The pow method of the Math class in java.lang doesn't work properly when the second argument is 0. For example,
double infinity = 1/0.0, nan = 1%0.0;
Now,
Math.pow(0,0)
Math.pow(nan, 0)
Math.pow(infinity, 0)
Math.pow(0/0.0, 0)
All of these and many more are returning 1.0 as output. However, all these expressions are interdeterminate and undefined, so technically the outputs should be NaN in all these cases. This is the bug that Math.pow(anything, 0) is returning 1.0 regardless of the fact that it might be undefined. Please fix this bug as soon as possible
FREQUENCY : always