X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP acos() Function

PHP Math Reference PHP Math Reference

Example

Return the arc cosine of different numbers:

<?php
echo(acos(0.64) . "<br>");
echo(acos(-0.4) . "<br>");
echo(acos(0) . "<br>");
echo(acos(-1) . "<br>");
echo(acos(1) . "<br>");
echo(acos(2));
?>

Run example »

Definition and Usage

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

Tip: acos(-1) returns the value of Pi.


Syntax

acos(number);

Parameter Description
number Required. Specifies a number in range -1 to 1

Technical Details

Return Value: The arc cosine of a number. Returns NAN if number is not in the range -1 to 1
Return Type: Float
PHP Version: 4+


PHP Math Reference PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook