PHP acos() Function Example

PHP acos() Function Example


Posted in : PHP Posted on : January 28, 2011 at 4:57 PM Comments : [ 0 ]

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 

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics