| 1 |
;; Test t.const instructions |
| 2 |
|
| 3 |
;; Syntax error |
| 4 |
|
| 5 |
(module (func (i32.const 0xffffffff) drop)) |
| 6 |
(module (func (i32.const -0x80000000) drop)) |
| 7 |
(assert_malformed |
| 8 |
(module quote "(func (i32.const 0x100000000) drop)") |
| 9 |
"constant out of range" |
| 10 |
) |
| 11 |
(assert_malformed |
| 12 |
(module quote "(func (i32.const -0x80000001) drop)") |
| 13 |
"constant out of range" |
| 14 |
) |
| 15 |
|
| 16 |
(module (func (i32.const 4294967295) drop)) |
| 17 |
(module (func (i32.const -2147483648) drop)) |
| 18 |
(assert_malformed |
| 19 |
(module quote "(func (i32.const 4294967296) drop)") |
| 20 |
"constant out of range" |
| 21 |
) |
| 22 |
(assert_malformed |
| 23 |
(module quote "(func (i32.const -2147483649) drop)") |
| 24 |
"constant out of range" |
| 25 |
) |
| 26 |
|
| 27 |
(module (func (i64.const 0xffffffffffffffff) drop)) |
| 28 |
(module (func (i64.const -0x8000000000000000) drop)) |
| 29 |
(assert_malformed |
| 30 |
(module quote "(func (i64.const 0x10000000000000000) drop)") |
| 31 |
"constant out of range" |
| 32 |
) |
| 33 |
(assert_malformed |
| 34 |
(module quote "(func (i64.const -0x8000000000000001) drop)") |
| 35 |
"constant out of range" |
| 36 |
) |
| 37 |
|
| 38 |
(module (func (i64.const 18446744073709551615) drop)) |
| 39 |
(module (func (i64.const -9223372036854775808) drop)) |
| 40 |
(assert_malformed |
| 41 |
(module quote "(func (i64.const 18446744073709551616) drop)") |
| 42 |
"constant out of range" |
| 43 |
) |
| 44 |
(assert_malformed |
| 45 |
(module quote "(func (i64.const -9223372036854775809) drop)") |
| 46 |
"constant out of range" |
| 47 |
) |
| 48 |
|
| 49 |
(module (func (f32.const 0x1p127) drop)) |
| 50 |
(module (func (f32.const -0x1p127) drop)) |
| 51 |
(module (func (f32.const 0x1.fffffep127) drop)) |
| 52 |
(module (func (f32.const -0x1.fffffep127) drop)) |
| 53 |
(module (func (f32.const 0x1.fffffe7p127) drop)) |
| 54 |
(module (func (f32.const -0x1.fffffe7p127) drop)) |
| 55 |
(module (func (f32.const 0x1.fffffefffffff8000000p127) drop)) |
| 56 |
(module (func (f32.const -0x1.fffffefffffff8000000p127) drop)) |
| 57 |
(module (func (f32.const 0x1.fffffefffffffffffffp127) drop)) |
| 58 |
(module (func (f32.const -0x1.fffffefffffffffffffp127) drop)) |
| 59 |
(assert_malformed |
| 60 |
(module quote "(func (f32.const 0x1p128) drop)") |
| 61 |
"constant out of range" |
| 62 |
) |
| 63 |
(assert_malformed |
| 64 |
(module quote "(func (f32.const -0x1p128) drop)") |
| 65 |
"constant out of range" |
| 66 |
) |
| 67 |
(assert_malformed |
| 68 |
(module quote "(func (f32.const 0x1.ffffffp127) drop)") |
| 69 |
"constant out of range" |
| 70 |
) |
| 71 |
(assert_malformed |
| 72 |
(module quote "(func (f32.const -0x1.ffffffp127) drop)") |
| 73 |
"constant out of range" |
| 74 |
) |
| 75 |
|
| 76 |
(module (func (f32.const 1e38) drop)) |
| 77 |
(module (func (f32.const -1e38) drop)) |
| 78 |
(assert_malformed |
| 79 |
(module quote "(func (f32.const 1e39) drop)") |
| 80 |
"constant out of range" |
| 81 |
) |
| 82 |
(assert_malformed |
| 83 |
(module quote "(func (f32.const -1e39) drop)") |
| 84 |
"constant out of range" |
| 85 |
) |
| 86 |
|
| 87 |
(module (func (f32.const 340282356779733623858607532500980858880) drop)) |
| 88 |
(module (func (f32.const -340282356779733623858607532500980858880) drop)) |
| 89 |
(assert_malformed |
| 90 |
(module quote "(func (f32.const 340282356779733661637539395458142568448) drop)") |
| 91 |
"constant out of range" |
| 92 |
) |
| 93 |
(assert_malformed |
| 94 |
(module quote "(func (f32.const -340282356779733661637539395458142568448) drop)") |
| 95 |
"constant out of range" |
| 96 |
) |
| 97 |
|
| 98 |
(module (func (f64.const 0x1p1023) drop)) |
| 99 |
(module (func (f64.const -0x1p1023) drop)) |
| 100 |
(module (func (f64.const 0x1.fffffffffffffp1023) drop)) |
| 101 |
(module (func (f64.const -0x1.fffffffffffffp1023) drop)) |
| 102 |
(module (func (f64.const 0x1.fffffffffffff7p1023) drop)) |
| 103 |
(module (func (f64.const -0x1.fffffffffffff7p1023) drop)) |
| 104 |
(module (func (f64.const 0x1.fffffffffffff7ffffffp1023) drop)) |
| 105 |
(module (func (f64.const -0x1.fffffffffffff7ffffffp1023) drop)) |
| 106 |
(assert_malformed |
| 107 |
(module quote "(func (f64.const 0x1p1024) drop)") |
| 108 |
"constant out of range" |
| 109 |
) |
| 110 |
(assert_malformed |
| 111 |
(module quote "(func (f64.const -0x1p1024) drop)") |
| 112 |
"constant out of range" |
| 113 |
) |
| 114 |
(assert_malformed |
| 115 |
(module quote "(func (f64.const 0x1.fffffffffffff8p1023) drop)") |
| 116 |
"constant out of range" |
| 117 |
) |
| 118 |
(assert_malformed |
| 119 |
(module quote "(func (f64.const -0x1.fffffffffffff8p1023) drop)") |
| 120 |
"constant out of range" |
| 121 |
) |
| 122 |
|
| 123 |
(module (func (f64.const 1e308) drop)) |
| 124 |
(module (func (f64.const -1e308) drop)) |
| 125 |
(assert_malformed |
| 126 |
(module quote "(func (f64.const 1e309) drop)") |
| 127 |
"constant out of range" |
| 128 |
) |
| 129 |
(assert_malformed |
| 130 |
(module quote "(func (f64.const -1e309) drop)") |
| 131 |
"constant out of range" |
| 132 |
) |
| 133 |
|
| 134 |
(module (func (f64.const 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop)) |
| 135 |
(module (func (f64.const -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop)) |
| 136 |
(assert_malformed |
| 137 |
(module quote "(func (f64.const 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)") |
| 138 |
"constant out of range" |
| 139 |
) |
| 140 |
(assert_malformed |
| 141 |
(module quote "(func (f64.const -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop)") |
| 142 |
"constant out of range" |
| 143 |
) |
| 144 |
|
| 145 |
(module (func (f32.const nan:0x1) drop)) |
| 146 |
(module (func (f64.const nan:0x1) drop)) |
| 147 |
(module (func (f32.const nan:0x7f_ffff) drop)) |
| 148 |
(module (func (f64.const nan:0xf_ffff_ffff_ffff) drop)) |
| 149 |
|
| 150 |
(assert_malformed |
| 151 |
(module quote "(func (f32.const nan:1) drop)") |
| 152 |
"unknown operator" |
| 153 |
) |
| 154 |
(assert_malformed |
| 155 |
(module quote "(func (f64.const nan:1) drop)") |
| 156 |
"unknown operator" |
| 157 |
) |
| 158 |
|
| 159 |
(assert_malformed |
| 160 |
(module quote "(func (f32.const nan:0x0) drop)") |
| 161 |
"constant out of range" |
| 162 |
) |
| 163 |
(assert_malformed |
| 164 |
(module quote "(func (f64.const nan:0x0) drop)") |
| 165 |
"constant out of range" |
| 166 |
) |
| 167 |
|
| 168 |
(assert_malformed |
| 169 |
(module quote "(func (f32.const nan:0x80_0000) drop)") |
| 170 |
"constant out of range" |
| 171 |
) |
| 172 |
(assert_malformed |
| 173 |
(module quote "(func (f64.const nan:0x10_0000_0000_0000) drop)") |
| 174 |
"constant out of range" |
| 175 |
) |
| 176 |
|
| 177 |
|
| 178 |
;; Rounding behaviour |
| 179 |
|
| 180 |
;; f32, small exponent |
| 181 |
(module (func (export "f") (result f32) (f32.const +0x1.00000100000000000p-50))) |
| 182 |
(assert_return (invoke "f") (f32.const +0x1.000000p-50)) |
| 183 |
(module (func (export "f") (result f32) (f32.const -0x1.00000100000000000p-50))) |
| 184 |
(assert_return (invoke "f") (f32.const -0x1.000000p-50)) |
| 185 |
(module (func (export "f") (result f32) (f32.const +0x1.00000100000000001p-50))) |
| 186 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 187 |
(module (func (export "f") (result f32) (f32.const -0x1.00000100000000001p-50))) |
| 188 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 189 |
(module (func (export "f") (result f32) (f32.const +0x1.000001fffffffffffp-50))) |
| 190 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 191 |
(module (func (export "f") (result f32) (f32.const -0x1.000001fffffffffffp-50))) |
| 192 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 193 |
(module (func (export "f") (result f32) (f32.const +0x1.00000200000000000p-50))) |
| 194 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 195 |
(module (func (export "f") (result f32) (f32.const -0x1.00000200000000000p-50))) |
| 196 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 197 |
(module (func (export "f") (result f32) (f32.const +0x1.00000200000000001p-50))) |
| 198 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 199 |
(module (func (export "f") (result f32) (f32.const -0x1.00000200000000001p-50))) |
| 200 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 201 |
(module (func (export "f") (result f32) (f32.const +0x1.000002fffffffffffp-50))) |
| 202 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 203 |
(module (func (export "f") (result f32) (f32.const -0x1.000002fffffffffffp-50))) |
| 204 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 205 |
(module (func (export "f") (result f32) (f32.const +0x1.00000300000000000p-50))) |
| 206 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 207 |
(module (func (export "f") (result f32) (f32.const -0x1.00000300000000000p-50))) |
| 208 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 209 |
(module (func (export "f") (result f32) (f32.const +0x1.00000300000000001p-50))) |
| 210 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 211 |
(module (func (export "f") (result f32) (f32.const -0x1.00000300000000001p-50))) |
| 212 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 213 |
(module (func (export "f") (result f32) (f32.const +0x1.000003fffffffffffp-50))) |
| 214 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 215 |
(module (func (export "f") (result f32) (f32.const -0x1.000003fffffffffffp-50))) |
| 216 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 217 |
(module (func (export "f") (result f32) (f32.const +0x1.00000400000000000p-50))) |
| 218 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 219 |
(module (func (export "f") (result f32) (f32.const -0x1.00000400000000000p-50))) |
| 220 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 221 |
(module (func (export "f") (result f32) (f32.const +0x1.00000400000000001p-50))) |
| 222 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 223 |
(module (func (export "f") (result f32) (f32.const -0x1.00000400000000001p-50))) |
| 224 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 225 |
(module (func (export "f") (result f32) (f32.const +0x1.000004fffffffffffp-50))) |
| 226 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 227 |
(module (func (export "f") (result f32) (f32.const -0x1.000004fffffffffffp-50))) |
| 228 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 229 |
(module (func (export "f") (result f32) (f32.const +0x1.00000500000000000p-50))) |
| 230 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 231 |
(module (func (export "f") (result f32) (f32.const -0x1.00000500000000000p-50))) |
| 232 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 233 |
(module (func (export "f") (result f32) (f32.const +0x1.00000500000000001p-50))) |
| 234 |
(assert_return (invoke "f") (f32.const +0x1.000006p-50)) |
| 235 |
(module (func (export "f") (result f32) (f32.const -0x1.00000500000000001p-50))) |
| 236 |
(assert_return (invoke "f") (f32.const -0x1.000006p-50)) |
| 237 |
|
| 238 |
(module (func (export "f") (result f32) (f32.const +0x4000.004000000p-64))) |
| 239 |
(assert_return (invoke "f") (f32.const +0x1.000000p-50)) |
| 240 |
(module (func (export "f") (result f32) (f32.const -0x4000.004000000p-64))) |
| 241 |
(assert_return (invoke "f") (f32.const -0x1.000000p-50)) |
| 242 |
(module (func (export "f") (result f32) (f32.const +0x4000.004000001p-64))) |
| 243 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 244 |
(module (func (export "f") (result f32) (f32.const -0x4000.004000001p-64))) |
| 245 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 246 |
(module (func (export "f") (result f32) (f32.const +0x4000.007ffffffp-64))) |
| 247 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 248 |
(module (func (export "f") (result f32) (f32.const -0x4000.007ffffffp-64))) |
| 249 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 250 |
(module (func (export "f") (result f32) (f32.const +0x4000.008000000p-64))) |
| 251 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 252 |
(module (func (export "f") (result f32) (f32.const -0x4000.008000000p-64))) |
| 253 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 254 |
(module (func (export "f") (result f32) (f32.const +0x4000.008000001p-64))) |
| 255 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 256 |
(module (func (export "f") (result f32) (f32.const -0x4000.008000001p-64))) |
| 257 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 258 |
(module (func (export "f") (result f32) (f32.const +0x4000.00bffffffp-64))) |
| 259 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 260 |
(module (func (export "f") (result f32) (f32.const -0x4000.00bffffffp-64))) |
| 261 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 262 |
(module (func (export "f") (result f32) (f32.const +0x4000.00c000000p-64))) |
| 263 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 264 |
(module (func (export "f") (result f32) (f32.const -0x4000.00c000000p-64))) |
| 265 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 266 |
(module (func (export "f") (result f32) (f32.const +0x4000.00c000001p-64))) |
| 267 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 268 |
(module (func (export "f") (result f32) (f32.const -0x4000.00c000001p-64))) |
| 269 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 270 |
(module (func (export "f") (result f32) (f32.const +0x4000.00fffffffp-64))) |
| 271 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 272 |
(module (func (export "f") (result f32) (f32.const -0x4000.00fffffffp-64))) |
| 273 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 274 |
(module (func (export "f") (result f32) (f32.const +0x4000.010000001p-64))) |
| 275 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 276 |
(module (func (export "f") (result f32) (f32.const -0x4000.010000001p-64))) |
| 277 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 278 |
(module (func (export "f") (result f32) (f32.const +0x4000.013ffffffp-64))) |
| 279 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 280 |
(module (func (export "f") (result f32) (f32.const -0x4000.013ffffffp-64))) |
| 281 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 282 |
(module (func (export "f") (result f32) (f32.const +0x4000.014000001p-64))) |
| 283 |
(assert_return (invoke "f") (f32.const +0x1.000006p-50)) |
| 284 |
(module (func (export "f") (result f32) (f32.const -0x4000.014000001p-64))) |
| 285 |
(assert_return (invoke "f") (f32.const -0x1.000006p-50)) |
| 286 |
|
| 287 |
(module (func (export "f") (result f32) (f32.const +8.8817847263968443573e-16))) |
| 288 |
(assert_return (invoke "f") (f32.const +0x1.000000p-50)) |
| 289 |
(module (func (export "f") (result f32) (f32.const -8.8817847263968443573e-16))) |
| 290 |
(assert_return (invoke "f") (f32.const -0x1.000000p-50)) |
| 291 |
(module (func (export "f") (result f32) (f32.const +8.8817847263968443574e-16))) |
| 292 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 293 |
(module (func (export "f") (result f32) (f32.const -8.8817847263968443574e-16))) |
| 294 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 295 |
(module (func (export "f") (result f32) (f32.const +8.8817857851880284252e-16))) |
| 296 |
(assert_return (invoke "f") (f32.const +0x1.000002p-50)) |
| 297 |
(module (func (export "f") (result f32) (f32.const -8.8817857851880284252e-16))) |
| 298 |
(assert_return (invoke "f") (f32.const -0x1.000002p-50)) |
| 299 |
(module (func (export "f") (result f32) (f32.const +8.8817857851880284253e-16))) |
| 300 |
(assert_return (invoke "f") (f32.const +0x1.000004p-50)) |
| 301 |
(module (func (export "f") (result f32) (f32.const -8.8817857851880284253e-16))) |
| 302 |
(assert_return (invoke "f") (f32.const -0x1.000004p-50)) |
| 303 |
|
| 304 |
;; f32, large exponent |
| 305 |
(module (func (export "f") (result f32) (f32.const +0x1.00000100000000000p+50))) |
| 306 |
(assert_return (invoke "f") (f32.const +0x1.000000p+50)) |
| 307 |
(module (func (export "f") (result f32) (f32.const -0x1.00000100000000000p+50))) |
| 308 |
(assert_return (invoke "f") (f32.const -0x1.000000p+50)) |
| 309 |
(module (func (export "f") (result f32) (f32.const +0x1.00000100000000001p+50))) |
| 310 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 311 |
(module (func (export "f") (result f32) (f32.const -0x1.00000100000000001p+50))) |
| 312 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 313 |
(module (func (export "f") (result f32) (f32.const +0x1.000001fffffffffffp+50))) |
| 314 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 315 |
(module (func (export "f") (result f32) (f32.const -0x1.000001fffffffffffp+50))) |
| 316 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 317 |
(module (func (export "f") (result f32) (f32.const +0x1.00000200000000000p+50))) |
| 318 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 319 |
(module (func (export "f") (result f32) (f32.const -0x1.00000200000000000p+50))) |
| 320 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 321 |
(module (func (export "f") (result f32) (f32.const +0x1.00000200000000001p+50))) |
| 322 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 323 |
(module (func (export "f") (result f32) (f32.const -0x1.00000200000000001p+50))) |
| 324 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 325 |
(module (func (export "f") (result f32) (f32.const +0x1.000002fffffffffffp+50))) |
| 326 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 327 |
(module (func (export "f") (result f32) (f32.const -0x1.000002fffffffffffp+50))) |
| 328 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 329 |
(module (func (export "f") (result f32) (f32.const +0x1.00000300000000000p+50))) |
| 330 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 331 |
(module (func (export "f") (result f32) (f32.const -0x1.00000300000000000p+50))) |
| 332 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 333 |
(module (func (export "f") (result f32) (f32.const +0x1.00000300000000001p+50))) |
| 334 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 335 |
(module (func (export "f") (result f32) (f32.const -0x1.00000300000000001p+50))) |
| 336 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 337 |
(module (func (export "f") (result f32) (f32.const +0x1.000003fffffffffffp+50))) |
| 338 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 339 |
(module (func (export "f") (result f32) (f32.const -0x1.000003fffffffffffp+50))) |
| 340 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 341 |
(module (func (export "f") (result f32) (f32.const +0x1.00000400000000000p+50))) |
| 342 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 343 |
(module (func (export "f") (result f32) (f32.const -0x1.00000400000000000p+50))) |
| 344 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 345 |
(module (func (export "f") (result f32) (f32.const +0x1.00000400000000001p+50))) |
| 346 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 347 |
(module (func (export "f") (result f32) (f32.const -0x1.00000400000000001p+50))) |
| 348 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 349 |
(module (func (export "f") (result f32) (f32.const +0x1.000004fffffffffffp+50))) |
| 350 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 351 |
(module (func (export "f") (result f32) (f32.const -0x1.000004fffffffffffp+50))) |
| 352 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 353 |
(module (func (export "f") (result f32) (f32.const +0x1.00000500000000000p+50))) |
| 354 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 355 |
(module (func (export "f") (result f32) (f32.const -0x1.00000500000000000p+50))) |
| 356 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 357 |
(module (func (export "f") (result f32) (f32.const +0x1.00000500000000001p+50))) |
| 358 |
(assert_return (invoke "f") (f32.const +0x1.000006p+50)) |
| 359 |
(module (func (export "f") (result f32) (f32.const -0x1.00000500000000001p+50))) |
| 360 |
(assert_return (invoke "f") (f32.const -0x1.000006p+50)) |
| 361 |
|
| 362 |
(module (func (export "f") (result f32) (f32.const +0x4000004000000))) |
| 363 |
(assert_return (invoke "f") (f32.const +0x1.000000p+50)) |
| 364 |
(module (func (export "f") (result f32) (f32.const -0x4000004000000))) |
| 365 |
(assert_return (invoke "f") (f32.const -0x1.000000p+50)) |
| 366 |
(module (func (export "f") (result f32) (f32.const +0x4000004000001))) |
| 367 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 368 |
(module (func (export "f") (result f32) (f32.const -0x4000004000001))) |
| 369 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 370 |
(module (func (export "f") (result f32) (f32.const +0x4000007ffffff))) |
| 371 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 372 |
(module (func (export "f") (result f32) (f32.const -0x4000007ffffff))) |
| 373 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 374 |
(module (func (export "f") (result f32) (f32.const +0x4000008000000))) |
| 375 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 376 |
(module (func (export "f") (result f32) (f32.const -0x4000008000000))) |
| 377 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 378 |
(module (func (export "f") (result f32) (f32.const +0x4000008000001))) |
| 379 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 380 |
(module (func (export "f") (result f32) (f32.const -0x4000008000001))) |
| 381 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 382 |
(module (func (export "f") (result f32) (f32.const +0x400000bffffff))) |
| 383 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 384 |
(module (func (export "f") (result f32) (f32.const -0x400000bffffff))) |
| 385 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 386 |
(module (func (export "f") (result f32) (f32.const +0x400000c000000))) |
| 387 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 388 |
(module (func (export "f") (result f32) (f32.const -0x400000c000000))) |
| 389 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 390 |
|
| 391 |
(module (func (export "f") (result f32) (f32.const +1125899973951488))) |
| 392 |
(assert_return (invoke "f") (f32.const +0x1.000000p+50)) |
| 393 |
(module (func (export "f") (result f32) (f32.const -1125899973951488))) |
| 394 |
(assert_return (invoke "f") (f32.const -0x1.000000p+50)) |
| 395 |
(module (func (export "f") (result f32) (f32.const +1125899973951489))) |
| 396 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 397 |
(module (func (export "f") (result f32) (f32.const -1125899973951489))) |
| 398 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 399 |
(module (func (export "f") (result f32) (f32.const +1125900108169215))) |
| 400 |
(assert_return (invoke "f") (f32.const +0x1.000002p+50)) |
| 401 |
(module (func (export "f") (result f32) (f32.const -1125900108169215))) |
| 402 |
(assert_return (invoke "f") (f32.const -0x1.000002p+50)) |
| 403 |
(module (func (export "f") (result f32) (f32.const +1125900108169216))) |
| 404 |
(assert_return (invoke "f") (f32.const +0x1.000004p+50)) |
| 405 |
(module (func (export "f") (result f32) (f32.const -1125900108169216))) |
| 406 |
(assert_return (invoke "f") (f32.const -0x1.000004p+50)) |
| 407 |
|
| 408 |
;; f32, subnormal |
| 409 |
(module (func (export "f") (result f32) (f32.const +0x0.00000100000000000p-126))) |
| 410 |
(assert_return (invoke "f") (f32.const +0x0.000000p-126)) |
| 411 |
(module (func (export "f") (result f32) (f32.const -0x0.00000100000000000p-126))) |
| 412 |
(assert_return (invoke "f") (f32.const -0x0.000000p-126)) |
| 413 |
(module (func (export "f") (result f32) (f32.const +0x0.00000100000000001p-126))) |
| 414 |
(assert_return (invoke "f") (f32.const +0x0.000002p-126)) |
| 415 |
(module (func (export "f") (result f32) (f32.const -0x0.00000100000000001p-126))) |
| 416 |
(assert_return (invoke "f") (f32.const -0x0.000002p-126)) |
| 417 |
(module (func (export "f") (result f32) (f32.const +0x0.000001fffffffffffp-126))) |
| 418 |
(assert_return (invoke "f") (f32.const +0x0.000002p-126)) |
| 419 |
(module (func (export "f") (result f32) (f32.const -0x0.000001fffffffffffp-126))) |
| 420 |
(assert_return (invoke "f") (f32.const -0x0.000002p-126)) |
| 421 |
(module (func (export "f") (result f32) (f32.const +0x0.00000200000000000p-126))) |
| 422 |
(assert_return (invoke "f") (f32.const +0x0.000002p-126)) |
| 423 |
(module (func (export "f") (result f32) (f32.const -0x0.00000200000000000p-126))) |
| 424 |
(assert_return (invoke "f") (f32.const -0x0.000002p-126)) |
| 425 |
(module (func (export "f") (result f32) (f32.const +0x0.00000200000000001p-126))) |
| 426 |
(assert_return (invoke "f") (f32.const +0x0.000002p-126)) |
| 427 |
(module (func (export "f") (result f32) (f32.const -0x0.00000200000000001p-126))) |
| 428 |
(assert_return (invoke "f") (f32.const -0x0.000002p-126)) |
| 429 |
(module (func (export "f") (result f32) (f32.const +0x0.000002fffffffffffp-126))) |
| 430 |
(assert_return (invoke "f") (f32.const +0x0.000002p-126)) |
| 431 |
(module (func (export "f") (result f32) (f32.const -0x0.000002fffffffffffp-126))) |
| 432 |
(assert_return (invoke "f") (f32.const -0x0.000002p-126)) |
| 433 |
(module (func (export "f") (result f32) (f32.const +0x0.00000300000000000p-126))) |
| 434 |
(assert_return (invoke "f") (f32.const +0x0.000004p-126)) |
| 435 |
(module (func (export "f") (result f32) (f32.const -0x0.00000300000000000p-126))) |
| 436 |
(assert_return (invoke "f") (f32.const -0x0.000004p-126)) |
| 437 |
(module (func (export "f") (result f32) (f32.const +0x0.00000300000000001p-126))) |
| 438 |
(assert_return (invoke "f") (f32.const +0x0.000004p-126)) |
| 439 |
(module (func (export "f") (result f32) (f32.const -0x0.00000300000000001p-126))) |
| 440 |
(assert_return (invoke "f") (f32.const -0x0.000004p-126)) |
| 441 |
(module (func (export "f") (result f32) (f32.const +0x0.000003fffffffffffp-126))) |
| 442 |
(assert_return (invoke "f") (f32.const +0x0.000004p-126)) |
| 443 |
(module (func (export "f") (result f32) (f32.const -0x0.000003fffffffffffp-126))) |
| 444 |
(assert_return (invoke "f") (f32.const -0x0.000004p-126)) |
| 445 |
(module (func (export "f") (result f32) (f32.const +0x0.00000400000000000p-126))) |
| 446 |
(assert_return (invoke "f") (f32.const +0x0.000004p-126)) |
| 447 |
(module (func (export "f") (result f32) (f32.const -0x0.00000400000000000p-126))) |
| 448 |
(assert_return (invoke "f") (f32.const -0x0.000004p-126)) |
| 449 |
(module (func (export "f") (result f32) (f32.const +0x0.00000400000000001p-126))) |
| 450 |
(assert_return (invoke "f") (f32.const +0x0.000004p-126)) |
| 451 |
(module (func (export "f") (result f32) (f32.const -0x0.00000400000000001p-126))) |
| 452 |
(assert_return (invoke "f") (f32.const -0x0.000004p-126)) |
| 453 |
(module (func (export "f") (result f32) (f32.const +0x0.000004fffffffffffp-126))) |
| 454 |
(assert_return (invoke "f") (f32.const +0x0.000004p-126)) |
| 455 |
(module (func (export "f") (result f32) (f32.const -0x0.000004fffffffffffp-126))) |
| 456 |
(assert_return (invoke "f") (f32.const -0x0.000004p-126)) |
| 457 |
(module (func (export "f") (result f32) (f32.const +0x0.00000500000000000p-126))) |
| 458 |
(assert_return (invoke "f") (f32.const +0x0.000004p-126)) |
| 459 |
(module (func (export "f") (result f32) (f32.const -0x0.00000500000000000p-126))) |
| 460 |
(assert_return (invoke "f") (f32.const -0x0.000004p-126)) |
| 461 |
(module (func (export "f") (result f32) (f32.const +0x0.00000500000000001p-126))) |
| 462 |
(assert_return (invoke "f") (f32.const +0x0.000006p-126)) |
| 463 |
(module (func (export "f") (result f32) (f32.const -0x0.00000500000000001p-126))) |
| 464 |
(assert_return (invoke "f") (f32.const -0x0.000006p-126)) |
| 465 |
|
| 466 |
;; f32, round down at limit to infinity |
| 467 |
(module (func (export "f") (result f32) (f32.const +0x1.fffffe8p127))) |
| 468 |
(assert_return (invoke "f") (f32.const +0x1.fffffep127)) |
| 469 |
(module (func (export "f") (result f32) (f32.const -0x1.fffffe8p127))) |
| 470 |
(assert_return (invoke "f") (f32.const -0x1.fffffep127)) |
| 471 |
(module (func (export "f") (result f32) (f32.const +0x1.fffffefffffff8p127))) |
| 472 |
(assert_return (invoke "f") (f32.const +0x1.fffffep127)) |
| 473 |
(module (func (export "f") (result f32) (f32.const -0x1.fffffefffffff8p127))) |
| 474 |
(assert_return (invoke "f") (f32.const -0x1.fffffep127)) |
| 475 |
(module (func (export "f") (result f32) (f32.const +0x1.fffffefffffffffffp127))) |
| 476 |
(assert_return (invoke "f") (f32.const +0x1.fffffep127)) |
| 477 |
(module (func (export "f") (result f32) (f32.const -0x1.fffffefffffffffffp127))) |
| 478 |
(assert_return (invoke "f") (f32.const -0x1.fffffep127)) |
| 479 |
|
| 480 |
;; f64, small exponent |
| 481 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p-600))) |
| 482 |
(assert_return (invoke "f") (f64.const +0x1.0000000000000p-600)) |
| 483 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p-600))) |
| 484 |
(assert_return (invoke "f") (f64.const -0x1.0000000000000p-600)) |
| 485 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p-600))) |
| 486 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 487 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p-600))) |
| 488 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 489 |
(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp-600))) |
| 490 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 491 |
(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp-600))) |
| 492 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 493 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p-600))) |
| 494 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 495 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p-600))) |
| 496 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 497 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p-600))) |
| 498 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 499 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p-600))) |
| 500 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 501 |
(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp-600))) |
| 502 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 503 |
(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp-600))) |
| 504 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 505 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p-600))) |
| 506 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 507 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p-600))) |
| 508 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 509 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p-600))) |
| 510 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 511 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p-600))) |
| 512 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 513 |
(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp-600))) |
| 514 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 515 |
(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp-600))) |
| 516 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 517 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p-600))) |
| 518 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 519 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p-600))) |
| 520 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 521 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p-600))) |
| 522 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 523 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p-600))) |
| 524 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 525 |
(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp-600))) |
| 526 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 527 |
(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp-600))) |
| 528 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 529 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-600))) |
| 530 |
(assert_return (invoke "f") (f64.const +0x1.0000000000003p-600)) |
| 531 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-600))) |
| 532 |
(assert_return (invoke "f") (f64.const -0x1.0000000000003p-600)) |
| 533 |
|
| 534 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000000p-627))) |
| 535 |
(assert_return (invoke "f") (f64.const +0x1.0000000000000p-600)) |
| 536 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000000p-627))) |
| 537 |
(assert_return (invoke "f") (f64.const -0x1.0000000000000p-600)) |
| 538 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000001p-627))) |
| 539 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 540 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000001p-627))) |
| 541 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 542 |
(module (func (export "f") (result f64) (f64.const +0x8000000.0000007fffffffffffp-627))) |
| 543 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 544 |
(module (func (export "f") (result f64) (f64.const -0x8000000.0000007fffffffffffp-627))) |
| 545 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 546 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000000p-627))) |
| 547 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 548 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000000p-627))) |
| 549 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 550 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000001p-627))) |
| 551 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 552 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000001p-627))) |
| 553 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 554 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000bfffffffffffp-627))) |
| 555 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p-600)) |
| 556 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000bfffffffffffp-627))) |
| 557 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p-600)) |
| 558 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000000p-627))) |
| 559 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 560 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000000p-627))) |
| 561 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 562 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000001p-627))) |
| 563 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 564 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000001p-627))) |
| 565 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 566 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000000ffffffffffffp-627))) |
| 567 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 568 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000000ffffffffffffp-627))) |
| 569 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 570 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000000p-627))) |
| 571 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 572 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000000p-627))) |
| 573 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 574 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000001p-627))) |
| 575 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 576 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000001p-627))) |
| 577 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 578 |
(module (func (export "f") (result f64) (f64.const +0x8000000.0000013fffffffffffp-627))) |
| 579 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p-600)) |
| 580 |
(module (func (export "f") (result f64) (f64.const -0x8000000.0000013fffffffffffp-627))) |
| 581 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p-600)) |
| 582 |
(module (func (export "f") (result f64) (f64.const +0x8000000.000001400000000001p-627))) |
| 583 |
(assert_return (invoke "f") (f64.const +0x1.0000000000003p-600)) |
| 584 |
(module (func (export "f") (result f64) (f64.const -0x8000000.000001400000000001p-627))) |
| 585 |
(assert_return (invoke "f") (f64.const -0x1.0000000000003p-600)) |
| 586 |
|
| 587 |
(module (func (export "f") (result f64) (f64.const +5.3575430359313371995e+300))) |
| 588 |
(assert_return (invoke "f") (f64.const +0x1.0000000000000p+999)) |
| 589 |
(module (func (export "f") (result f64) (f64.const -5.3575430359313371995e+300))) |
| 590 |
(assert_return (invoke "f") (f64.const -0x1.0000000000000p+999)) |
| 591 |
(module (func (export "f") (result f64) (f64.const +5.3575430359313371996e+300))) |
| 592 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+999)) |
| 593 |
(module (func (export "f") (result f64) (f64.const -5.3575430359313371996e+300))) |
| 594 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+999)) |
| 595 |
(module (func (export "f") (result f64) (f64.const +5.3575430359313383891e+300))) |
| 596 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+999)) |
| 597 |
(module (func (export "f") (result f64) (f64.const -5.3575430359313383891e+300))) |
| 598 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+999)) |
| 599 |
(module (func (export "f") (result f64) (f64.const +5.3575430359313383892e+300))) |
| 600 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+999)) |
| 601 |
(module (func (export "f") (result f64) (f64.const -5.3575430359313383892e+300))) |
| 602 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+999)) |
| 603 |
|
| 604 |
;; f64, large exponent |
| 605 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p+600))) |
| 606 |
(assert_return (invoke "f") (f64.const +0x1.0000000000000p+600)) |
| 607 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p+600))) |
| 608 |
(assert_return (invoke "f") (f64.const -0x1.0000000000000p+600)) |
| 609 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p+600))) |
| 610 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+600)) |
| 611 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p+600))) |
| 612 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+600)) |
| 613 |
(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp+600))) |
| 614 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+600)) |
| 615 |
(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp+600))) |
| 616 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+600)) |
| 617 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p+600))) |
| 618 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+600)) |
| 619 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p+600))) |
| 620 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+600)) |
| 621 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p+600))) |
| 622 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+600)) |
| 623 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p+600))) |
| 624 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+600)) |
| 625 |
(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp+600))) |
| 626 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+600)) |
| 627 |
(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp+600))) |
| 628 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+600)) |
| 629 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p+600))) |
| 630 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+600)) |
| 631 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p+600))) |
| 632 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+600)) |
| 633 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p+600))) |
| 634 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+600)) |
| 635 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p+600))) |
| 636 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+600)) |
| 637 |
(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp+600))) |
| 638 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+600)) |
| 639 |
(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp+600))) |
| 640 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+600)) |
| 641 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p+600))) |
| 642 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+600)) |
| 643 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p+600))) |
| 644 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+600)) |
| 645 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p+600))) |
| 646 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+600)) |
| 647 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p+600))) |
| 648 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+600)) |
| 649 |
(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp+600))) |
| 650 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+600)) |
| 651 |
(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp+600))) |
| 652 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+600)) |
| 653 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000000p+600))) |
| 654 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+600)) |
| 655 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000000p+600))) |
| 656 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+600)) |
| 657 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p+600))) |
| 658 |
(assert_return (invoke "f") (f64.const +0x1.0000000000003p+600)) |
| 659 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p+600))) |
| 660 |
(assert_return (invoke "f") (f64.const -0x1.0000000000003p+600)) |
| 661 |
|
| 662 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000100000000000))) |
| 663 |
(assert_return (invoke "f") (f64.const +0x1.0000000000000p+97)) |
| 664 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000100000000000))) |
| 665 |
(assert_return (invoke "f") (f64.const -0x1.0000000000000p+97)) |
| 666 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000100000000001))) |
| 667 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+97)) |
| 668 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000100000000001))) |
| 669 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+97)) |
| 670 |
(module (func (export "f") (result f64) (f64.const +0x20000000000001fffffffffff))) |
| 671 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+97)) |
| 672 |
(module (func (export "f") (result f64) (f64.const -0x20000000000001fffffffffff))) |
| 673 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+97)) |
| 674 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000200000000000))) |
| 675 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+97)) |
| 676 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000200000000000))) |
| 677 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+97)) |
| 678 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000200000000001))) |
| 679 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+97)) |
| 680 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000200000000001))) |
| 681 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+97)) |
| 682 |
(module (func (export "f") (result f64) (f64.const +0x20000000000002fffffffffff))) |
| 683 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+97)) |
| 684 |
(module (func (export "f") (result f64) (f64.const -0x20000000000002fffffffffff))) |
| 685 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+97)) |
| 686 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000300000000000))) |
| 687 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+97)) |
| 688 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000300000000000))) |
| 689 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+97)) |
| 690 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000300000000001))) |
| 691 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+97)) |
| 692 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000300000000001))) |
| 693 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+97)) |
| 694 |
(module (func (export "f") (result f64) (f64.const +0x20000000000003fffffffffff))) |
| 695 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+97)) |
| 696 |
(module (func (export "f") (result f64) (f64.const -0x20000000000003fffffffffff))) |
| 697 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+97)) |
| 698 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000400000000000))) |
| 699 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+97)) |
| 700 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000400000000000))) |
| 701 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+97)) |
| 702 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000400000000001))) |
| 703 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+97)) |
| 704 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000400000000001))) |
| 705 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+97)) |
| 706 |
(module (func (export "f") (result f64) (f64.const +0x20000000000004fffffffffff))) |
| 707 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+97)) |
| 708 |
(module (func (export "f") (result f64) (f64.const -0x20000000000004fffffffffff))) |
| 709 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+97)) |
| 710 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000500000000000))) |
| 711 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+97)) |
| 712 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000500000000000))) |
| 713 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+97)) |
| 714 |
(module (func (export "f") (result f64) (f64.const +0x2000000000000500000000001))) |
| 715 |
(assert_return (invoke "f") (f64.const +0x1.0000000000003p+97)) |
| 716 |
(module (func (export "f") (result f64) (f64.const -0x2000000000000500000000001))) |
| 717 |
(assert_return (invoke "f") (f64.const -0x1.0000000000003p+97)) |
| 718 |
|
| 719 |
(module (func (export "f") (result f64) (f64.const +1152921504606847104))) |
| 720 |
(assert_return (invoke "f") (f64.const +0x1.0000000000000p+60)) |
| 721 |
(module (func (export "f") (result f64) (f64.const -1152921504606847104))) |
| 722 |
(assert_return (invoke "f") (f64.const -0x1.0000000000000p+60)) |
| 723 |
(module (func (export "f") (result f64) (f64.const +1152921504606847105))) |
| 724 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+60)) |
| 725 |
(module (func (export "f") (result f64) (f64.const -1152921504606847105))) |
| 726 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+60)) |
| 727 |
(module (func (export "f") (result f64) (f64.const +1152921504606847359))) |
| 728 |
(assert_return (invoke "f") (f64.const +0x1.0000000000001p+60)) |
| 729 |
(module (func (export "f") (result f64) (f64.const -1152921504606847359))) |
| 730 |
(assert_return (invoke "f") (f64.const -0x1.0000000000001p+60)) |
| 731 |
(module (func (export "f") (result f64) (f64.const +1152921504606847360))) |
| 732 |
(assert_return (invoke "f") (f64.const +0x1.0000000000002p+60)) |
| 733 |
(module (func (export "f") (result f64) (f64.const -1152921504606847360))) |
| 734 |
(assert_return (invoke "f") (f64.const -0x1.0000000000002p+60)) |
| 735 |
|
| 736 |
;; f64, subnormal |
| 737 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000080000000000p-1022))) |
| 738 |
(assert_return (invoke "f") (f64.const +0x0.0000000000000p-1022)) |
| 739 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000080000000000p-1022))) |
| 740 |
(assert_return (invoke "f") (f64.const -0x0.0000000000000p-1022)) |
| 741 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000080000000001p-1022))) |
| 742 |
(assert_return (invoke "f") (f64.const +0x0.0000000000001p-1022)) |
| 743 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000080000000001p-1022))) |
| 744 |
(assert_return (invoke "f") (f64.const -0x0.0000000000001p-1022)) |
| 745 |
(module (func (export "f") (result f64) (f64.const +0x0.0000000000000fffffffffffp-1022))) |
| 746 |
(assert_return (invoke "f") (f64.const +0x0.0000000000001p-1022)) |
| 747 |
(module (func (export "f") (result f64) (f64.const -0x0.0000000000000fffffffffffp-1022))) |
| 748 |
(assert_return (invoke "f") (f64.const -0x0.0000000000001p-1022)) |
| 749 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000100000000000p-1022))) |
| 750 |
(assert_return (invoke "f") (f64.const +0x0.0000000000001p-1022)) |
| 751 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000100000000000p-1022))) |
| 752 |
(assert_return (invoke "f") (f64.const -0x0.0000000000001p-1022)) |
| 753 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000100000000001p-1022))) |
| 754 |
(assert_return (invoke "f") (f64.const +0x0.0000000000001p-1022)) |
| 755 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000100000000001p-1022))) |
| 756 |
(assert_return (invoke "f") (f64.const -0x0.0000000000001p-1022)) |
| 757 |
(module (func (export "f") (result f64) (f64.const +0x0.00000000000017ffffffffffp-1022))) |
| 758 |
(assert_return (invoke "f") (f64.const +0x0.0000000000001p-1022)) |
| 759 |
(module (func (export "f") (result f64) (f64.const -0x0.00000000000017ffffffffffp-1022))) |
| 760 |
(assert_return (invoke "f") (f64.const -0x0.0000000000001p-1022)) |
| 761 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000180000000000p-1022))) |
| 762 |
(assert_return (invoke "f") (f64.const +0x0.0000000000002p-1022)) |
| 763 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000180000000000p-1022))) |
| 764 |
(assert_return (invoke "f") (f64.const -0x0.0000000000002p-1022)) |
| 765 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000180000000001p-1022))) |
| 766 |
(assert_return (invoke "f") (f64.const +0x0.0000000000002p-1022)) |
| 767 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000180000000001p-1022))) |
| 768 |
(assert_return (invoke "f") (f64.const -0x0.0000000000002p-1022)) |
| 769 |
(module (func (export "f") (result f64) (f64.const +0x0.0000000000001fffffffffffp-1022))) |
| 770 |
(assert_return (invoke "f") (f64.const +0x0.0000000000002p-1022)) |
| 771 |
(module (func (export "f") (result f64) (f64.const -0x0.0000000000001fffffffffffp-1022))) |
| 772 |
(assert_return (invoke "f") (f64.const -0x0.0000000000002p-1022)) |
| 773 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000200000000000p-1022))) |
| 774 |
(assert_return (invoke "f") (f64.const +0x0.0000000000002p-1022)) |
| 775 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000200000000000p-1022))) |
| 776 |
(assert_return (invoke "f") (f64.const -0x0.0000000000002p-1022)) |
| 777 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000200000000001p-1022))) |
| 778 |
(assert_return (invoke "f") (f64.const +0x0.0000000000002p-1022)) |
| 779 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000200000000001p-1022))) |
| 780 |
(assert_return (invoke "f") (f64.const -0x0.0000000000002p-1022)) |
| 781 |
(module (func (export "f") (result f64) (f64.const +0x0.00000000000027ffffffffffp-1022))) |
| 782 |
(assert_return (invoke "f") (f64.const +0x0.0000000000002p-1022)) |
| 783 |
(module (func (export "f") (result f64) (f64.const -0x0.00000000000027ffffffffffp-1022))) |
| 784 |
(assert_return (invoke "f") (f64.const -0x0.0000000000002p-1022)) |
| 785 |
(module (func (export "f") (result f64) (f64.const +0x0.000000000000280000000000p-1022))) |
| 786 |
(assert_return (invoke "f") (f64.const +0x0.0000000000002p-1022)) |
| 787 |
(module (func (export "f") (result f64) (f64.const -0x0.000000000000280000000000p-1022))) |
| 788 |
(assert_return (invoke "f") (f64.const -0x0.0000000000002p-1022)) |
| 789 |
(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-1022))) |
| 790 |
(assert_return (invoke "f") (f64.const +0x1.0000000000003p-1022)) |
| 791 |
(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-1022))) |
| 792 |
(assert_return (invoke "f") (f64.const -0x1.0000000000003p-1022)) |
| 793 |
|
| 794 |
;; f64, round down at limit to infinity |
| 795 |
(module (func (export "f") (result f64) (f64.const +0x1.fffffffffffff4p1023))) |
| 796 |
(assert_return (invoke "f") (f64.const +0x1.fffffffffffffp1023)) |
| 797 |
(module (func (export "f") (result f64) (f64.const -0x1.fffffffffffff4p1023))) |
| 798 |
(assert_return (invoke "f") (f64.const -0x1.fffffffffffffp1023)) |
| 799 |
(module (func (export "f") (result f64) (f64.const +0x1.fffffffffffff7ffffffp1023))) |
| 800 |
(assert_return (invoke "f") (f64.const +0x1.fffffffffffffp1023)) |
| 801 |
(module (func (export "f") (result f64) (f64.const -0x1.fffffffffffff7ffffffp1023))) |
| 802 |
(assert_return (invoke "f") (f64.const -0x1.fffffffffffffp1023)) |