Real life example fo Floating Point error -
is there examples of company burned floating point data caused rounding issue? we're implementing new system , monetary values stored in floats. think if can show actual examples of why has failed it'll have more weight theory of why values can't stored properly.
these examples embedded world (ariane 5, patriot) not floating-point rounding errors stricto sensu. ariane 5 bug bug in conversion. patriot bug introduced during adaptations of software. involves computations in different precisions inherently unrepresentable constant (which happens innocuous-looking 0.10).
there 2 problems foresee binary floats monetary values:
decimal values common 0.10 cannot represented exactly.
if precision small, have been clean overflow raising exception becomes hard-to-track loss of precision.
note base-10 floating-point formats have been standardized precisely monetary values: currencies worth 1/1000000 of dollar, never exchanged in less thousands, , maximum amount may want able represent proportionally big, scalable representation makes sense. intent mantissa large enough largest sums official resolution.
Comments
Post a Comment