Hi,
I'd like help getting started writing my own routines to calculate sin and cos. But I really don't know where to begin..
This is what I know:
sin(x) = x (for very small x)
cos(x) = 1 (for very small x)
sin(x) = 2*sin(x/2)*cos(x/2)
cos(x) = (cos(x/2))^2 - (sin(x/2))^2 (where "^" means "power")
This is what I've done so far:
while (x >= 0.0001){ //first checks to see if x is really small
mysinx == 2*(x div 2) * mycosx(x/2);
}
while(x = 1){
mycos(x) == ((x/2))^2 - (mysinx(x/2))^2;
}
Thanks, Josh