From d6ed1b896b76a3c46176ec378ea92f024902942a Mon Sep 17 00:00:00 2001 From: Anton Artemov Date: Tue, 27 Jan 2026 10:01:33 +0100 Subject: [PATCH] 8375285: Addressed the reviewer's comments, fixed year in the copyright notice. --- src/java.base/share/classes/java/lang/FdLibm.java | 10 +++++----- src/java.base/share/classes/java/lang/StrictMath.java | 2 +- test/jdk/java/lang/Math/HyperbolicTests.java | 10 +++++----- test/jdk/java/lang/StrictMath/ExhaustingTests.java | 2 +- test/jdk/java/lang/StrictMath/FdlibmTranslit.java | 2 +- test/jdk/java/lang/StrictMath/HyperbolicTests.java | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/java.base/share/classes/java/lang/FdLibm.java b/src/java.base/share/classes/java/lang/FdLibm.java index 71b9dde6136..4f712a5270a 100644 --- a/src/java.base/share/classes/java/lang/FdLibm.java +++ b/src/java.base/share/classes/java/lang/FdLibm.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -3541,15 +3541,15 @@ final class FdLibm { int hx, ix; hx = __HI(x); ix = hx & 0x7fffffff; - if(ix >= 0x7ff00000) { + if (ix >= 0x7ff00000) { return x + x; // x is inf or NaN } - if(ix < 0x3e300000) { // |x| < 2**-28 - if(huge + x > 1.0) { + if (ix < 0x3e300000) { // |x| < 2**-28 + if (huge + x > 1.0) { return x; // return x inexact except 0 } } - if(ix > 0x41b00000) { // |x| > 2**28 + if (ix > 0x41b00000) { // |x| > 2**28 w = Log.compute(Math.abs(x)) + ln2; } else if (ix > 0x40000000) { // 2**28 > |x| > 2.0 t = Math.abs(x); diff --git a/src/java.base/share/classes/java/lang/StrictMath.java b/src/java.base/share/classes/java/lang/StrictMath.java index 85940756a63..6ab890cdce2 100644 --- a/src/java.base/share/classes/java/lang/StrictMath.java +++ b/src/java.base/share/classes/java/lang/StrictMath.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/jdk/java/lang/Math/HyperbolicTests.java b/test/jdk/java/lang/Math/HyperbolicTests.java index ed72f52ff3d..034ac2c495c 100644 --- a/test/jdk/java/lang/Math/HyperbolicTests.java +++ b/test/jdk/java/lang/Math/HyperbolicTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1532,7 +1532,7 @@ public class HyperbolicTests { }; - for(int i = 0; i < testCases.length; i++) { + for (int i = 0; i < testCases.length; i++) { double [] testCase = testCases[i]; failures += testAsinhCaseWithUlpDiff(testCase[0], testCase[1], @@ -1541,7 +1541,7 @@ public class HyperbolicTests { - for(double nan : Tests.NaNs) { + for (double nan : Tests.NaNs) { failures += testAsinhCaseWithUlpDiff(nan, NaNd, 0); } @@ -1556,7 +1556,7 @@ public class HyperbolicTests { - for(int i = 0; i < specialTestCases.length; i++) { + for (int i = 0; i < specialTestCases.length; i++) { failures += testAsinhCaseWithUlpDiff(specialTestCases[i][0], specialTestCases[i][1], 0.0); @@ -1569,7 +1569,7 @@ public class HyperbolicTests { // rounded away since |n-n^3| > 53, the binary precision of a // double significand. - for(int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) { + for (int i = DoubleConsts.MIN_SUB_EXPONENT; i < -27; i++) { double d = Math.scalb(2.0, i); // Result and expected are the same. diff --git a/test/jdk/java/lang/StrictMath/ExhaustingTests.java b/test/jdk/java/lang/StrictMath/ExhaustingTests.java index 29b829bc2e3..143227c4cc3 100644 --- a/test/jdk/java/lang/StrictMath/ExhaustingTests.java +++ b/test/jdk/java/lang/StrictMath/ExhaustingTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2023, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/jdk/java/lang/StrictMath/FdlibmTranslit.java b/test/jdk/java/lang/StrictMath/FdlibmTranslit.java index fc6c7da49a3..dab27ac9b63 100644 --- a/test/jdk/java/lang/StrictMath/FdlibmTranslit.java +++ b/test/jdk/java/lang/StrictMath/FdlibmTranslit.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it diff --git a/test/jdk/java/lang/StrictMath/HyperbolicTests.java b/test/jdk/java/lang/StrictMath/HyperbolicTests.java index d3a955f8183..b7177d1e01c 100644 --- a/test/jdk/java/lang/StrictMath/HyperbolicTests.java +++ b/test/jdk/java/lang/StrictMath/HyperbolicTests.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it