You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior: a crash report on division by zero, like you get for integer divide by zero.
(This can't return something like infinity or NaN because it's a Dec, not a float, and Dec's fixed-point representation is based on integers; it doesn't have an equivalent concept.)
The text was updated successfully, but these errors were encountered:
Looks like there is a difference for this on the local vs web repl
If you run the dev repl locally i see
The rockin' roc repl
────────────────────────
Enter an expression, or :help, or :q to quit.
» 1/0
thread 'main' panicked at 'not yet implemented: NumDiv: layout, Builtin(Decimal)', crates/compiler/gen_dev/src/generic64/mod.rs:1603:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
building the site of off main and using the repl there was the original issue mentioned.
I will work on a fix for both cases EDIT: looks like dec division in the dev generator is not supported entirely at the moment.
Will make sure the wasm generator at least will panic in this case
To reproduce, in the repl:
Expected behavior: a crash report on division by zero, like you get for integer divide by zero.
(This can't return something like infinity or NaN because it's a
Dec
, not a float, andDec
's fixed-point representation is based on integers; it doesn't have an equivalent concept.)The text was updated successfully, but these errors were encountered: