We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I updated float-cmp in librsvg and ran into this in the test suite. This only happens in debug mode.
fn main() { use float_cmp::ApproxEq; // -25.0 / 25.0 / 0.00390625 println!("{:?}", (-25.0f64).approx_eq(25.0, (0.00390625, 1))); }
thread 'main' panicked at 'attempt to negate with overflow', /builddir/build/BUILD/rustc-1.36.0-src/src/libcore/num/mod.rs:1972:21 stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::_print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: std::panicking::rust_panic_with_hook 5: std::panicking::continue_panic_fmt 6: rust_begin_unwind 7: core::panicking::panic_fmt 8: core::panicking::panic 9: core::num::<impl i64>::abs at /builddir/build/BUILD/rustc-1.36.0-src/src/libcore/num/mod.rs:1972 10: <f64 as float_cmp::eq::ApproxEq>::approx_eq at /root/.cargo/registry/src/github.aaakk.us.kg-1ecc6299db9ec823/float-cmp-0.5.1/src/eq.rs:230 11: bug_fl::main at src/main.rs:4 12: std::rt::lang_start::{{closure}} at /builddir/build/BUILD/rustc-1.36.0-src/src/libstd/rt.rs:64 13: std::panicking::try::do_call 14: __rust_maybe_catch_panic 15: std::rt::lang_start_internal 16: std::rt::lang_start at /builddir/build/BUILD/rustc-1.36.0-src/src/libstd/rt.rs:64 17: main 18: __libc_start_main 19: _start
The text was updated successfully, but these errors were encountered:
Nice catch of an edge case. I'll work out a fix shortly.
Sorry, something went wrong.
Solved nicely with rust-lang/rust#59983 but that is still on nightly.
Fix issue #20 with saturating_abs macros [to use std fns once stablized]
4544be1
348723a
Fixed in 0.5.2
No branches or pull requests
I updated float-cmp in librsvg and ran into this in the test suite. This only happens in debug mode.
The text was updated successfully, but these errors were encountered: