Skip to content

Commit 8462e57

Browse files
committed
8362207: Add more test cases for possible double-rounding in fma
Reviewed-by: rrich Backport-of: 6e368e0c696bc9b2118014937aa2e091ea662985
1 parent 7b94338 commit 8462e57

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/jdk/java/lang/Math/FusedMultiplyAddTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
2323

2424
/*
2525
* @test
26-
* @bug 4851642 8253409
26+
* @bug 4851642 8253409 8362207
2727
* @summary Tests for Math.fusedMac and StrictMath.fusedMac.
2828
* @build Tests
2929
* @build FusedMultiplyAddTests
@@ -352,8 +352,9 @@ private static int testSimpleF() {
352352
{1.0f+Math.ulp(1.0f), 1.0f+Math.ulp(1.0f), -1.0f-2.0f*Math.ulp(1.0f),
353353
Math.ulp(1.0f)*Math.ulp(1.0f)},
354354

355-
// Double-rounding if done in double precision
356-
{0x1.fffffep23f, 0x1.000004p28f, 0x1.fep5f, 0x1.000002p52f}
355+
// Double-rounding if done in double precision and/or double fma
356+
{0x1.fffffep23f, 0x1.000004p28f, 0x1.fep5f, 0x1.000002p52f},
357+
{0x1.001p0f, 0x1.001p0f, 0x1p-100f, 0x1.002002p0f},
357358
};
358359

359360
for (float[] testCase: testCases)

0 commit comments

Comments
 (0)