On Mon, 5 Jan 2026 17:33:34 GMT, Joe Darcy <[email protected]> wrote:

> Add comment describing why Math.fma uses BigDecimal.

src/java.base/share/classes/java/lang/Math.java line 2380:

> 2378:      */
> 2379:     @IntrinsicCandidate
> 2380:     public static double fma(double a, double b, double c) {

There are some parts that do not sound right to me, but English is not my 
native language. Thus, the text might still sound correct to native ears.

src/java.base/share/classes/java/lang/Math.java line 2384:

> 2382:         // a straightforward manner relying on BigDecimal for the
> 2383:         // heavy-lifting of the numerical computation. It would be
> 2384:         // possible for the computation done using all binary

Suggestion:

        // possible for the computation to be done using all binary

src/java.base/share/classes/java/lang/Math.java line 2387:

> 2385:         // floating-point and integer operations, at the cost of more
> 2386:         // complicated logic. Since most processors have hardware
> 2387:         // support for fma so and this method is an intrinsic

Suggestion:

        // support for fma and this method is an intrinsic

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29044#discussion_r2662324013
PR Review Comment: https://git.openjdk.org/jdk/pull/29044#discussion_r2662325012
PR Review Comment: https://git.openjdk.org/jdk/pull/29044#discussion_r2662326202

Reply via email to