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
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
|
/* Copyright 2021 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// ./test/core/float_literals.wast
// ./test/core/float_literals.wast:3
let $0 = instantiate(`(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)))
;; 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)))
;; 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)))
;; 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)))
;; 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))
)`);
// ./test/core/float_literals.wast:105
assert_return(() => invoke($0, `f32.nan`, []), [value("i32", 2143289344)]);
// ./test/core/float_literals.wast:106
assert_return(() => invoke($0, `f32.positive_nan`, []), [value("i32", 2143289344)]);
// ./test/core/float_literals.wast:107
assert_return(() => invoke($0, `f32.negative_nan`, []), [value("i32", -4194304)]);
// ./test/core/float_literals.wast:108
assert_return(() => invoke($0, `f32.plain_nan`, []), [value("i32", 2143289344)]);
// ./test/core/float_literals.wast:109
assert_return(() => invoke($0, `f32.informally_known_as_plain_snan`, []), [value("i32", 2141192192)]);
// ./test/core/float_literals.wast:110
assert_return(() => invoke($0, `f32.all_ones_nan`, []), [value("i32", -1)]);
// ./test/core/float_literals.wast:111
assert_return(() => invoke($0, `f32.misc_nan`, []), [value("i32", 2139169605)]);
// ./test/core/float_literals.wast:112
assert_return(() => invoke($0, `f32.misc_positive_nan`, []), [value("i32", 2142257232)]);
// ./test/core/float_literals.wast:113
assert_return(() => invoke($0, `f32.misc_negative_nan`, []), [value("i32", -5587746)]);
// ./test/core/float_literals.wast:114
assert_return(() => invoke($0, `f32.infinity`, []), [value("i32", 2139095040)]);
// ./test/core/float_literals.wast:115
assert_return(() => invoke($0, `f32.positive_infinity`, []), [value("i32", 2139095040)]);
// ./test/core/float_literals.wast:116
assert_return(() => invoke($0, `f32.negative_infinity`, []), [value("i32", -8388608)]);
// ./test/core/float_literals.wast:117
assert_return(() => invoke($0, `f32.zero`, []), [value("i32", 0)]);
// ./test/core/float_literals.wast:118
assert_return(() => invoke($0, `f32.positive_zero`, []), [value("i32", 0)]);
// ./test/core/float_literals.wast:119
assert_return(() => invoke($0, `f32.negative_zero`, []), [value("i32", -2147483648)]);
// ./test/core/float_literals.wast:120
assert_return(() => invoke($0, `f32.misc`, []), [value("i32", 1086918619)]);
// ./test/core/float_literals.wast:121
assert_return(() => invoke($0, `f32.min_positive`, []), [value("i32", 1)]);
// ./test/core/float_literals.wast:122
assert_return(() => invoke($0, `f32.min_normal`, []), [value("i32", 8388608)]);
// ./test/core/float_literals.wast:123
assert_return(() => invoke($0, `f32.max_subnormal`, []), [value("i32", 8388607)]);
// ./test/core/float_literals.wast:124
assert_return(() => invoke($0, `f32.max_finite`, []), [value("i32", 2139095039)]);
// ./test/core/float_literals.wast:125
assert_return(() => invoke($0, `f32.trailing_dot`, []), [value("i32", 1149239296)]);
// ./test/core/float_literals.wast:126
assert_return(() => invoke($0, `f32_dec.zero`, []), [value("i32", 0)]);
// ./test/core/float_literals.wast:127
assert_return(() => invoke($0, `f32_dec.positive_zero`, []), [value("i32", 0)]);
// ./test/core/float_literals.wast:128
assert_return(() => invoke($0, `f32_dec.negative_zero`, []), [value("i32", -2147483648)]);
// ./test/core/float_literals.wast:129
assert_return(() => invoke($0, `f32_dec.misc`, []), [value("i32", 1086918619)]);
// ./test/core/float_literals.wast:130
assert_return(() => invoke($0, `f32_dec.min_positive`, []), [value("i32", 1)]);
// ./test/core/float_literals.wast:131
assert_return(() => invoke($0, `f32_dec.min_normal`, []), [value("i32", 8388608)]);
// ./test/core/float_literals.wast:132
assert_return(() => invoke($0, `f32_dec.max_subnormal`, []), [value("i32", 8388607)]);
// ./test/core/float_literals.wast:133
assert_return(() => invoke($0, `f32_dec.max_finite`, []), [value("i32", 2139095039)]);
// ./test/core/float_literals.wast:134
assert_return(() => invoke($0, `f32_dec.trailing_dot`, []), [value("i32", 1343554297)]);
// ./test/core/float_literals.wast:135
assert_return(() => invoke($0, `f32_dec.root_beer_float`, []), [value("i32", 1065353217)]);
// ./test/core/float_literals.wast:137
assert_return(() => invoke($0, `f64.nan`, []), [value("i64", 9221120237041090560n)]);
// ./test/core/float_literals.wast:138
assert_return(() => invoke($0, `f64.positive_nan`, []), [value("i64", 9221120237041090560n)]);
// ./test/core/float_literals.wast:139
assert_return(() => invoke($0, `f64.negative_nan`, []), [value("i64", -2251799813685248n)]);
// ./test/core/float_literals.wast:140
assert_return(() => invoke($0, `f64.plain_nan`, []), [value("i64", 9221120237041090560n)]);
// ./test/core/float_literals.wast:141
assert_return(
() => invoke($0, `f64.informally_known_as_plain_snan`, []),
[value("i64", 9219994337134247936n)],
);
// ./test/core/float_literals.wast:142
assert_return(() => invoke($0, `f64.all_ones_nan`, []), [value("i64", -1n)]);
// ./test/core/float_literals.wast:143
assert_return(() => invoke($0, `f64.misc_nan`, []), [value("i64", 9218888453225749180n)]);
// ./test/core/float_literals.wast:144
assert_return(() => invoke($0, `f64.misc_positive_nan`, []), [value("i64", 9219717281780008969n)]);
// ./test/core/float_literals.wast:145
assert_return(() => invoke($0, `f64.misc_negative_nan`, []), [value("i64", -3751748707474619n)]);
// ./test/core/float_literals.wast:146
assert_return(() => invoke($0, `f64.infinity`, []), [value("i64", 9218868437227405312n)]);
// ./test/core/float_literals.wast:147
assert_return(() => invoke($0, `f64.positive_infinity`, []), [value("i64", 9218868437227405312n)]);
// ./test/core/float_literals.wast:148
assert_return(() => invoke($0, `f64.negative_infinity`, []), [value("i64", -4503599627370496n)]);
// ./test/core/float_literals.wast:149
assert_return(() => invoke($0, `f64.zero`, []), [value("i64", 0n)]);
// ./test/core/float_literals.wast:150
assert_return(() => invoke($0, `f64.positive_zero`, []), [value("i64", 0n)]);
// ./test/core/float_literals.wast:151
assert_return(() => invoke($0, `f64.negative_zero`, []), [value("i64", -9223372036854775808n)]);
// ./test/core/float_literals.wast:152
assert_return(() => invoke($0, `f64.misc`, []), [value("i64", 4618760256179416344n)]);
// ./test/core/float_literals.wast:153
assert_return(() => invoke($0, `f64.min_positive`, []), [value("i64", 1n)]);
// ./test/core/float_literals.wast:154
assert_return(() => invoke($0, `f64.min_normal`, []), [value("i64", 4503599627370496n)]);
// ./test/core/float_literals.wast:155
assert_return(() => invoke($0, `f64.max_subnormal`, []), [value("i64", 4503599627370495n)]);
// ./test/core/float_literals.wast:156
assert_return(() => invoke($0, `f64.max_finite`, []), [value("i64", 9218868437227405311n)]);
// ./test/core/float_literals.wast:157
assert_return(() => invoke($0, `f64.trailing_dot`, []), [value("i64", 5057542381537067008n)]);
// ./test/core/float_literals.wast:158
assert_return(() => invoke($0, `f64_dec.zero`, []), [value("i64", 0n)]);
// ./test/core/float_literals.wast:159
assert_return(() => invoke($0, `f64_dec.positive_zero`, []), [value("i64", 0n)]);
// ./test/core/float_literals.wast:160
assert_return(() => invoke($0, `f64_dec.negative_zero`, []), [value("i64", -9223372036854775808n)]);
// ./test/core/float_literals.wast:161
assert_return(() => invoke($0, `f64_dec.misc`, []), [value("i64", 4618760256179416344n)]);
// ./test/core/float_literals.wast:162
assert_return(() => invoke($0, `f64_dec.min_positive`, []), [value("i64", 1n)]);
// ./test/core/float_literals.wast:163
assert_return(() => invoke($0, `f64_dec.min_normal`, []), [value("i64", 4503599627370496n)]);
// ./test/core/float_literals.wast:164
assert_return(() => invoke($0, `f64_dec.max_subnormal`, []), [value("i64", 4503599627370495n)]);
// ./test/core/float_literals.wast:165
assert_return(() => invoke($0, `f64_dec.max_finite`, []), [value("i64", 9218868437227405311n)]);
// ./test/core/float_literals.wast:166
assert_return(() => invoke($0, `f64_dec.trailing_dot`, []), [value("i64", 6103021453049119613n)]);
// ./test/core/float_literals.wast:167
assert_return(() => invoke($0, `f64_dec.root_beer_float`, []), [value("i64", 4607182419335945764n)]);
// ./test/core/float_literals.wast:169
assert_return(() => invoke($0, `f32-dec-sep1`, []), [value("f32", 1000000)]);
// ./test/core/float_literals.wast:170
assert_return(() => invoke($0, `f32-dec-sep2`, []), [value("f32", 1000)]);
// ./test/core/float_literals.wast:171
assert_return(() => invoke($0, `f32-dec-sep3`, []), [value("f32", 1003.1416)]);
// ./test/core/float_literals.wast:172
assert_return(() => invoke($0, `f32-dec-sep4`, []), [value("f32", 990000000000000)]);
// ./test/core/float_literals.wast:173
assert_return(() => invoke($0, `f32-dec-sep5`, []), [value("f32", 12200012000000000000000000000)]);
// ./test/core/float_literals.wast:174
assert_return(() => invoke($0, `f32-hex-sep1`, []), [value("f32", 168755360)]);
// ./test/core/float_literals.wast:175
assert_return(() => invoke($0, `f32-hex-sep2`, []), [value("f32", 109071)]);
// ./test/core/float_literals.wast:176
assert_return(() => invoke($0, `f32-hex-sep3`, []), [value("f32", 41215.94)]);
// ./test/core/float_literals.wast:177
assert_return(() => invoke($0, `f32-hex-sep4`, []), [value("f32", 1966080)]);
// ./test/core/float_literals.wast:178
assert_return(() => invoke($0, `f32-hex-sep5`, []), [value("f32", 23605224000000)]);
// ./test/core/float_literals.wast:180
assert_return(() => invoke($0, `f64-dec-sep1`, []), [value("f64", 1000000)]);
// ./test/core/float_literals.wast:181
assert_return(() => invoke($0, `f64-dec-sep2`, []), [value("f64", 1000)]);
// ./test/core/float_literals.wast:182
assert_return(() => invoke($0, `f64-dec-sep3`, []), [value("f64", 1003.141592)]);
// ./test/core/float_literals.wast:183
assert_return(
() => invoke($0, `f64-dec-sep4`, []),
[
value("f64", 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000099),
],
);
// ./test/core/float_literals.wast:184
assert_return(() => invoke($0, `f64-dec-sep5`, []), [value("f64", 12200011354000000000000000000)]);
// ./test/core/float_literals.wast:185
assert_return(() => invoke($0, `f64-hex-sep1`, []), [value("f64", 3078696982321561)]);
// ./test/core/float_literals.wast:186
assert_return(() => invoke($0, `f64-hex-sep2`, []), [value("f64", 109071)]);
// ./test/core/float_literals.wast:187
assert_return(() => invoke($0, `f64-hex-sep3`, []), [value("f64", 41215.94240794191)]);
// ./test/core/float_literals.wast:188
assert_return(() => invoke($0, `f64-hex-sep4`, []), [value("f64", 1966080)]);
// ./test/core/float_literals.wast:189
assert_return(() => invoke($0, `f64-hex-sep5`, []), [value("f64", 23605225168752)]);
// ./test/core/float_literals.wast:192
let $1 = instantiate(`(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"
)`);
// ./test/core/float_literals.wast:201
assert_return(() => invoke($1, `4294967249`, []), [value("f64", 4294967249)]);
// ./test/core/float_literals.wast:203
assert_malformed(() => instantiate(`(global f32 (f32.const _100)) `), `unknown operator`);
// ./test/core/float_literals.wast:207
assert_malformed(() => instantiate(`(global f32 (f32.const +_100)) `), `unknown operator`);
// ./test/core/float_literals.wast:211
assert_malformed(() => instantiate(`(global f32 (f32.const -_100)) `), `unknown operator`);
// ./test/core/float_literals.wast:215
assert_malformed(() => instantiate(`(global f32 (f32.const 99_)) `), `unknown operator`);
// ./test/core/float_literals.wast:219
assert_malformed(
() => instantiate(`(global f32 (f32.const 1__000)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:223
assert_malformed(() => instantiate(`(global f32 (f32.const _1.0)) `), `unknown operator`);
// ./test/core/float_literals.wast:227
assert_malformed(() => instantiate(`(global f32 (f32.const 1.0_)) `), `unknown operator`);
// ./test/core/float_literals.wast:231
assert_malformed(() => instantiate(`(global f32 (f32.const 1_.0)) `), `unknown operator`);
// ./test/core/float_literals.wast:235
assert_malformed(() => instantiate(`(global f32 (f32.const 1._0)) `), `unknown operator`);
// ./test/core/float_literals.wast:239
assert_malformed(() => instantiate(`(global f32 (f32.const _1e1)) `), `unknown operator`);
// ./test/core/float_literals.wast:243
assert_malformed(() => instantiate(`(global f32 (f32.const 1e1_)) `), `unknown operator`);
// ./test/core/float_literals.wast:247
assert_malformed(() => instantiate(`(global f32 (f32.const 1_e1)) `), `unknown operator`);
// ./test/core/float_literals.wast:251
assert_malformed(() => instantiate(`(global f32 (f32.const 1e_1)) `), `unknown operator`);
// ./test/core/float_literals.wast:255
assert_malformed(
() => instantiate(`(global f32 (f32.const _1.0e1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:259
assert_malformed(
() => instantiate(`(global f32 (f32.const 1.0e1_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:263
assert_malformed(
() => instantiate(`(global f32 (f32.const 1.0_e1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:267
assert_malformed(
() => instantiate(`(global f32 (f32.const 1.0e_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:271
assert_malformed(
() => instantiate(`(global f32 (f32.const 1.0e+_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:275
assert_malformed(
() => instantiate(`(global f32 (f32.const 1.0e_+1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:279
assert_malformed(
() => instantiate(`(global f32 (f32.const _0x100)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:283
assert_malformed(
() => instantiate(`(global f32 (f32.const 0_x100)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:287
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x_100)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:291
assert_malformed(() => instantiate(`(global f32 (f32.const 0x00_)) `), `unknown operator`);
// ./test/core/float_literals.wast:295
assert_malformed(
() => instantiate(`(global f32 (f32.const 0xff__ffff)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:299
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x_1.0)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:303
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1.0_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:307
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1_.0)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:311
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1._0)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:315
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x_1p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:319
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1p1_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:323
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1_p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:327
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1p_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:331
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x_1.0p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:335
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1.0p1_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:339
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1.0_p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:343
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1.0p_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:347
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1.0p+_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:351
assert_malformed(
() => instantiate(`(global f32 (f32.const 0x1.0p_+1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:355
assert_malformed(
() => instantiate(`(global f32 (f32.const nan:0x80_0000)) `),
`constant out of range`,
);
// ./test/core/float_literals.wast:360
assert_malformed(() => instantiate(`(global f64 (f64.const _100)) `), `unknown operator`);
// ./test/core/float_literals.wast:364
assert_malformed(() => instantiate(`(global f64 (f64.const +_100)) `), `unknown operator`);
// ./test/core/float_literals.wast:368
assert_malformed(() => instantiate(`(global f64 (f64.const -_100)) `), `unknown operator`);
// ./test/core/float_literals.wast:372
assert_malformed(() => instantiate(`(global f64 (f64.const 99_)) `), `unknown operator`);
// ./test/core/float_literals.wast:376
assert_malformed(
() => instantiate(`(global f64 (f64.const 1__000)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:380
assert_malformed(() => instantiate(`(global f64 (f64.const _1.0)) `), `unknown operator`);
// ./test/core/float_literals.wast:384
assert_malformed(() => instantiate(`(global f64 (f64.const 1.0_)) `), `unknown operator`);
// ./test/core/float_literals.wast:388
assert_malformed(() => instantiate(`(global f64 (f64.const 1_.0)) `), `unknown operator`);
// ./test/core/float_literals.wast:392
assert_malformed(() => instantiate(`(global f64 (f64.const 1._0)) `), `unknown operator`);
// ./test/core/float_literals.wast:396
assert_malformed(() => instantiate(`(global f64 (f64.const _1e1)) `), `unknown operator`);
// ./test/core/float_literals.wast:400
assert_malformed(() => instantiate(`(global f64 (f64.const 1e1_)) `), `unknown operator`);
// ./test/core/float_literals.wast:404
assert_malformed(() => instantiate(`(global f64 (f64.const 1_e1)) `), `unknown operator`);
// ./test/core/float_literals.wast:408
assert_malformed(() => instantiate(`(global f64 (f64.const 1e_1)) `), `unknown operator`);
// ./test/core/float_literals.wast:412
assert_malformed(
() => instantiate(`(global f64 (f64.const _1.0e1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:416
assert_malformed(
() => instantiate(`(global f64 (f64.const 1.0e1_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:420
assert_malformed(
() => instantiate(`(global f64 (f64.const 1.0_e1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:424
assert_malformed(
() => instantiate(`(global f64 (f64.const 1.0e_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:428
assert_malformed(
() => instantiate(`(global f64 (f64.const 1.0e+_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:432
assert_malformed(
() => instantiate(`(global f64 (f64.const 1.0e_+1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:436
assert_malformed(
() => instantiate(`(global f64 (f64.const _0x100)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:440
assert_malformed(
() => instantiate(`(global f64 (f64.const 0_x100)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:444
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x_100)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:448
assert_malformed(() => instantiate(`(global f64 (f64.const 0x00_)) `), `unknown operator`);
// ./test/core/float_literals.wast:452
assert_malformed(
() => instantiate(`(global f64 (f64.const 0xff__ffff)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:456
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x_1.0)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:460
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1.0_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:464
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1_.0)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:468
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1._0)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:472
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x_1p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:476
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1p1_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:480
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1_p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:484
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1p_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:488
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x_1.0p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:492
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1.0p1_)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:496
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1.0_p1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:500
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1.0p_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:504
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1.0p+_1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:508
assert_malformed(
() => instantiate(`(global f64 (f64.const 0x1.0p_+1)) `),
`unknown operator`,
);
// ./test/core/float_literals.wast:512
assert_malformed(
() => instantiate(`(global f64 (f64.const nan:0x10_0000_0000_0000)) `),
`constant out of range`,
);
|