Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
When precise computations are necessary, consider alternative representations that may be able to completely represent your values.  For example, if you are performing arithmetic on decimal values and need an exact decimal rounding, represent the values in binary-coded decimal instead of using floating point.  Another option is decimal floating-point arithmetic as specified by ANSI/IEEE 754-2007.  There is a draft document in WG14 \[[ISO/IEC TRDTR 24732|http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1290.pdfAA. C References#ISO/IEC DTR 24732]\] whichthat proposes adding support for decimal floating-point arithmetic to the C language.

Wiki Markup
When precise computation is necessary, carefully and methodically evaluate the cumulative error of the computations, regardless of whether decimal or binary is used, to ensure that the resulting error is within tolerances.  Consider using numerical analysis to properly understand the numerical properties of the problem.  A useful introduction can be found in \[[Goldberg 91|AA. C References#Goldberg 91]\].

Risk Analysis

Using a representation other than floating point may allow for more precision and accuracy for critical arithmetic.

...

Wiki Markup
\[[IEEE 754 2006|AA. C References#IEEE 754 2006]\]
\[[ISO/IEC JTC1/SC22/WG11|AA. C References#ISO/IEC JTC1/SC22/WG11]\]
\[[ISO/IEC PDTR 24772|AA. C References#ISO/IEC PDTR 24772]\] "PLF Floating Point Arithmetic"
\[[ISO/IEC TRDTR 24732|AA. C References#ISO/IEC TRDTR 24732]\] 
\[[Goldberg 91|AA. C References#Goldberg 91]\]

...