Thomas wrote:
> I was going for "easy to implement for beginning 
> programmers", not
> accuracy or speed/performance.

Easy to write but not easy to get right. :-)

There'll be problems if the beginner expects it to work for 
something like sin(100) -- argument in radians.

I got caught on exactly this with the very first program I 
ever wrote (in the 1960s, while a schoolboy). My sine 
function added consecutive terms of a Maclaurin series until 
a convergence test was satisfied. With x = 100 it took a 
suspiciously long time to run (remember computer time was 
very expensive in those days), then it spat out a result of 
about 10^33.

That was a very good learning experience: it taught me 
always to be suspicious when dealing with computers.

David

Reply via email to