PHP: acos() function
Description
The acos() function returns the arc cosine of a number in radians.
Version:
(PHP 4 and above)
Syntax:
acos(number)
Parameter:
Name | Description | Required / Optional |
Type |
---|---|---|---|
number | Numeric value. | Required | Float |
Return value:
The arc cosine of a number.
Value Type: Float.
Example:
Sample Output:
Arc cosine of 0 is 1.5707963267949 Arc cosine of 0.4 is 1.1592794807274 Arc cosine of 1 is 0 Arc cosine of 2 is NAN
View the example in the browser
Pictorial Presentation :

See also