- 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.Sinh() Method in C# with Examples
The MathF.Sinh() method in C# returns the hyperbolic sine of a floating-point argument.
Syntax
Following is the syntax −
public static float Sinh (float val);
Above, Val is the number whose hyperbolic sine is to be returned.
Example
Let us now see an example to implement the MathF.Sinh() method −
using System; public class Demo { public static void Main(){ float val1 = float.PositiveInfinity; float val2 = float.NegativeInfinity; float val3 = (20f * (MathF.PI)) / 180; Console.WriteLine("MathF.Sinh(val1) = "+MathF.Sinh(val1)); Console.WriteLine("MathF.Sinh(val2) = "+MathF.Sinh(val2)); Console.WriteLine("MathF.Sinh(val3) = "+MathF.Sinh(val3)); } }
Output
This will produce the following output −
MathF.Sinh(val1) = Infinity MathF.Sinh(val2) = -Infinity MathF.Sinh(val3) = 0.356198
Example
Let us now see another example to implement the MathF.Sinh() method −
using System; public class Demo { public static void Main(){ float val1 = 55f; float val2 = float.NaN; Console.WriteLine("MathF.Sinh(val1) = "+MathF.Sinh(val1)); Console.WriteLine("MathF.Sinh(val2) = "+MathF.Sinh(val2)); } }
Output
This will produce the following output −
MathF.Sinh(val1) = 3.847393E+23 MathF.Sinh(val2) = NaN
Advertisements