Using acos() function we are find the arc cosine value of arg in radians.
PHP acos() Function Example:
Using acos() function we are find the arc cosine value of arg in radians.
Syntax:acos(parameter)
The passing parameter require numeric value between -1 to 1. If parameter value is greater or less then the range then it return NAN value.
Example:
<?php echo (acos(-5)."<br />"); echo(acos(0) . "<br />"); echo(acos(-1) . "<br />"); echo(acos(1) . "<br />"); echo(acos(5)); ?>
Output:
The output of this example is:
NAN 1.5707963267949 3.1415926535898 0 NAN
[ 0 ] Comments