Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -




Not registered yet?

  • Index
  •  » Help Me !
  •  » I need sine, cosine and tangent functions for C++ :-(

Post a reply

Go back

Write your message and submit
:) :| :( :D :o ;) :/ :P :lol: :mad: :rolleyes: :cool: | :dizzy :eek :kiss :roflol :rolleyes :shame :down :up :touched :sleep :wave :swear :tongue :what :faint :dunno

Go back

Topic review (newest first)

2005-10-05 11:23:55

Hey it works! Thanks again mathisfun! Are there functions for arcsin, arccos, and arctan?

2005-10-05 11:16:37

wow, sometimes please does work!

2005-10-05 10:56:58

Thats exactly what I'm looking for! :-D Thanks a yotta, Mathisfun!

2005-10-03 08:42:31

For performance I would use the standard include "math.h" - it has sin cos and tan.


#include <stdio.h>
#include <math.h>

#define PI 3.141592654

int main () {
  double angle;
  angle = 10;
  double ans;
  ans = sin (angle*PI/180);
  printf ("Ans = %lf ", ans );
  return 0;

Or did you need more accuracy or something?

2005-10-03 05:14:47


2005-10-01 13:14:25

I'm writing some awsome programs using math but I really really really need access to sine, cosine and tangent functions, also I really could use arcsin, arccos, and arctan, but arctangent the most since I need to convert from rectangular form to polar form and back.

Someone gave me a link to the formulas for sine, cosine and tangent, which was great and they appear to work, but they call a lot of factorials and very large numbers "270^5" :-O

If anyone knows where I can get a copy of the source code for functions for sine, cosine, tangent, arcsine, etc. so I can just copy the definition into my program and call on it when I need it. It would be a MAJOR help!

Board footer

Powered by FluxBB