title: Are there any accurate trigonometric functions in C?
body: <p>I am working with some programming problems which require the use of trigonometric functions. Unfortunately, the functions in the <code>math.h</code> library seem to be inaccurate. Here is an example:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;math.h&gt;    
  int main() {
    double a, b, c, d;
    a = sin(0.0);
    b = sin(90.0);
    c = cos(0.0);
    d = cos(90.0);
    printf("A = %lf\nB = %lf\nC = %lf\nD = %lf\n", a, b, c, d);
    return (0);
  }
  </code></pre>
  
  <p>OUTPUT:</p>
  
  <pre><code>A = 0.000000
  B = 0.893997
  C = 1.000000
  D = -0.448074
  </code></pre>
  
  <p>So is there any way to make these functions accurate? Or do I have to make my own functions using series? </p>
  
  <p>I googled and so far could not find any way to make the functions accurate but using series.</p>