Re: RFR: 8211002: test/jdk/java/lang/Math/PowTests.java skips testing for non-corner-case values [v2]
On Wed, 14 Jul 2021 16:43:48 GMT, Brian Burkhalter wrote: >> Please consider this proposal to add some test coverage comparing `Math` and >> `StrictMath` results of `pow()`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8211002: Change so that Tests.testUlpDiff() handles the NaNs and accepts a > ulp tolerance of 2 Marked as reviewed by darcy (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/4758
Re: RFR: 8211002: test/jdk/java/lang/Math/PowTests.java skips testing for non-corner-case values [v2]
On Wed, 14 Jul 2021 16:43:48 GMT, Brian Burkhalter wrote: >> Please consider this proposal to add some test coverage comparing `Math` and >> `StrictMath` results of `pow()`. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8211002: Change so that Tests.testUlpDiff() handles the NaNs and accepts a > ulp tolerance of 2 Ping. - PR: https://git.openjdk.java.net/jdk/pull/4758
Re: RFR: 8211002: test/jdk/java/lang/Math/PowTests.java skips testing for non-corner-case values [v2]
On Tue, 13 Jul 2021 23:29:38 GMT, Joe Darcy wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8211002: Change so that Tests.testUlpDiff() handles the NaNs and accepts a >> ulp tolerance of 2 > > test/jdk/java/lang/Math/PowTests.java line 65: > >> 63: int failures = 0; >> 64: if (Double.isNaN(smResult)) { >> 65: if (!Double.isNaN(mResult)) failures = 1; > > Pretty sure the Tests.testUlpDiff call will handle two NaNs as well as > NaN/non-NaN argument. Looks like that is true. > 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). Good point. - PR: https://git.openjdk.java.net/jdk/pull/4758
Re: RFR: 8211002: test/jdk/java/lang/Math/PowTests.java skips testing for non-corner-case values [v2]
> Please consider this proposal to add some test coverage comparing `Math` and > `StrictMath` results of `pow()`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8211002: Change so that Tests.testUlpDiff() handles the NaNs and accepts a ulp tolerance of 2 - Changes: - all: https://git.openjdk.java.net/jdk/pull/4758/files - new: https://git.openjdk.java.net/jdk/pull/4758/files/0cebcfc8..2fe3ff35 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=4758=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk=4758=00-01 Stats: 10 lines in 1 file changed: 0 ins; 6 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/4758.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4758/head:pull/4758 PR: https://git.openjdk.java.net/jdk/pull/4758