• Jeff Gray (10/16/2007)


    I'm not pointing out anything other than the fact that the order in which the rows are added changes the result, thus suggesting that addition of floats is not associative. I'm precision agnostic, just trying to help Colin explain the results he is getting.

    I get different results every time I run the code.

    This will illustrate the point of ordering:

    SELECT 3E-16 + 3E-16 + 3E-16 + 1E1, 1E1 + 3E-16 + 3E-16 + 3E-16

    3 numbers of 3E-16 together get over the precision threshold for 1E1.

    But same numbers added to 1E1 one by one cannot change result - each of them is beyond the precision limit.

    _____________
    Code for TallyGenerator