Javascript Math acosh()

Introduction

The Math.acosh() function returns the hyperbolic arc-cosine of a number.

Math.acosh(x) // x is a number.

For values less than 1 Math.acosh() returns NaN.

Using Math.acosh()

let a = Math.acosh(-1);  // NaN
console.log(a);/*from w  ww.  ja v  a  2s  .c  o  m*/
a = Math.acosh(0);   // NaN
console.log(a);
a = Math.acosh(0.5); // NaN
console.log(a);
a = Math.acosh(1);   // 0
console.log(a);
a = Math.acosh(2);   // 1.3169578969248166
console.log(a);



PreviousNext

Related