wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v2/testdata/float_literals.wast (about)

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