likebike / fasteval

Fast and safe evaluation of algebraic expressions
https://crates.io/crates/fasteval/
MIT License
275 stars 27 forks source link

aaa_test_b0 test fails #16

Open keszybz opened 2 years ago

keszybz commented 2 years ago

I'm trying to build the crate, and one of the tests fail:

---- aaa_test_b0 stdout ----
thread 'aaa_test_b0' panicked at 'assertion failed: `(left == right)`
  left: `Ok(ExpressionI(0))`,
 right: `Err(ParseF64("4.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999"))`', tests/from_go.rs:65:5

The host system is Fedora 35 with rust-1.55.0-1.fc35.x86_64.

/cc @nabijaczleweli

nabijaczleweli commented 2 years ago

Norepro on bullseye with cargo 1.54.0 (5ae8d74b3 2021-06-22), but I can reproduce this on cargo 1.56.0 (4ed5d137b 2021-10-04).

The test in question has a comment saying "// Go can parse this, but not Rust:", so it seems that Rust can parse it now, too, since 1.55, and I think this can be attributed to https://github.com/rust-lang/rust/commit/8752b403695a8830913571f0fd5ebfcf1483db37#diff-670b46e2d44b92b0c2382d9a719b95785cf5797a9775254ea22449f0006608a8. Either way, this is a false negative.