RFR: 8338694: x86_64 intrinsic for tanh using libm

Joe Darcy darcy at openjdk.org
Tue Aug 27 22:47:18 UTC 2024


On Tue, 27 Aug 2024 21:22:26 GMT, Srinivas Vamsi Parasa <duke at openjdk.org> wrote:

> > This PR doesn't include any additional tests. It is often appropriate to add more regression testing when introducing a new implementation of a method.
> 
> Thank You Joe for the suggestion. Will add more tests. (This PR passes the tier-1 tanh tests in the HyperbolicTests.Java)

Yes @vamsi-parasa ; running that test is a good backstop and it is written to be applicable to any implementation of {sinh, cosh, tanh} that meet the general quality-of-implementation criteria for java.lang.Math. To be explicit, the WorstCaseTests.java file, and for good measure all the java.lang.Math tests, should also be run too for a change like this.

For a hypothetical example, if an intrinsic used different polynomials for different ranges of the input, it would be a reasonable regression tests _for that implementation_ to probe around the boundary of the transition between the polynomials to make sure the monotonicity requirements were being met.

That kind of check could be written to be generally applicable and be suitable for a regression tests in java/lang/Math or could be suitable for a regression test in the HotSpot area. HTH

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

PR Comment: https://git.openjdk.org/jdk/pull/20657#issuecomment-2313699961


More information about the core-libs-dev mailing list