File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1247
1247
(assert_return (invoke " thepast0" (f64.const 0x1p-1021 ) (f64.const 0x1.fffffffffffffp-1 ) (f64.const 0x1p1 ) (f64.const 0x1p-1 )) (f64.const 0x1.fffffffffffffp-1022 ))
1248
1248
(assert_return (invoke " thepast1" (f64.const 0x1p-54 ) (f64.const 0x1.fffffffffffffp-1 ) (f64.const 0x1p-54 )) (f64.const -0x1p-107 ))
1249
1249
(assert_return (invoke " thepast2" (f32.const 0x1p-125 ) (f32.const 0x1p-1 ) (f32.const 0x1p0 )) (f32.const 0x1p-126 ))
1250
+
1251
+ ;; Test for floating point tolerances observed in some GPUs.
1252
+ ;; https://community.amd.com/thread/145582
1253
+
1254
+ (module
1255
+ (func $inverse (param $x f32 ) (result f32 )
1256
+ (f32.div (f32.const 1.0 ) (get_local $x ))
1257
+ )
1258
+ (export " inverse" $inverse )
1259
+ )
1260
+
1261
+ (assert_return (invoke " inverse" (f32.const 96.0 )) (f32.const 0x1.555556p-7 ))
You can’t perform that action at this time.
0 commit comments