Skip to content

Commit 33e9cb6

Browse files
Try fixing nans
1 parent e2334d2 commit 33e9cb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wasm/literal.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,9 +1142,9 @@ Literal Literal::trunc() const {
11421142
Literal Literal::nearbyint() const {
11431143
switch (type.getBasic()) {
11441144
case Type::f32:
1145-
return Literal(std::nearbyint(getf32()));
1145+
return standardizeNaN(Literal(std::nearbyint(getf32())));
11461146
case Type::f64:
1147-
return Literal(std::nearbyint(getf64()));
1147+
return standardizeNaN(Literal(std::nearbyint(getf64())));
11481148
default:
11491149
WASM_UNREACHABLE("unexpected type");
11501150
}

0 commit comments

Comments
 (0)