0 Members and 3 Guests are viewing this topic.
Good job! Do you think this can have applications in z80 programming (is it faster, more memory efficient, etc.)?
I think that if you really want speed, you should use a LUT for the sine function, calculate the cosine as sine+90°, and calculate the tangent as sine/cosine. This does require a bit of memory and isn't really related to math though.Related: I previously had no idea how the sine, cosine and tangent were actually calculated, and good job on simplifying it so much!EDIT: while the z80 will probably not be able to calculate that at high speed for use in games, I guess it might be usefull for CAS-related programs.
This is really cool! I found using ries that the constant is arctan(pi)/pi (if it turns out to be a constant, which seems to be the case).EDIT: that is probably not correct. I just saw that first and it had a tangent in it. Looking at the others, 4/(pi^2) looks like it could be promising. But those are all approximations anyway.
Wow this topic is really interesting!It's pretty funny that I'm reading this now, because it's Math-day at school today
Me: So I know this converges because I am basically using the ratio test of the Maclaurin Series for tangent, which I already know converges.Dr. B: Well Zeda, you know that the limit of the ratio test is inversely related to the radius of convergence, and you know that the radius of converges for tangent about 0 is pi/2 before it gets wonky.