- 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
MathF.Cosh() Method in C# with Examples
The MathF.Cosh() method in C# is used to return the hyperbolic cosine of a floating-point value.
Syntax
Following is the syntax −
public static float Cosh (float val);
Above, Val is the floating-point number.
Example
Let us now see an example to implement the MathF.Cosh() method −
using System; class Demo { public static void Main(){ float val = 45.0f; float res = MathF.Cosh(val); Console.WriteLine("Cosh = "+res); } }
Output
This will produce the following output −
Cosh = 1.746714E+19
Example
Let us now see another example to implement the MathF.Cosh() method −
using System; class Demo { public static void Main(){ float val = 90f; float res = MathF.Cosh(val); Console.WriteLine("Cosh = "+res); } }
Output
This will produce the following output −
Cosh = Infinity
Advertisements
To Continue Learning Please Login
Login with Google