Skip to content
Prev 255959 / 398506 Next

Decimal Accuracy Loss?

On Wed, Apr 06, 2011 at 11:33:48AM -0400, Brigid Mooney wrote:
Others already confirmed that casting a numeric as a matrix and back
again does not change the numbers. It is likely that the library
operator "%*%" is more accurate than a straightforward for loop.
For example, sum(x) uses a more accurate algorithm than iteration
of s <- s + x[i] in double precision.

Petr Savicky.