Hello, while making a pretty complex algebraic script in PHP, I encountered something strange.
Output is:Code:$tx = -.8; $r = sqrt(1.0 - $tx * $tx); var_dump($r); echo asin(.6 / $r) . " | "; $r = .6; var_dump($r); echo asin(.6 / $r);
float(0.6) NAN | float(0.6) 1.5707963267949
The operation is the same, the value of $r is the same, so why does asin give NAN in the first case?
It's annoying because I can't fix it.. does anyone have any ideas?