Source Code : Calculating hyperbolic functions
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
Calculating hyperbolic functions
strictfp class HypFun {
public static void main(String[] args) {
double rads, degs, sinHA, cosHA, tanHA, asinHA;
// Obtain angle in degrees from user
degs = 20d;
// Convert degrees to radian
rads = Math.toRadians(degs);
// Calculate hyperbolic sine
sinHA = (Math.exp(rads) - Math.exp(-rads)) / 2;
System.out.println("Hyperbolic sine = " + sinHA);
// Calculate Hyperbolic cosine
cosHA = (Math.exp(rads) + Math.exp(-rads)) / 2;
System.out.println("Hyperbolic cosine = " + cosHA);
// Calculate hyperbolic tangent
tanHA = sinHA / cosHA;
System.out.println("Hyperbolic tangent = " + tanHA);
// Calculate hyperbolic arc-sine
asinHA = Math.log(sinHA + Math.sqrt((sinHA * sinHA) + 1.0));
degs = Math.toDegrees(asinHA);
System.out.println("Arc hyperbolic sine = " + degs);
}
}
Thank with us