The “pow” function doesn’t seem to work for me. If I pass “pow(2,2)”, it returns 2 not 4. The ULP error given for this function in the programming guide didn’t make sense to me either.
pow(x, y)
16 (for x outside interval 0.75 … 1.195; larger for x inside)
What was the mistake? I seem to be making it as well. Also, acos() seems to be giving me a negative number, which shouldn’t happen. I don’t think I’m doing anything stupid, but I probably am…
On a side note, it is recommended that you use powf() instead of pow(), or at least be careful to use 2.0f instead of 2, for the reasons invoked in 5.1.1.1 of the 1.0 programming guide.