Overflow panics on multiplication and exponentiation
Created by: xTibor
Reproduction:
use calc::eval;
// ...
println!("{:?}", eval("2 ** 63"));
println!("{:?}", eval("3040000000 * 3040000000"));
Expected behavior:
Getting a CalcError::WouldOverflow
result.
Actual behavior:
A panic with an 'attempt to multiply with overflow'
message.
Build information:
-
calc
: Latest version from crates.io (0.5.*
) -
rustc -V
:rustc 1.23.0-nightly (e340996ff 2017-11-02)
- System: KDE neon 5.11 (Ubuntu 16.04 LTS)
Misc: I encountered this issue via Ion's arithmetic expansions.