.Sinh()
The Math.Sinh()
class method returns the hyperbolic sine of a given angle.
Syntax
Math.Sinh(angle);
The Math.Sinh()
method takes only one parameter: an angle
in radians of type double
. The method returns the hyperbolic sine of the angle as a double
value, except if the value of angle
equals:
NaN
(not a number), then it returnsNaN
.NegativeInfinity
, then it returnsNegativeInfinity
.PositiveInfinity
, then it returnsPositiveInfinity
.
Note: Depending on the operating system or architecture, the exact result or the input range of the
Math.Sinh()
method may differ due to the differences in the C runtime environment.
Example
The following example first converts 88
degrees to radians, then uses the Math.Sinh()
method to return the hyperbolic sine of that angle. Math.Round()
rounds up the result to five decimals. Finally, the Console.WriteLine()
function prints the result to the console:
using System;public class Example {public static void Main(string[] args) {double degrees = 88;double radians = degrees * Math.PI/180;double hyperbolicSine = Math.Round(Math.Sinh(radians), 5);Console.WriteLine("The hyperbolic sine of " + degrees + " degrees is: " + hyperbolicSine);}}
The example will result in the following output:
The hyperbolic sine of 88 degrees is: 2.2151
Codebyte Example
The following example is runnable and returns the hyperbolic sine of the angle
given in degrees:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn C# on Codecademy
- Career path
Computer Science
Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!Includes 6 CoursesWith Professional CertificationBeginner Friendly75 hours - Free course
Learn C#
Learn Microsoft's popular C# programming language, used to make websites, mobile apps, video games, VR, and more.Beginner Friendly23 hours