title: C# Math.Acos How prevent NaN
body: <p>I'm trying to make a code to answers a Math Function that includes Acos "Cos<sup>-1</sup>(A)", where A is a double -10.0000 &lt;= A &lt;= 10.0000, I had try several numbers in that range, and most of those give me a NaN as return that make all the operation Fails.</p>
  
  <p>Edited:
  As the documentation said, with Math.Acos is I put a number out of the range -1&lt;=d&lt;=1 will return a NaN, I were attempting to make a function that make the same, step by step to allow those values.</p>