title: How is sine implemented in Java?
body: <p>Quick question about the sine function in Java. Does anyone know how the value is computed? <a href="https://stackoverflow.com/questions/17410559/why-does-math-sin-delegate-to-strictmath-sin">I found this question about sin in Java</a>, but that's asking why the sin function isn't wrapped in native code. I'm asking something entirely different. I want to know how the function was implemented. (Since it's wrapped in native code, I can't see it.)</p>
  
  <p>Did they simply implement it from the Taylor series expansion:</p>
  
  <pre><code>sin(x) = x - (x^3)/3! + (x^5)/5! - O(x^7)
  </code></pre>
  
  <p>I can't look at the code for the Math.sine() function, since it gets wrapped up in native code.</p>