RFR: 8211002: test/jdk/java/lang/Math/PowTests.java skips testing for non-corner-case values

Joe Darcy darcy at openjdk.java.net
Tue Jul 13 23:40:20 UTC 2021


On Mon, 12 Jul 2021 19:39:13 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Please consider this proposal to add some test coverage comparing `Math` and `StrictMath` results of `pow()`.

test/jdk/java/lang/Math/PowTests.java line 69:

> 67:             failures += Tests.testUlpDiff(
> 68:                 "StrictMath.pow(double, double) vs Math.pow(double, double)",
> 69:                 input1, input2, mResult, smResult, 1.0

In theory at least, one pow method could round an ulp up and the other could round an ulp down so the difference should be 2 ulps (ignoring the special case of values straddling a power of two).

-------------

PR: https://git.openjdk.java.net/jdk/pull/4758


More information about the core-libs-dev mailing list