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