

- 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
tanh() function in PHP
The tanh() function returns the hyperbolic tangent of the specified value.
Syntax
tanh(val)
Parameters
val − A value in radians
Return
The tanh() function returns the hyperbolic tangent of the specified value val.
Example
The following is an example to get the hyperbolic tangent of 0 and 1:
<?php echo(tanh(0) . "<br>"); echo(tanh(1) . "<br>"); ?>
Output
0<br>0.76159415595576<br>
Example
Let us see an example to get the hyperbolic tangent of constant M_PI_4 −
<?php echo(tanh(M_PI_4)); ?>
Output
0.65579420263267
Example
Let us see an example to get the hyperbolic tangent of values 0.50 and -0.50 −
<?php echo(tanh(0.50) . "<br>"); echo(tanh(-0.50)); ?>
Output
0.46211715726001<br>-0.46211715726001
Example
Let us see another example to get the hyperbolic tangent of negative values −
<?php echo(tanh(-5) . "<br>"); echo(tanh(-10)); ?>
Output
-0.9999092042626<br>-0.99999999587769
- Related Questions & Answers
- PHP tanh() Function
- tanh() function in C++ STL
- tanh( ) 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