forked from GitHub/haskell-wasm
fix corner cases for float instructions
This commit is contained in:
@@ -660,7 +660,7 @@
|
||||
(assert_return (invoke "f64.nearest" (f64.const 0x1.0000000000001p+52)) (f64.const 0x1.0000000000001p+52))
|
||||
(assert_return (invoke "f64.nearest" (f64.const 0x1.0000000000002p+52)) (f64.const 0x1.0000000000002p+52))
|
||||
(assert_return (invoke "f64.nearest" (f64.const 0x1.fffffffffffffp-2)) (f64.const 0.0))
|
||||
;; (assert_return (invoke "f64.nearest" (f64.const 0x1.fffffffffffffp+105)) (f64.const 0x1.fffffffffffffp+105))
|
||||
(assert_return (invoke "f64.nearest" (f64.const 0x1.fffffffffffffp+105)) (f64.const 0x1.fffffffffffffp+105))
|
||||
|
||||
;; Nearest should not round halfway cases away from zero (as C's round(3) does)
|
||||
;; or up (as JS's Math.round does).
|
||||
|
||||
Reference in New Issue
Block a user