pi = ATN(1) * 4
incr = .0000001#
FOR y = incr / 2 TO pi / 2 STEP incr
t = t + SIN(y) * LOG(SIN(y))
PRINT t * incr
Successively changing the increment from .0001 to .0000001 by dividing by 10 each time produces
I have the feeling that the changeover from decreasing to increasing in the last instance is the result of more terms being added, and therefore producing lower, rather than higher, accuracy. On that basis, I'd limit the quoted value accuracy to -.3068528194....
UBASIC, with higher precision can be used:
36 if Y>#pi/2 then goto 50
50 print T*Incr
giving -0.306852819440061945, so I would feel safe with the accuracy of -0.30685281944.
Posted by Charlie
on 2009-05-19 12:28:29