Open In App

Python – math.asinh() function

Improve
Improve
Like Article
Like
Save
Share
Report

Math module contains a number of functions which is used for mathematical operations. The math.asinh() function returns the hyperbolic arc sine value of a number.

Syntax: math.asinh(x)

Parameter:This method accepts only single parameters.

  • x :This parameter is the value to be passed to asinh()

Returns:This function returns the hyperbolic arc sine value of a number.

Below examples illustrate the use of above function:

Example 1:




# Python code to implement
# the asinh()function
         
# importing "math"
# for mathematical operations  
import math  
         
# Return the hyperbolic arc sine value of numbers 
print (math.asinh(17))
print (math.asinh(5.6))
print (math.asinh(245))
print (math.asinh(-3445))


Output:

3.5272244561999657
2.4237920435875173
6.194409556009931
-8.837826385072708

Example 2:




# Python code to implement
# the aasinh()function
import math 
import matplotlib.pyplot as plt  
    
in_array = [-0.14159265, -0.57039399, -0.28559933
            0.28559933, 0.570393990.94159265
    
out_array = [] 
    
for i in range(len(in_array)): 
    out_array.append(math.asinh(in_array[i])) 
    i += 1
       
print("Input_Array : \n", in_array)  
print("\nOutput_Array : \n", out_array)   
  
plt.plot(in_array, out_array, "go:")  
plt.title("math.asinh()")  
plt.xlabel("X")  
plt.ylabel("Y")  
plt.show()  


Output:

Input_Array : 
 [-0.14159265, -0.57039399, -0.28559933, 0.28559933, 0.57039399, 0.94159265]

Output_Array : 
 [-0.14112374861052449, -0.5432727660031201, -0.28185270483975433, 0.28185270483975433, 0.5432727660031201, 0.8394645626112472]



Last Updated : 28 May, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads