Compute Hyperbolic Tangent

Examples Filter
console.log(Math.tanh(-1));
// expected output: -0.7615941559557649

console.log(Math.tanh(0));
// expected output: 0

console.log(Math.tanh(Infinity));
// expected output: 1

console.log(Math.tanh(1));
// expected output: 0.7615941559557649

Math.tanh(0);        // 0
Math.tanh(Infinity); // 1
Math.tanh(1);        // 0.7615941559557649
package main

import (
	"fmt"
	"math"
)

func main() {
	fmt.Printf("%.2f", math.Tanh(0))
}
Last Run  :
0.00