Javatpoint Logo
Javatpoint Logo

PHP tan() Function

The tan() function is trigonometry math function of PHP, which is used to calculate trigonometry problems. It returns the tangent of a number.

Syntax:

Parameter Description Required/Optional
number Specify a value in radian required

Example 1

Output:

Your number is M_PI_4 = 0.78539816339745
By using 'tan()' function your number is :1

Example 2

Output:

Your number is = 0.5
By using 'tan()' function your number is :0.54630248984379

Example 3

Output:

Your number is = -0.5
By using 'tan()' function your number is :-0.54630248984379

Example 4

Output:

Passing number is = 5
By using 'tan()' function your number is :-3.3805150062466

Example 5

Output:

Passing number is = 10
By using 'tan()' function your number is :0.64836082745909

Example 6

Output:

Passing number is = -5
By using 'tan()' function your number is :3.3805150062466

Example 7

Output:

Passing number is :0.5
By using 'tan()' function your number is :0.54630248984379

Example 8

Output:

Passing number is : 3*pi()/2
By using 'tan()' function your number is :5.4437464510651E+15

Next TopicPHP Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA