-
Notifications
You must be signed in to change notification settings - Fork 189
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
how to support precision of 38 decimal #562
Comments
You only get 28 digits of precision for this type because it is based on 96 bits. You cannot get more precision than 28. |
Hi @danhuiwang, As @schungx points out - this library only supports 28 digits of precision at present. When parsing a string it tries to round the value (safely) to fit into the provided format - which in this case drops the last two digits of precision. If you want to avoid this implicit rounding you can instead use A maximum scale of 28 is a hard limit of this library at present - it is something I'd like to investigate with version 2 of this library using const generics however this requires a few more nightly features to be stabilized first. If you need a library with a larger precision then I believe you can utilize Let me know if you have any further questions! |
If this comes out, it is likely to be as a new crate, at least initially. Closing this out for now. |
999995881114.744959800000000134 ,use decimal the result is 999995881114.7449598000000001
The text was updated successfully, but these errors were encountered: