how do you get the sin() function in math.h to return the answers in DEGREES!!!!!!!!!!!
i HATE Radians
please!
Printable View
how do you get the sin() function in math.h to return the answers in DEGREES!!!!!!!!!!!
i HATE Radians
please!
what i mean is, can i do it without doing sin(angle*pi/180) because i am trying to approximate pi.
You can't.
Most computer stuff will return radians because they're simpler and more logical to calculate.
If you want to approximate pi, then you can do things like atan(1) or something like that...
grrrr....i have just realised how stupid this question was. i guess the closest i can get to PI is 3.031.
I took the area of a hexagon enscribed in a circle with a radius of 1. then i took the area of a hexagon with a circle enscribed in it with a radius of 1. i averaged the areas together, and poof!
oh well, it was a good idea while it lasted :(
Thanks for the help parksie. i have actually just figured out that to get it in degrees, all you have to do is sin(angle*(pi/180)). but, unfortunatly that won't work because my program doens't know what pi is yet. go figure :rolleyes:Quote:
Originally posted by parksie
You can't.
Most computer stuff will return radians because they're simpler and more logical to calculate.
If you want to approximate pi, then you can do things like atan(1) or something like that...
pi to 800 digits.
Yes, this is what it looks like....PHP Code:int a=10000,b,c=2800,d,e,f[2801],g;
main(){
for(;b-c;)f[b++]=a/5;
for(;d=0,g=c*2;c-=14,printf("%.4d",e+d/a),e=d%a)for(b=c;d+=f[b]*a,
f[b]=d%--g,d/=g--,--b;d*=b);
}
hmmmm....i don't think vbulletin liked the code ;)
what metod is that anyway? obviously some type of series i guess. Hmmmm.. thanks though.
when i run the code i get a wierd memory reference error?
wooooaaah! This BB drives me nuts. You, know I looked at it when I posted it...I don't remember all that asp stuff in there.
oh well.
Here it is posted in regular text
I give up. (edit)
Anyway, it adds smilies and it actually changed some of the text
Grrrr.
heh, thanks for trying. i think i got it, but for next time, i think you can click an option under where you type your reply that says "Disable Smilies in This Post".
I still don't know why i get that memory error? :confused: