Math.tanh()
Math.tanh() returns the hyperbolic tangent value.
Syntax
Math.tanh(input)
Note that all outputs are in the range -1 and +1.
Here are some examples.
System.out.println(Math.tanh(100)); //1.0
System.out.println(Math.tanh(3)); //0.9950547536867305
System.out.println(Math.tanh(1.01)); //0.7657620182484389
System.out.println(Math.tanh(1)); // 0.7615941559557649
System.out.println(Math.tanh(0)); //0.0
System.out.println(Math.tanh(-1)); //-0.7615941559557649
System.out.println(Math.tanh(-3)); //-0.9950547536867305
System.out.println(Math.tanh(-100)); //-1.0
« All Math functions
This article is written by plus2net.com team.
plus2net.com