RFR: JDK-8301444: Port fdlibm hyperbolic transcendental functions to Java

2023-02-04 Thread Joe Darcy
Initial pass of porting FDLIBM sinh/cosh/tanh to Java. I do intend to refactor the regression tests a bit to reduce duplication, but the actual ports should be ready for review. Diff'ing the ports as before, original vs transliteration port: $ diff -w Hyperbolic.c Hyperbolic.translit.java 1c1

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v2]

2023-02-04 Thread Tagir F . Valeev
On Sat, 4 Feb 2023 15:09:04 GMT, Emily wrote: >> Tagir F. Valeev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Typo in doc fixed > > src/java.base/share/classes/java/lang/Math.java line 2209: > >> 2207: * @param max maximal

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath [v2]

2023-02-04 Thread Tagir F . Valeev
> clamp() methods added to Math and StrictMath > > `int clamp(long, int, int)` is somewhat different, as it accepts a `long` > value and safely clamps it to an `int` range. Other overloads work with a > particular type (long, float and double). Using similar approach in other > cases (e.g.

Re: RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath

2023-02-04 Thread Emily
On Sat, 4 Feb 2023 13:24:11 GMT, Tagir F. Valeev wrote: > clamp() methods added to Math and StrictMath > > `int clamp(long, int, int)` is somewhat different, as it accepts a `long` > value and safely clamps it to an `int` range. Other overloads work with a > particular type (long, float and

RFR: 8301226: Add clamp() methods to java.lang.Math and to StrictMath

2023-02-04 Thread Tagir F . Valeev
clamp() methods added to Math and StrictMath `int clamp(long, int, int)` is somewhat different, as it accepts a `long` value and safely clamps it to an `int` range. Other overloads work with a particular type (long, float and double). Using similar approach in other cases (e.g. `float