You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while the precise answer would be FixedDecimal{Int64,4}(1.2321). During this computation, we materialize the result in full precision and then use _round_to_nearest to round to fix the FD type. It would be good to have the option to make such lossy operations throw an error by making the _round_to_nearest use RoundThrows rounding mode so that the user can be sure that their e.g. financial reports are exact. We already support RoundThrows for parsing.
Operations like
*
or\
can be lossy because they can cause the number of fractional digits to exceed the precision of the FD type, e.g.:while the precise answer would be
FixedDecimal{Int64,4}(1.2321)
. During this computation, we materialize the result in full precision and then use_round_to_nearest
to round to fix the FD type. It would be good to have the option to make such lossy operations throw an error by making the_round_to_nearest
useRoundThrows
rounding mode so that the user can be sure that their e.g. financial reports are exact. We already supportRoundThrows
for parsing.This could be a global toggle in the style of ToggleableAsserts.jl .
The text was updated successfully, but these errors were encountered: