LZ: sin() errors


[Prev][Next][Index][Thread]

LZ: sin() errors



Although most of you probably already know about this phenomenon, I just
thought i'd like to ask for some clearing up on this. besides, it'll be a
nice respite from all the teleconferenceing stuff (;B


As I'm sure just about everyone here knows, the 85 gives very slightly
off-zero values for sin(n*pi), |n| >= 4. for example, sin(4pi) give 2E-13,
sin(12pi)=4E-13, etc. Interestingly, sin(100pi) gives 0, the correct
value.
So, i tried a little (probably not unique) experiment: I graphed y=sin(x)
with the following ranges:
xMin=0
xMax=126
ymin = -5E-12
yMax = 5E-12
So that delta x=1. I was shocked: for various intervals: the graph is
bloody near periodic. not only that, these 'error bars' are symmetrical
about the x-axis.
Could someone please tell me why the error is so regular? Am i correct in
guessing that the amplitude 'jumps' where it does because sin(n*pi) is
expecting more precice values of pi and still getting 12 places? Just some
food for thought (:B


-- neko the cat *meow*