Calling java.lang.Math.pow() under patchset 8 of the native 1.3.1 JDK yields incorrect results in certain cases. The following tests were performed: 2^10 = 0 2^5 = 0 2^1 = 2 2^0.5 = 1.414214 2^0 = 1 2^-0 = 1 2^-0.5 = 0 2^-1 = 0.5 2^-5 = 0 2^-10 = 0 -2^10 = 1024 -2^5 = -32 -2^1 = -2 -2^0.5 = NaN -2^0 = 1 -2^-0 = 1 -2^-0.5 = NaN -2^-1 = -0.5 -2^-5 = -0.03125 -2^-10 = 9.765625E-4 How-To-Repeat: Run the following code: public class TestPow { public static void main(String args[]) throws Exception { System.out.println("Math.pow(2.0,10.0) = " + Math.pow(2.0,10.0)); } } It prints the following: Math.pow(2.0,10.0) = 0.0 It should print the following: Math.pow(2.0,10.0) = 1024.0
Responsible Changed From-To: freebsd-ports-bugs->glewis Over to Maintainer
State Changed From-To: open->closed A patch has been committed.