Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upf64 formatting panic with 'arithmetic operation overflowed' #23150
Comments
This comment has been minimized.
This comment has been minimized.
|
It also happens with 9.5 but not with 9.499. The formatting routine tries to round, but fails to handle the case that rounding extends the digits. |
steveklabnik
added
the
I-ICE
label
Mar 8, 2015
This comment has been minimized.
This comment has been minimized.
|
Just to clarify: this is not actually an ICE because the program is panicking, not the compiler. So, compilation is fine, but the program fails at runtime |
benashford
added a commit
to benashford/rust
that referenced
this issue
Apr 10, 2015
benashford
added a commit
to benashford/rust
that referenced
this issue
Apr 10, 2015
bors
added a commit
that referenced
this issue
Apr 11, 2015
Manishearth
added a commit
to Manishearth/rust
that referenced
this issue
Apr 11, 2015
bors
added a commit
that referenced
this issue
Apr 11, 2015
kwantam
added a commit
to kwantam/rust
that referenced
this issue
Apr 12, 2015
lifthrasiir
referenced this issue
Apr 20, 2015
Merged
New floating-to-decimal formatting routine #24612
This comment has been minimized.
This comment has been minimized.
|
This issue should be closed as it's now fixed. |
This comment has been minimized.
This comment has been minimized.
|
Yay! |
alexcrichton
closed this
Apr 20, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Gekkio commentedMar 7, 2015
Here's a minimal example which results in a runtime error:
I'd expect that format string to work (precision=0, so no digits after the decimal point), but here's what I get with RUST_BACKTRACE=1:
Ubuntu 14.10 / 64-bit
rustc 1.0.0-nightly (b0746ff 2015-03-05) (built 2015-03-06)
binary: rustc
commit-hash: b0746ff
commit-date: 2015-03-05
build-date: 2015-03-06
host: x86_64-unknown-linux-gnu
release: 1.0.0-nightly