- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
sin() function in PHP
The sin() function Returns the sine of a number.
Syntax
sin(num)
Parameters
num − The number for which you want to Return the sine. A value in radians.
Return
The sin() function Returns the arc sine of a number.
Example
<?php echo(sin(0.50) . "<br>"); echo(sin(-0.90) . "<br>"); ?>
Output
0.4794255386042<br>-0.78332690962748<br>
Example
Let us see another example −
<?php echo(sin(0) . "<br>"); echo(sin(1) . "<br>"); echo(sin(-1) . "<br>"); echo(sin(2) . "<br>"); ?>
Output
0<br>0.8414709848079<br>-0.8414709848079<br>0.90929742682568<br>
Advertisements