PHP math acos() functionThe acos() function is useful predefined PHP function to calculate trigonometry problem. It is used to find the arc cosine of a number in radians. Note: acos(-1) returns the value of Pi.Syntax:
Example1Output: Your number is :0 By using 'acos()' function your number is :1.5707963267949 Example2Output: Your number is :1 By using 'acos()' function your number is :0 Example3Output: Your number is :2 By using 'acos()' function your number is :NAN Note : Your number is outside the range [-1,1] Example4Output: Your number is :0.64 By using 'acos()' function your number is :0.87629806116834 Example5Output: Your number is :-0.4 By using 'acos()' function your number is :1.9823131728624 Example6Output: Your number is :-1 By using 'acos()' function your number is :3.1415926535898
Next TopicPHP Math
|