PHP tan() Function Example

PHP tan() Function Example


Posted in : PHP Posted on : January 28, 2011 at 6:07 PM Comments : [ 0 ]

If you want to find out radian parameter value in tangent then use tan() function.

PHP tan() Function Example:

If you want to find out radian parameter value in tangent then use tan() function. The tan() function return the tangent of the radian parameter.

Syntax:

tan(x)

where x is required parameter to process in radians.

Example:

<?php
$return = tan(1);
echo "The value of tan(1) is : " . $return . "<br />";

$return_value1 = tan(1.5);
echo "The value of tan(1.5) is : " . $return_value1 . "<br />";


$return_value2 = tan(-1.5);
echo "The value of tan(-1.5) is : " . $return_value2;
?> 

After running this example the output is:

Output:

The value of tan(1) is : 1.5574077246549
The value of tan(1.5) is : 14.101419947172
The value of tan(-1.5) is : -14.101419947172 

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


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

 
Tutorial Topics