What is sinh() in R?

The sinh() function returns the hyperbolic sine of a number in radians.

The illustration below shows the mathematical representation of the sinh() function.

Mathematical representation of the hyperbolic sine function

Syntax

sinh(num)

Parameter

This function requires a number that represents an angle in radians as a parameter.

The following formula is used to convert degrees to radians.

radians = degrees * ( pi / 180.0 )

Return value

sinh() returns a number’s hyperbolic sine (in radians), which is sent as a parameter.

  • If the value of num is positive infinity, then the value returned is positive infinity.

  • If the value of num is negative infinity, then the value returned is negative infinity.

  • If the value of num is NaNnot a number, then the value returned is NaN.

Code

#Positive number in radians
a <- sinh(2.3);
print(paste0("sinh(2.3): ", a))
#negative number in radians
b <- sinh(-2.3);
print(paste0("sinh(-2.3): ", b))
#converting the degrees angle into radians and then applying sinh()
#degrees = 90
c <- sinh(90 * (pi / (180)));
print(paste0("sinh(90 * (pi / (180))): ", c))
#positive infinity
d <- sinh(Inf);
print(paste0("sinh(Inf): ", d))
#negative infinity
e <- sinh(-Inf);
print(paste0("sinh(-Inf): ", e))
## NAN
f <- sinh(NaN);
print(paste0("sinh(NaN): ", f))

Free Resources