.


Divya

acos() Function in PHP with Example


The php acos() function returns the arc cosine of a number.

The aros() function is the inverse of the cosine function.

It returns NAN if number is not in the range -1 to 1.

always returns float number.

Example

<!DOCTYPE html>
<html>
<body>
<?php
echo(acos(0.1) . "<br>");
echo(acos(0.2) . "<br>");
echo(acos(0) . "<br>");
echo(acos(-1) . "<br>");
echo(acos(1) . "<br>");
echo(acos(1.5));
?>
</body>
</html>


.