Computing sin(x) in Basic

Thanks for this Ed. As the person who wrote the blog, it was frustrating that there was so little information available regarding ‘actual’ results. I looked and could not find any info as to why the results > 2PI were so bad.

Your post answers that question. I was using 5 terms in the series, so even with the ‘best’ precision on a real Z80 computer, -2PI to 2PI was the range where values were reasonable.

I will try some more playing with more terms (it’s just a constant in the program) and see what I get.

Meanwhile I continue to play with PL/I on the Z80. It’s amazing what decent compilers I can get for CP/M 2.2 with minimal effort compared to the digging I’ve had to do to get older compilers for ‘modern’ machines. As it is I can’t seem to find a working PL/I compiler (there is one, but all the zips are corrupted).

2 Likes