moonbitlang / core

MoonBit's Core library
https://moonbitlang.com/
Apache License 2.0
464 stars 54 forks source link

`Math.tan(NaN)` panics #587

Closed tonyfettes closed 2 days ago

tonyfettes commented 1 week ago
fn main {
  @math.tan(Double::nan()) |> ignore
}

Error message:

RuntimeError: float unrepresentable in integer range
    at wasm://wasm/7b452aca:wasm-function[5]:0x230
    at wasm://wasm/7b452aca:wasm-function[24]:0x6a6
    at <anonymous>:17:22