Ruby | Math atanh() function Last Updated : 07 Jan, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report The atanh() is an inbuilt function in Ruby returns the inverse hyperbolic tangent of an angle given in radians. It accepts values in the range [-1, +1] and returns in the range [-INFINITY, INFINITY]. Syntax: Math.atanh(value) Parameters: The function accepts one mandatory parameter value which specifies the inverse hyperbolic angle in radian which lies in the range [-1, 1]. Return Value: It returns the inverse hyperbolic tangent of an angle given in radians Example 1: CPP #Ruby program for atanh() function #Assigning values val1 = -1 val2 = 1 val3 = -0.5 val4 = 0.7 #Prints the atanh() value puts Math.atanh(val1) puts Math.atanh(val2) puts Math.atanh(val3) puts Math.atanh(val4) Output: -Infinity Infinity -0.5493061443340548 0.8673005276940531 Example 2: CPP #Ruby program for atanh() function #Assigning values val1 = -0.7 val2 = 0.6 val3 = -0.56 val4 = 0.90 #Prints the atanh() value puts Math.atanh(val1) puts Math.atanh(val2) puts Math.atanh(val3) puts Math.atanh(val4) Output: -0.8673005276940531 0.6931471805599453 -0.632833186665638 1.4722194895832204 Reference: https://devdocs.io/ruby~2.5/math#method-c-atanh Comment More infoAdvertise with us Next Article Ruby | Math atanh() function G gopaldave Follow Improve Article Tags : Ruby Ruby-Methods Ruby Collections Ruby Math-class Similar Reads Ruby | Math atan() function The atan() is an inbuilt function in Ruby returns the arc tangent of a number means give a tangent value to this function it will return the angle in radian corresponding to that value. arc tangent is the inverse operation of tangent. This function accepts all numbers in range [-inf, +inf]. Syntax: 1 min read Ruby | Math atan2() function The atan2() is an inbuilt function in Ruby returns angent inverse of (y/x), where y is the proportion of the y-coordinate and x is the proportion of the x-coordinate. The numeric value lies between âpi and +pi representing the angle theta of a (x, y) point and positive x-axis. It is the counterclock 1 min read Ruby | Math asinh() function The asinh() is an inbuilt function in Ruby returns the inverse hyperbolic sine of an angle given in radians. It accepts all values between range (-INFINITY, INFINITY). Syntax: Math.asinh(value) Parameters: The function accepts one mandatory parameter value which specifies the inverse hyperbolic ang 1 min read Ruby | Math asin() function The asin() is an inbuilt function in Ruby returns the arc sine of a number means give a sin value to this function it will return the angle in radian corresponding to that value. The value passed is in between -1 and +1. Syntax: Math.asin(value) Parameters: The function accepts one mandatory param 1 min read Ruby | Math acosh() function The acosh() is an inbuilt function in Ruby returns the inverse hyperbolic cosine of an angle given in radians. Syntax: Math.acosh(value) Parameters: The function accepts one mandatory parameter value which specifies the inverse hyperbolic angle in radian which should be greater or equal to 1. If the 1 min read Like