- Trending Categories
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
Get the hyperbolic sine of a given value in Java
In order to get the hyperbolic sine of a given value in Java,we use the java.lang.Math.sinh() method. The sinh() method accepts an argument in radians and returns the hyperbolic sine of the argument which acts as the angle.
Declaration − The java.lang.Math.sinh() is declared as follows −
public static double sinh(double x)
where x is the angle in radians.
Let us see a program to get the hyperbolic sine of a given value in Java.
Example
import java.lang.Math; public class Example { public static void main(String[] args) { // get two double numbers in degrees double x = 90; double y = 180; // convert them in radians x = Math.toRadians(x); y = Math.toRadians(y); // computing and displaying the hyperbolic sine of these doubles System.out.println("Hyperbolic sine of " + x + " = " + Math.sinh(x)); System.out.println("Hyperbolic sine of " + y + " = " + Math.sinh(y)); } }
Output
Hyperbolic sine of 1.5707963267948966 = 2.3012989023072947 Hyperbolic sine of 3.141592653589793 = 11.548739357257748
Advertisements