Compute Inverse Hyperbolic Tangent
Examples
Filter
console.log(Math.atanh(-1));
// expected output: -Infinity
console.log(Math.atanh(0));
// expected output: 0
console.log(Math.atanh(0.5));
// expected output: 0.549306144334055 (approximately)
console.log(Math.atanh(1));
// expected output: Infinity
Math.atanh(-2); // NaN
Math.atanh(-1); // -Infinity
Math.atanh(0); // 0
Math.atanh(0.5); // 0.5493061443340548
Math.atanh(1); // Infinity
Math.atanh(2); // NaN
package main
import (
"fmt"
"math"
)
func main() {
fmt.Printf("%.2f", math.Atanh(0))
}