Skip to content

Instantly share code, notes, and snippets.

@kripken
Created October 21, 2016 22:20
Show Gist options
  • Save kripken/4edca3b9d3cc635dc23af4a72fb4f525 to your computer and use it in GitHub Desktop.
Save kripken/4edca3b9d3cc635dc23af4a72fb4f525 to your computer and use it in GitHub Desktop.
(module
(type $0 (func (result i32)))
(type $1 (func (result i64)))
(memory $0 0)
(export "f32.informally_known_as_plain_snan" (func $4))
(export "f32.all_ones_nan" (func $5))
(export "f32.nan" (func $0))
(export "f32.positive_nan" (func $1))
(export "f32.plain_nan" (func $3))
(export "f32.negative_nan" (func $2))
(export "f32.misc_nan" (func $6))
(export "f32.misc_positive_nan" (func $7))
(export "f32.misc_negative_nan" (func $8))
(export "f32.infinity" (func $9))
(export "f32.positive_infinity" (func $10))
(export "f32.negative_infinity" (func $11))
(export "f32.zero" (func $12))
(export "f32.positive_zero" (func $13))
(export "f32.negative_zero" (func $14))
(export "f32.misc" (func $15))
(export "f32.min_positive" (func $16))
(export "f32.min_normal" (func $17))
(export "f32.max_finite" (func $18))
(export "f32.max_subnormal" (func $19))
(export "f32.trailing_dot" (func $20))
(export "f32_dec.zero" (func $21))
(export "f32_dec.positive_zero" (func $22))
(export "f32_dec.negative_zero" (func $23))
(export "f32_dec.misc" (func $24))
(export "f32_dec.min_positive" (func $25))
(export "f32_dec.min_normal" (func $26))
(export "f32_dec.max_subnormal" (func $27))
(export "f32_dec.max_finite" (func $28))
(export "f32_dec.trailing_dot" (func $29))
(export "f64.nan" (func $30))
(export "f64.positive_nan" (func $31))
(export "f64.negative_nan" (func $32))
(export "f64.plain_nan" (func $33))
(export "f64.informally_known_as_plain_snan" (func $34))
(export "f64.all_ones_nan" (func $35))
(export "f64.misc_nan" (func $36))
(export "f64.misc_positive_nan" (func $37))
(export "f64.misc_negative_nan" (func $38))
(export "f64.infinity" (func $39))
(export "f64.positive_infinity" (func $40))
(export "f64.negative_infinity" (func $41))
(export "f64.zero" (func $42))
(export "f64.positive_zero" (func $43))
(export "f64.negative_zero" (func $44))
(export "f64.misc" (func $45))
(export "f64.min_positive" (func $46))
(export "f64.min_normal" (func $47))
(export "f64.max_subnormal" (func $48))
(export "f64.max_finite" (func $49))
(export "f64.trailing_dot" (func $50))
(export "f64_dec.zero" (func $51))
(export "f64_dec.positive_zero" (func $52))
(export "f64_dec.negative_zero" (func $53))
(export "f64_dec.misc" (func $54))
(export "f64_dec.min_positive" (func $55))
(export "f64_dec.min_normal" (func $56))
(export "f64_dec.max_subnormal" (func $57))
(export "f64_dec.max_finite" (func $58))
(export "f64_dec.trailing_dot" (func $59))
(func $0 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const nan:0x400000)
)
)
(func $1 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const nan:0x400000)
)
)
(func $2 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const -nan:0x400000)
)
)
(func $3 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const nan:0x400000)
)
)
(func $4 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const nan:0x600000)
)
)
(func $5 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const -nan:0x7fffff)
)
)
(func $6 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const nan:0x412345)
)
)
(func $7 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const nan:0x704050)
)
)
(func $8 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const -nan:0x6abcde)
)
)
(func $9 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const infinity)
)
)
(func $10 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const infinity)
)
)
(func $11 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const -infinity)
)
)
(func $12 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 0)
)
)
(func $13 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 0)
)
)
(func $14 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const -0)
)
)
(func $15 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 6.2831854820251465)
)
)
(func $16 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1.401298464324817e-45)
)
)
(func $17 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1.1754943508222875e-38)
)
)
(func $18 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 3402823466385288598117041e14)
)
)
(func $19 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1.1754942106924411e-38)
)
)
(func $20 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1024)
)
)
(func $21 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 0)
)
)
(func $22 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 0)
)
)
(func $23 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const -0)
)
)
(func $24 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 6.2831854820251465)
)
)
(func $25 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1.401298464324817e-45)
)
)
(func $26 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1.1754943508222875e-38)
)
)
(func $27 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1.1754942106924411e-38)
)
)
(func $28 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 3402823466385288598117041e14)
)
)
(func $29 (type $0) (result i32)
(i32.reinterpret/f32
(f32.const 1e10)
)
)
(func $30 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const nan:0x8000000000000)
)
)
(func $31 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const nan:0x8000000000000)
)
)
(func $32 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const -nan:0x8000000000000)
)
)
(func $33 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const nan:0x8000000000000)
)
)
(func $34 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const nan:0xc000000000000)
)
)
(func $35 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const -nan:0xfffffffffffff)
)
)
(func $36 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const nan:0x8123456789abc)
)
)
(func $37 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const nan:0xb040506070809)
)
)
(func $38 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const -nan:0xaabcdef012345)
)
)
(func $39 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const infinity)
)
)
(func $40 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const infinity)
)
)
(func $41 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const -infinity)
)
)
(func $42 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 0)
)
)
(func $43 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 0)
)
)
(func $44 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const -0)
)
)
(func $45 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 6.283185307179586)
)
)
(func $46 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 5e-324)
)
)
(func $47 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 2.2250738585072014e-308)
)
)
(func $48 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 2.225073858507201e-308)
)
)
(func $49 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 1797693134862315708145274e284)
)
)
(func $50 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 1267650600228229401496703e6)
)
)
(func $51 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 0)
)
)
(func $52 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 0)
)
)
(func $53 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const -0)
)
)
(func $54 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 6.283185307179586)
)
)
(func $55 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 5e-324)
)
)
(func $56 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 2.2250738585072014e-308)
)
)
(func $57 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 2.225073858507201e-308)
)
)
(func $58 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 1797693134862315708145274e284)
)
)
(func $59 (type $1) (result i64)
(i64.reinterpret/f64
(f64.const 1.e+100)
)
)
)
(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_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 "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_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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment