# Ruby – Find Inverse Hyperbolic Sine – asinh() Method with Examples

`asinh()` method can be used to find the inverse hyperbolic sine of the any given complex number in Ruby. `asinh()` method exists in `CMath` library of Ruby.

## `asinh()` Method in Ruby

`asinh()` method exists in Standard CMath Library of Ruby. The purpose of this method is to provide perfect inverse hyperbolic sine for the given complex number.

## Syntax of the `asinh()` Method in Ruby

Syntax of `asinh()` method is:

```cmath.asinh(x)
```

## Parameter of `asinh()` Method in Ruby

 Parameter Description `x` Any valid complex number. This parameter is required.

Note: If the `x` parameter is not a complex number, `asinh()` method will return an `error`.

## Return Value of `asinh()`

`asinh()` method will return the inverse hyperbolic sine of the given numeric complex number.

## Ruby – Get the `asinh()` of Given Numbers Example 1

```# import CMath library
require 'cmath'
x = CMath.asinh(1 + 1i)
puts x
```

Output

` 1.0612750619050357+0.6662394324925153i`

## Ruby – Get the `asinh()` of Given Numbers Example 2

``` # import CMath library
require 'cmath'
x = CMath.asinh(-1 + 1i)
puts x
```

Output

`-1.0612750619050355+0.6662394324925153i`

## Ruby – Non-Complex Number in `asinh()` Method Produces Error

``` # import CMath library
require 'cmath'
x = CMath.asinh(p1 + 0i)
puts x
```

Output

` Error`

## Ruby – Handle Negative Values in `asinh()` Method Example 1

``` # import CMath library
require 'cmath'
x = CMath.asinh(-5 - 5i)
puts x
```

Output

` -2.649196177806475-0.7803985799853912i`

## Ruby – Handle Negative Values in `asinh()` Method Example 2

``` # import CMath library
require 'cmath'
x = CMath.asinh(-5)
puts x
```

Output

` -2.312438341272753`