mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8374785: Template Library: need to tag Float16.copySign as having non-deterministic result because of multiple NaNs with different sign bits
Reviewed-by: thartmann, qamai
This commit is contained in:
parent
d0aae04d61
commit
2fbe47559e
@ -274,6 +274,7 @@ public final class Operations {
|
||||
ops.add(Expression.make(BOOLEANS, "Boolean.logicalXor(", BOOLEANS, ", ", BOOLEANS, ")"));
|
||||
|
||||
// TODO: Math and other classes.
|
||||
// Note: Math.copySign is non-deterministic because of NaN having encoding with sign bit set and unset.
|
||||
|
||||
// Make sure the list is not modifiable.
|
||||
return List.copyOf(ops);
|
||||
@ -294,7 +295,8 @@ public final class Operations {
|
||||
ops.add(Expression.make(INTS, "Float16.compare(", FLOAT16, ",", FLOAT16, ")"));
|
||||
addComparisonOperations(ops, "Float16.compare", FLOAT16);
|
||||
ops.add(Expression.make(INTS, "(", FLOAT16, ").compareTo(", FLOAT16, ")"));
|
||||
ops.add(Expression.make(FLOAT16, "Float16.copySign(", FLOAT16, ",", FLOAT16, ")"));
|
||||
// Note: There are NaN encodings with bit set or unset.
|
||||
ops.add(Expression.make(FLOAT16, "Float16.copySign(", FLOAT16, ",", FLOAT16, ")", WITH_NONDETERMINISTIC_RESULT));
|
||||
ops.add(Expression.make(FLOAT16, "Float16.divide(", FLOAT16, ",", FLOAT16, ")"));
|
||||
ops.add(Expression.make(BOOLEANS, "", FLOAT16, ".equals(", FLOAT16, ")"));
|
||||
// Note: there are multiple NaN values with different bit representations.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user