Closed MarkSwanson closed 2 years ago
Fyi fp64 has an accuracy ~= 16 digits after the decimal.
fpdec.rs uses an i128 to store the coefficient. This gives room for 38 decimal digits. 42 digits is definitely out of scope.
The original requirement is targeted at the quantities.rs crate. That crate can use different types for the numerical part of a quantity value, so maybe the solution could be another numerical type as optional dependency. Please see there.
Closing this as "will not implement".
I'd like to use this library with the 'quantities' crate to do some quantum mechanics work. Planck's constant is 6.62607015 × 10−34 , so I'd like about 42 digits of precision.
Is forking this library the only way to increase the precision? (Fork and adjust the MAX_N_FRAC_DIGITS constant defined here: fpdec-core/src/lib.rs)
Thanks!