

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
acos() function in PHP
The acos() function returns the arc cosine of a number. It specifies a number in the range -1 to 1. Returns NaN, if num is not in the range -1 to 1.
Syntax
acos(num)
Parameters
num − The number for which you want to return the arc cosine. A number in range -1 to 1.
Return
The acos() function returns the arc cosine of the specified number.
Return
s NaN, if number is not in the range -1 to 1.
Example
<?php echo(acos(0.50) . "<br>"); echo(acos(-0.90) . "<br>"); ?>
Output
1.0471975511966<br>2.6905658417935<br>
Let us see another example −
Example
<?php echo(acos(0) . "<br>"); echo(acos(1) . "<br>"); echo(acos(-1) . "<br>"); echo(acos(2) . "<br>"); ?>
Output
1.5707963267949<br>0<br>3.1415926535898<br>NAN<br>
- Related Questions & Answers
- PHP acos() Function
- acos() function in C++ STL
- acos() function for complex number in C++?
- file_exists() function in PHP
- basename( ) function in PHP
- chgrp()function in PHP
- chmod() function in PHP
- chown() function in PHP
- clearstatcache() function in PHP
- copy() function in PHP
- delete() function in PHP
- dirname()function in PHP
- disk_free_space() function in PHP
- disk_total_space() function in PHP
- diskfreespace() function in PHP
Advertisements