-
Notifications
You must be signed in to change notification settings - Fork 57
/
float_literals.wast
547 lines (529 loc) · 23.1 KB
/
float_literals.wast
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
;; Test floating-point literal parsing.
(module
;; f32 special values
(func (export "f32.nan") (result i32) (i32.reinterpret_f32 (f32.const nan)))
(func (export "f32.positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan)))
(func (export "f32.negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan)))
(func (export "f32.plain_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x400000)))
(func (export "f32.informally_known_as_plain_snan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x200000)))
(func (export "f32.all_ones_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x7fffff)))
(func (export "f32.misc_nan") (result i32) (i32.reinterpret_f32 (f32.const nan:0x012345)))
(func (export "f32.misc_positive_nan") (result i32) (i32.reinterpret_f32 (f32.const +nan:0x304050)))
(func (export "f32.misc_negative_nan") (result i32) (i32.reinterpret_f32 (f32.const -nan:0x2abcde)))
(func (export "f32.infinity") (result i32) (i32.reinterpret_f32 (f32.const inf)))
(func (export "f32.positive_infinity") (result i32) (i32.reinterpret_f32 (f32.const +inf)))
(func (export "f32.negative_infinity") (result i32) (i32.reinterpret_f32 (f32.const -inf)))
;; f32 numbers
(func (export "f32.zero") (result i32) (i32.reinterpret_f32 (f32.const 0x0.0p0)))
(func (export "f32.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0x0.0p0)))
(func (export "f32.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0x0.0p0)))
(func (export "f32.misc") (result i32) (i32.reinterpret_f32 (f32.const 0x1.921fb6p+2)))
(func (export "f32.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-149)))
(func (export "f32.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 0x1p-126)))
(func (export "f32.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffep+127)))
(func (export "f32.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 0x1.fffffcp-127)))
(func (export "f32.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 0x1.p10)))
(func (export "f32.misc_int") (result i32) (i32.reinterpret_f32 (f32.const 0x12345)))
(func (export "f32.large_int") (result i32) (i32.reinterpret_f32 (f32.const 0x1_0000_0000_0000_0000_0000)))
(func (export "f32.min_int32") (result i32) (i32.reinterpret_f32 (f32.const -0x8000_0000)))
(func (export "f32.min_int64") (result i32) (i32.reinterpret_f32 (f32.const -0x8000_0000_0000_0000)))
;; f32 in decimal format
(func (export "f32_dec.zero") (result i32) (i32.reinterpret_f32 (f32.const 0.0e0)))
(func (export "f32_dec.positive_zero") (result i32) (i32.reinterpret_f32 (f32.const +0.0e0)))
(func (export "f32_dec.negative_zero") (result i32) (i32.reinterpret_f32 (f32.const -0.0e0)))
(func (export "f32_dec.misc") (result i32) (i32.reinterpret_f32 (f32.const 6.28318548202514648)))
(func (export "f32_dec.min_positive") (result i32) (i32.reinterpret_f32 (f32.const 1.4013e-45)))
(func (export "f32_dec.min_normal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754944e-38)))
(func (export "f32_dec.max_subnormal") (result i32) (i32.reinterpret_f32 (f32.const 1.1754942e-38)))
(func (export "f32_dec.max_finite") (result i32) (i32.reinterpret_f32 (f32.const 3.4028234e+38)))
(func (export "f32_dec.trailing_dot") (result i32) (i32.reinterpret_f32 (f32.const 1.e10)))
(func (export "f32_dec.misc_int") (result i32) (i32.reinterpret_f32 (f32.const 12345)))
(func (export "f32_dec.large_int") (result i32) (i32.reinterpret_f32 (f32.const 100_000_000_000_000_000_000)))
(func (export "f32_dec.min_int32") (result i32) (i32.reinterpret_f32 (f32.const -2147483648)))
(func (export "f32_dec.min_int64") (result i32) (i32.reinterpret_f32 (f32.const -9223372036854775808)))
;; https://twitter.com/Archivd/status/994637336506912768
(func (export "f32_dec.root_beer_float") (result i32) (i32.reinterpret_f32 (f32.const 1.000000119)))
;; f64 special values
(func (export "f64.nan") (result i64) (i64.reinterpret_f64 (f64.const nan)))
(func (export "f64.positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan)))
(func (export "f64.negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan)))
(func (export "f64.plain_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x8000000000000)))
(func (export "f64.informally_known_as_plain_snan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x4000000000000)))
(func (export "f64.all_ones_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0xfffffffffffff)))
(func (export "f64.misc_nan") (result i64) (i64.reinterpret_f64 (f64.const nan:0x0123456789abc)))
(func (export "f64.misc_positive_nan") (result i64) (i64.reinterpret_f64 (f64.const +nan:0x3040506070809)))
(func (export "f64.misc_negative_nan") (result i64) (i64.reinterpret_f64 (f64.const -nan:0x2abcdef012345)))
(func (export "f64.infinity") (result i64) (i64.reinterpret_f64 (f64.const inf)))
(func (export "f64.positive_infinity") (result i64) (i64.reinterpret_f64 (f64.const +inf)))
(func (export "f64.negative_infinity") (result i64) (i64.reinterpret_f64 (f64.const -inf)))
;; f64 numbers
(func (export "f64.zero") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0p0)))
(func (export "f64.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0x0.0p0)))
(func (export "f64.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0x0.0p0)))
(func (export "f64.misc") (result i64) (i64.reinterpret_f64 (f64.const 0x1.921fb54442d18p+2)))
(func (export "f64.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 0x0.0000000000001p-1022)))
(func (export "f64.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 0x1p-1022)))
(func (export "f64.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 0x0.fffffffffffffp-1022)))
(func (export "f64.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 0x1.fffffffffffffp+1023)))
(func (export "f64.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 0x1.p100)))
(func (export "f64.misc_int") (result i64) (i64.reinterpret_f64 (f64.const 0x12345)))
(func (export "f64.large_int") (result i64) (i64.reinterpret_f64 (f64.const 0x1_0000_0000_0000_0000_0000)))
(func (export "f64.min_int32") (result i64) (i64.reinterpret_f64 (f64.const -0x8000_0000)))
(func (export "f64.min_int64") (result i64) (i64.reinterpret_f64 (f64.const -0x8000_0000_0000_0000)))
;; f64 numbers in decimal format
(func (export "f64_dec.zero") (result i64) (i64.reinterpret_f64 (f64.const 0.0e0)))
(func (export "f64_dec.positive_zero") (result i64) (i64.reinterpret_f64 (f64.const +0.0e0)))
(func (export "f64_dec.negative_zero") (result i64) (i64.reinterpret_f64 (f64.const -0.0e0)))
(func (export "f64_dec.misc") (result i64) (i64.reinterpret_f64 (f64.const 6.28318530717958623)))
(func (export "f64_dec.min_positive") (result i64) (i64.reinterpret_f64 (f64.const 4.94066e-324)))
(func (export "f64_dec.min_normal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072012e-308)))
(func (export "f64_dec.max_subnormal") (result i64) (i64.reinterpret_f64 (f64.const 2.2250738585072011e-308)))
(func (export "f64_dec.max_finite") (result i64) (i64.reinterpret_f64 (f64.const 1.7976931348623157e+308)))
(func (export "f64_dec.trailing_dot") (result i64) (i64.reinterpret_f64 (f64.const 1.e100)))
(func (export "f64_dec.misc_int") (result i64) (i64.reinterpret_f64 (f64.const 12345)))
(func (export "f64_dec.large_int") (result i64) (i64.reinterpret_f64 (f64.const 100_000_000_000_000_000_000)))
(func (export "f64_dec.min_int32") (result i64) (i64.reinterpret_f64 (f64.const -2147483648)))
(func (export "f64_dec.min_int64") (result i64) (i64.reinterpret_f64 (f64.const -9223372036854775808)))
;; https://twitter.com/Archivd/status/994637336506912768
(func (export "f64_dec.root_beer_float") (result i64) (i64.reinterpret_f64 (f64.const 1.000000119)))
(func (export "f32-dec-sep1") (result f32) (f32.const 1_000_000))
(func (export "f32-dec-sep2") (result f32) (f32.const 1_0_0_0))
(func (export "f32-dec-sep3") (result f32) (f32.const 100_3.141_592))
(func (export "f32-dec-sep4") (result f32) (f32.const 99e+1_3))
(func (export "f32-dec-sep5") (result f32) (f32.const 122_000.11_3_54E0_2_3))
(func (export "f32-hex-sep1") (result f32) (f32.const 0xa_0f_00_99))
(func (export "f32-hex-sep2") (result f32) (f32.const 0x1_a_A_0_f))
(func (export "f32-hex-sep3") (result f32) (f32.const 0xa0_ff.f141_a59a))
(func (export "f32-hex-sep4") (result f32) (f32.const 0xf0P+1_3))
(func (export "f32-hex-sep5") (result f32) (f32.const 0x2a_f00a.1f_3_eep2_3))
(func (export "f64-dec-sep1") (result f64) (f64.const 1_000_000))
(func (export "f64-dec-sep2") (result f64) (f64.const 1_0_0_0))
(func (export "f64-dec-sep3") (result f64) (f64.const 100_3.141_592))
(func (export "f64-dec-sep4") (result f64) (f64.const 99e-1_23))
(func (export "f64-dec-sep5") (result f64) (f64.const 122_000.11_3_54e0_2_3))
(func (export "f64-hex-sep1") (result f64) (f64.const 0xa_f00f_0000_9999))
(func (export "f64-hex-sep2") (result f64) (f64.const 0x1_a_A_0_f))
(func (export "f64-hex-sep3") (result f64) (f64.const 0xa0_ff.f141_a59a))
(func (export "f64-hex-sep4") (result f64) (f64.const 0xf0P+1_3))
(func (export "f64-hex-sep5") (result f64) (f64.const 0x2a_f00a.1f_3_eep2_3))
)
(assert_return (invoke "f32.nan") (i32.const 0x7fc00000))
(assert_return (invoke "f32.positive_nan") (i32.const 0x7fc00000))
(assert_return (invoke "f32.negative_nan") (i32.const 0xffc00000))
(assert_return (invoke "f32.plain_nan") (i32.const 0x7fc00000))
(assert_return (invoke "f32.informally_known_as_plain_snan") (i32.const 0x7fa00000))
(assert_return (invoke "f32.all_ones_nan") (i32.const 0xffffffff))
(assert_return (invoke "f32.misc_nan") (i32.const 0x7f812345))
(assert_return (invoke "f32.misc_positive_nan") (i32.const 0x7fb04050))
(assert_return (invoke "f32.misc_negative_nan") (i32.const 0xffaabcde))
(assert_return (invoke "f32.infinity") (i32.const 0x7f800000))
(assert_return (invoke "f32.positive_infinity") (i32.const 0x7f800000))
(assert_return (invoke "f32.negative_infinity") (i32.const 0xff800000))
(assert_return (invoke "f32.zero") (i32.const 0))
(assert_return (invoke "f32.positive_zero") (i32.const 0))
(assert_return (invoke "f32.negative_zero") (i32.const 0x80000000))
(assert_return (invoke "f32.misc") (i32.const 0x40c90fdb))
(assert_return (invoke "f32.min_positive") (i32.const 1))
(assert_return (invoke "f32.min_normal") (i32.const 0x800000))
(assert_return (invoke "f32.max_subnormal") (i32.const 0x7fffff))
(assert_return (invoke "f32.max_finite") (i32.const 0x7f7fffff))
(assert_return (invoke "f32.trailing_dot") (i32.const 0x44800000))
(assert_return (invoke "f32.misc_int") (i32.const 0x4791a280))
(assert_return (invoke "f32.large_int") (i32.const 0x67800000))
(assert_return (invoke "f32.min_int32") (i32.const 0xcf000000))
(assert_return (invoke "f32.min_int64") (i32.const 0xdf000000))
(assert_return (invoke "f32_dec.zero") (i32.const 0))
(assert_return (invoke "f32_dec.positive_zero") (i32.const 0))
(assert_return (invoke "f32_dec.negative_zero") (i32.const 0x80000000))
(assert_return (invoke "f32_dec.misc") (i32.const 0x40c90fdb))
(assert_return (invoke "f32_dec.min_positive") (i32.const 1))
(assert_return (invoke "f32_dec.min_normal") (i32.const 0x800000))
(assert_return (invoke "f32_dec.max_subnormal") (i32.const 0x7fffff))
(assert_return (invoke "f32_dec.max_finite") (i32.const 0x7f7fffff))
(assert_return (invoke "f32_dec.trailing_dot") (i32.const 0x501502f9))
(assert_return (invoke "f32_dec.root_beer_float") (i32.const 0x3f800001))
(assert_return (invoke "f32_dec.misc_int") (i32.const 0x4640e400))
(assert_return (invoke "f32_dec.large_int") (i32.const 0x60ad78ec))
(assert_return (invoke "f32_dec.min_int32") (i32.const 0xcf000000))
(assert_return (invoke "f32_dec.min_int64") (i32.const 0xdf000000))
(assert_return (invoke "f64.nan") (i64.const 0x7ff8000000000000))
(assert_return (invoke "f64.positive_nan") (i64.const 0x7ff8000000000000))
(assert_return (invoke "f64.negative_nan") (i64.const 0xfff8000000000000))
(assert_return (invoke "f64.plain_nan") (i64.const 0x7ff8000000000000))
(assert_return (invoke "f64.informally_known_as_plain_snan") (i64.const 0x7ff4000000000000))
(assert_return (invoke "f64.all_ones_nan") (i64.const 0xffffffffffffffff))
(assert_return (invoke "f64.misc_nan") (i64.const 0x7ff0123456789abc))
(assert_return (invoke "f64.misc_positive_nan") (i64.const 0x7ff3040506070809))
(assert_return (invoke "f64.misc_negative_nan") (i64.const 0xfff2abcdef012345))
(assert_return (invoke "f64.infinity") (i64.const 0x7ff0000000000000))
(assert_return (invoke "f64.positive_infinity") (i64.const 0x7ff0000000000000))
(assert_return (invoke "f64.negative_infinity") (i64.const 0xfff0000000000000))
(assert_return (invoke "f64.zero") (i64.const 0))
(assert_return (invoke "f64.positive_zero") (i64.const 0))
(assert_return (invoke "f64.negative_zero") (i64.const 0x8000000000000000))
(assert_return (invoke "f64.misc") (i64.const 0x401921fb54442d18))
(assert_return (invoke "f64.min_positive") (i64.const 1))
(assert_return (invoke "f64.min_normal") (i64.const 0x10000000000000))
(assert_return (invoke "f64.max_subnormal") (i64.const 0xfffffffffffff))
(assert_return (invoke "f64.max_finite") (i64.const 0x7fefffffffffffff))
(assert_return (invoke "f64.trailing_dot") (i64.const 0x4630000000000000))
(assert_return (invoke "f64.misc_int") (i64.const 0x40f2345000000000))
(assert_return (invoke "f64.large_int") (i64.const 0x44f0000000000000))
(assert_return (invoke "f64.min_int32") (i64.const 0xc1e0000000000000))
(assert_return (invoke "f64.min_int64") (i64.const 0xc3e0000000000000))
(assert_return (invoke "f64_dec.zero") (i64.const 0))
(assert_return (invoke "f64_dec.positive_zero") (i64.const 0))
(assert_return (invoke "f64_dec.negative_zero") (i64.const 0x8000000000000000))
(assert_return (invoke "f64_dec.misc") (i64.const 0x401921fb54442d18))
(assert_return (invoke "f64_dec.min_positive") (i64.const 1))
(assert_return (invoke "f64_dec.min_normal") (i64.const 0x10000000000000))
(assert_return (invoke "f64_dec.max_subnormal") (i64.const 0xfffffffffffff))
(assert_return (invoke "f64_dec.max_finite") (i64.const 0x7fefffffffffffff))
(assert_return (invoke "f64_dec.trailing_dot") (i64.const 0x54b249ad2594c37d))
(assert_return (invoke "f64_dec.root_beer_float") (i64.const 0x3ff000001ff19e24))
(assert_return (invoke "f64_dec.misc_int") (i64.const 0x40c81c8000000000))
(assert_return (invoke "f64_dec.large_int") (i64.const 0x4415af1d78b58c40))
(assert_return (invoke "f64_dec.min_int32") (i64.const 0xc1e0000000000000))
(assert_return (invoke "f64_dec.min_int64") (i64.const 0xc3e0000000000000))
(assert_return (invoke "f32-dec-sep1") (f32.const 1000000))
(assert_return (invoke "f32-dec-sep2") (f32.const 1000))
(assert_return (invoke "f32-dec-sep3") (f32.const 1003.141592))
(assert_return (invoke "f32-dec-sep4") (f32.const 99e+13))
(assert_return (invoke "f32-dec-sep5") (f32.const 122000.11354e23))
(assert_return (invoke "f32-hex-sep1") (f32.const 0xa0f0099))
(assert_return (invoke "f32-hex-sep2") (f32.const 0x1aa0f))
(assert_return (invoke "f32-hex-sep3") (f32.const 0xa0ff.f141a59a))
(assert_return (invoke "f32-hex-sep4") (f32.const 0xf0P+13))
(assert_return (invoke "f32-hex-sep5") (f32.const 0x2af00a.1f3eep23))
(assert_return (invoke "f64-dec-sep1") (f64.const 1000000))
(assert_return (invoke "f64-dec-sep2") (f64.const 1000))
(assert_return (invoke "f64-dec-sep3") (f64.const 1003.141592))
(assert_return (invoke "f64-dec-sep4") (f64.const 99e-123))
(assert_return (invoke "f64-dec-sep5") (f64.const 122000.11354e23))
(assert_return (invoke "f64-hex-sep1") (f64.const 0xaf00f00009999))
(assert_return (invoke "f64-hex-sep2") (f64.const 0x1aa0f))
(assert_return (invoke "f64-hex-sep3") (f64.const 0xa0ff.f141a59a))
(assert_return (invoke "f64-hex-sep4") (f64.const 0xf0P+13))
(assert_return (invoke "f64-hex-sep5") (f64.const 0x2af00a.1f3eep23))
;; Test parsing a float from binary
(module binary
;; (func (export "4294967249") (result f64) (f64.const 4294967249))
"\00\61\73\6d\01\00\00\00\01\85\80\80\80\00\01\60"
"\00\01\7c\03\82\80\80\80\00\01\00\07\8e\80\80\80"
"\00\01\0a\34\32\39\34\39\36\37\32\34\39\00\00\0a"
"\91\80\80\80\00\01\8b\80\80\80\00\00\44\00\00\20"
"\fa\ff\ff\ef\41\0b"
)
(assert_return (invoke "4294967249") (f64.const 4294967249))
(assert_malformed
(module quote "(global f32 (f32.const _100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const +_100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const -_100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 99_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1__000))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const _1.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1.0_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1_.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1._0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const _1e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1e1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1_e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1e_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const _1.0e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1.0e1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1.0_e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1.0e_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1.0e+_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 1.0e_+1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const _0x100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0_x100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x_100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x00_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0xff__ffff))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x_1.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1.0_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1_.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1._0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x_1p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1p1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1_p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1p_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x_1.0p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1.0p1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1.0_p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1.0p_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1.0p+_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const 0x1.0p_+1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f32 (f32.const nan:0x80_0000))")
"constant out of range"
)
(assert_malformed
(module quote "(global f64 (f64.const _100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const +_100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const -_100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 99_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1__000))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const _1.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1.0_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1_.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1._0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const _1e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1e1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1_e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1e_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const _1.0e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1.0e1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1.0_e1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1.0e_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1.0e+_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 1.0e_+1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const _0x100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0_x100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x_100))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x00_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0xff__ffff))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x_1.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1.0_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1_.0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1._0))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x_1p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1p1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1_p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1p_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x_1.0p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1.0p1_))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1.0_p1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1.0p_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1.0p+_1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const 0x1.0p_+1))")
"unknown operator"
)
(assert_malformed
(module quote "(global f64 (f64.const nan:0x10_0000_0000_0000))")
"constant out of range"
)