Hi,

the problem is the limited precision of 'double' operations, see

http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

The sum or product of two doubles can generally not be represented as a 
double, and therefore, rounding errors occur. A consequence of this is that 
the result of a summation can depend on the order in which the terms are 
added, and that's what happens in your example. The relative difference 
between the two results you expected to be equal is about 1e-16, and that's 
in the range of rounding errors you can expect for double operations.

Frank


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to