On Thu, 25 May 2006, Robert Kern apparently wrote:
Let me clarify. Since you created your values by multiplying the floating-point approximation pi by an integer value. When you perform the operation % (2*pi) on those values, the result happens to be exact or nearly so but only because you used the same approximation of pi. Doing that operation on an arbitrary value (like 1000000) only introduces more error to the calculation. Floating-point sin(1000000.0) should return a value within eps (~2**-52) of the true, real-valued function sin(1000000). Calculating (1000000 % (2*pi)) introduces error in two places: the approximation pi and the operation %. A floating-point implementation of sin(.) will return a value within eps of the real sin(.) of the value that is the result of the floating-point operation (1000000 % (2*pi)), which already has some error accumulated.
I do not think that we have any disgreement here, except possibly over eps, which is not constant for different argument sizes. So I wondered if there was a tradeoff: smaller eps (from smaller argument) for the cost of computational error in an additional operation. Anyway, thanks for the feedback on this. Cheers, Alan