From: Alan G I. <ai...@am...> - 2006-05-25 20:17:42
|
On Thu, 25 May 2006, Robert Kern apparently wrote:=20 > What continuity? This is floating-point arithmetic.=20 Sure, but a continuity argument suggests (in the absence of=20 specific floating point reasons to doubt it) that a better=20 approximation at one point will mean better approximations=20 nearby. E.g., >>> epsilon =3D 0.00001 >>> sin(100*pi+epsilon) 9.999999976550551e-006 >>> sin((100*pi+epsilon)%(2*pi)) 9.9999999887966145e-006 Compare to the bc result of 9.9999999998333333e-006 bc 1.05 Copyright 1991, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. scale =3D 50 epsilon =3D 0.00001 s(100*pi + epsilon) .00000999999999983333333333416666666666468253968254 Cheers, Alan |