The atanh()
function returns the inverse hyperbolic tangent of a number.
The equation below shows the mathematical representation of the atanh()
function:
Note:
std.math
is required for this function.
atanh(number)
//number can be real, float, or double.
This function requires a number as a parameter.
Note: The parameter should be between -1 and 1.
The atanh()
function returns the inverse hyperbolic tangent of a number that is sent as a parameter.
The code below shows the use of the atanh()
function in D.
import core.stdc.stdio;import std.stdio;//header required for functionimport std.math;int main() {//positive numberwriteln("The value of atanh(0.5) :", atanh(0.5));// negative numberwriteln("The value of atanh(-0.5) :", atanh(-0.5));//-1writeln("The value of atanh(-1.0): ",atanh(-1.0) );//1writeln("The value of atanh(1.0): ",atanh(1.0) );// >1writeln("The value of atanh(2.0): ",atanh(2.0) );// <-1writeln("The value of atanh(-2.0): ",atanh(-2.0) );return 0;}
std.math
header required for atanh()
function.atanh()
to calculate the inverse hyperbolic tangent of the positive number (-1< number <1).atanh()
to calculate the inverse hyperbolic tangent of the negative number (-1< number <1).atanh()
to calculate the inverse hyperbolic tangent of -1.atanh()
to calculate the inverse hyperbolic tangent of 1.atanh()
to calculate the inverse hyperbolic tangent of number>1.atanh()
to inverse the hyperbolic tangent of number<-1.