-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
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
Parsing errors with a large number of fractional digits #461
Comments
Good news: this should be fixed in e.g. On assert_eq!(Decimal::from_str(".00000000000000000000000000001").unwrap().to_string(), "0.0000000000000000000000000000");
assert_eq!(Decimal::from_str(".10000000000000000000000000000").unwrap().to_string(), "0.1000000000000000000000000000"); Version |
Yes, my mistake. |
Perhaps I should open a new issue for this but is it intended that |
The generation of all of the extra |
This should now be formally resolved with the release of rust-decimal/tests/decimal_tests.rs Lines 2896 to 2897 in 6d4c894
|
Decimal.parse
gives incorrect results with some numbers with a large number of fractional digits.Here are some examples:
I think this has something to do with the absence of a 0 before the decimal point because when one is present this issue does not occur (as far as my testing has found).
The text was updated successfully, but these errors were encountered: