Movatterモバイル変換


[0]ホーム

URL:


Python Tutorial

Python cmath.asinh() Function



The Pythoncmath.asinh() function returns the inverse hyperbolic sine.

The inverse hyperbolic sine function is denoted as sinh-1(x), or this function is also called arcsinh(x). If the value of x is between -1 and 1, the inverse sine function will return the angle whose sin is equal to x.

This function has a restricted domain, i.e., from the range [-,+].

Syntax

Following is the basic syntax of the Pythoncmath.asinh() function −

cmath.asinh(x)

Parameters

This function accepts a domain in the range of [-,+], for which we need to find the inverse of the hyperbolic sine as a parameter.

Return Value

This function returns the inverse hyperbolic sine of the given number in the range of [-, +].

Example 1

In hyperbolic trigonometry, the sine of 0 is equal to 0. When we pass '0' as an argument to thecmath.asinh() function, it returns 0j as the output.(Inverse hyperbolic sine of 0 is 0).

import cmathx = 0result = cmath.asinh(x)print(result)

Output

The output obtained is as follows −

0j

Example 2

When we pass a fraction value to thecmath.asinh() function, then this returns a real number.

import cmathfrom fractions import Fractionx = Fraction(7, 9)result = cmath.asinh(x)print(result)

Output

When we run the above code, it produces the following result −

(0.71522142246197+0j)

Example 3

In the below example, we are passing a larger value, i.e., 1000 to thecmath.asinh() function.

import cmathx = 1000result = cmath.asinh(x)print(result)

Output

The result obtained is given below −

(7.600902709541988+0j)

Example 4

We are acquiring the inverse hyperbolic sine of a negative number by using thecmath.sinh() method.

import cmathx = -4.0result = cmath.asinh(x)print(result)

Output

Following is the output of the above code −

(-2.0947125472611012+0j
python_modules.htm
Print Page
Advertisements

[8]ページ先頭

©2009-2025 Movatter.jp