Javatpoint Logo
Javatpoint Logo

PHP sin() Function

PHP provides various important trigonometry functions. sin() is one of them. It is used to calculate trigonometry problem and returns the sine of the arg parameter. The arg parameter is in radians.

Syntax:

Parameter Description Required/Optional
number Specify value in radians Required

Example1

Output:

Your argument value is : 3*pi()/2
By using 'sin()' function your number is :-1

Example2

Output:

Your number is :3
By using 'sin()' function your number is :0.14112000805987

Example3

Output:

Your number is :-3
By using 'sin()' function your number is :-0.14112000805987

Example4

Output:

Your number is :0
By using 'sin()' function your number is :0

Example5

Output:

Your number is (M_PI) : 3.1415926535898
By using 'sin()' function your number is :1.2246467991474E-16

Example6

Output:

Your number is (M_PI_2) : 1.5707963267949
By using 'sin()' function your number is :1

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