hadley wickham: > It's more than that as though, as floating point addition is no longer > guaranteed to be commutative or associative, and multiplication does > not distribute over addition. Many concepts that are clear cut in > pure math become fuzzy in floating point math - equality, singularity > of matrices etc etc.
Even simple averages may be complicated: eps=1 while(1-eps != 1) eps=eps/2 eps=eps*2 (1-1*eps+1-2*eps+1-3*eps)/3 == 1-1:3*eps # TRUE FALSE FALSE mean(1-1:3*eps) == 1-1:3*eps # FALSE TRUE FALSE sum(1-1:3*eps)/3 == 1-1:3*eps # FALSE FALSE TRUE ((1-1*eps)+(1-2*eps)+(1-3*eps))/3 == 1-1:3*eps # FALSE FALSE TRUE so sometimes all the values may lie on the same side of the "average". [Win R 2.6.1] Heikki Kaskelma Munkkiniemi, Finland ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel