Decimal::from_str("100000000000.000000000000000001") returns Ok. The value inside is 100000000000.00000000000000000: rust_decimal dropped the last wei to fit its 96-bit mantissa and raised no error. Call Decimal::from_str_exact on the same string and you get Err(Underflow). The pages ranking for "rust_decimal vs bigdecimal" mostly stop at "fixed-size and fast versus arbitrary precision", which is true and not enough to choose with.
Tom Wang
New York
反对科学主义;反对人类沙文主义
Get in touch with Tom
Contact Tom, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack