Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath [v3]

2022-03-15 Thread Joe Darcy
> Add a constant for tau, 2*pi, to Math and StrictMath. Since 2*pi is a very > common value in mathematical formulas, it is helpful to give it a distinct > constant. > > Please also review the CSR https://bugs.openjdk.java.net/browse/JDK-8283136 Joe Darcy has updated the pull request with a new

Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath [v2]

2022-03-14 Thread Iris Clark
On Mon, 14 Mar 2022 23:21:26 GMT, Joe Darcy wrote: >> Add a constant for tau, 2*pi, to Math and StrictMath. Since 2*pi is a very >> common value in mathematical formulas, it is helpful to give it a distinct >> constant. >> >> Please also review the CSR https://bugs.openjdk.java.net/browse/JDK-

Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath

2022-03-14 Thread Joseph D. Darcy
Hi Raffaello, With changing TAU to be set to 2.0 * PI, I'll file a follow-up bug to use the least-precision decimal values that will get rounded to PI and E, respectively, in Math and StrictMath. (Per the general base conversion properties for the double format, there will be between 15 and 1

Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath [v2]

2022-03-14 Thread Joe Darcy
> Add a constant for tau, 2*pi, to Math and StrictMath. Since 2*pi is a very > common value in mathematical formulas, it is helpful to give it a distinct > constant. > > Please also review the CSR https://bugs.openjdk.java.net/browse/JDK-8283136 Joe Darcy has updated the pull request incrementa

Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath

2022-03-14 Thread Joe Darcy
On Mon, 14 Mar 2022 20:52:39 GMT, Joe Darcy wrote: > Add a constant for tau, 2*pi, to Math and StrictMath. Since 2*pi is a very > common value in mathematical formulas, it is helpful to give it a distinct > constant. > > Please also review the CSR https://bugs.openjdk.java.net/browse/JDK-82831

Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath

2022-03-14 Thread Raffaello Giulietti
Right, and PI with 16 digits (or 17). On 3/14/22 22:51, Hans Boehm wrote: Couldn't the apiNote just say TAU == 2 * PI instead? I think the fact that this is actually a guaranteed floating point equality aids clarity. On Mon, Mar 14, 2022 at 2:33 PM Raffaello Giulietti mailto:raffaello.giul

Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath

2022-03-14 Thread Raffaello Giulietti
Hello, I find it a bit disturbing that PI is specified with 21 digits whereas TAU has 16. I think that specifying PI as public static final double PI = 3.141592653589793; doesn't harm anybody and makes it visually more consistent with TAU- Greetings Raffaello On 3/14/22 22:13, Brian Bu

Re: RFR: JDK-8283124: Add constant for tau to Math and StrictMath

2022-03-14 Thread Brian Burkhalter
On Mon, 14 Mar 2022 20:52:39 GMT, Joe Darcy wrote: > Add a constant for tau, 2*pi, to Math and StrictMath. Since 2*pi is a very > common value in mathematical formulas, it is helpful to give it a distinct > constant. > > Please also review the CSR https://bugs.openjdk.java.net/browse/JDK-82831

RFR: JDK-8283124: Add constant for tau to Math and StrictMath

2022-03-14 Thread Joe Darcy
Add a constant for tau, 2*pi, to Math and StrictMath. Since 2*pi is a very common value in mathematical formulas, it is helpful to give it a distinct constant. Please also review the CSR https://bugs.openjdk.java.net/browse/JDK-8283136 - Commit messages: - JDK-8283124: Add constan