Core C#

Hyperbolic Functions

This C# program demonstrates how to use the hyperbolic math functions in C#.

Program.cs

using System;

namespace XoaX {
    class Program {
        static void Main(string[] args) {
            double dT = .73;
            double dX = Math.Cosh(dT);
            double dY = Math.Sinh(dT);
            double dTanh = Math.Tanh(dT);
            Console.WriteLine("The Cosh of " + dT + " is " + dX);
            Console.WriteLine("The Sinh of " + dT + " is " + dY);
            Console.WriteLine("The Tanh of " + dT + " is " + dTanh);
        }
    }
}
 

Output

The Cosh of 0.73 is 1.27849479888216
The Sinh of 0.73 is 0.79658580879196
The Tanh of 0.73 is 0.623065349572361
Press any key to continue . . .
 
 

© 2007–2024 XoaX.net LLC. All rights reserved.