How to use the Math.cosh() function to get the hyperbolic cosine of a number in TypeScript

1 Answer

0 votes
console.log("Math.cosh(0) = " + Math.cosh(0));
console.log("Math.cosh(-0) = " + Math.cosh(-0));
console.log("Math.cosh(0.9) = " + Math.cosh(0.9));
console.log("Math.cosh(-1) = " + Math.cosh(-1));
console.log("Math.cosh(1) = " + Math.cosh(1));
console.log("Math.cosh(-2) = " + Math.cosh(-2));
console.log("Math.cosh(Math.PI) = " + Math.cosh(Math.PI));
console.log("Math.cosh(Math.PI * 2) = " + Math.cosh(Math.PI * 2));
console.log("Math.cosh(Math.PI / 2) = " + Math.cosh(Math.PI / 2));
console.log("Math.cosh(Math.PI / 3) = " + Math.cosh(Math.PI / 3));
 
 
  
/*
run
 
"Math.cosh(0) = 1" 
"Math.cosh(-0) = 1" 
"Math.cosh(0.9) = 1.4330863854487745" 
"Math.cosh(-1) = 1.5430806348152437" 
"Math.cosh(1) = 1.5430806348152437" 
"Math.cosh(-2) = 3.7621956910836314" 
"Math.cosh(Math.PI) = 11.591953275521519" 
"Math.cosh(Math.PI * 2) = 267.7467614837482" 
"Math.cosh(Math.PI / 2) = 2.5091784786580567" 
"Math.cosh(Math.PI / 3) = 1.600286857702386" 
  
*/

 



answered Aug 11, 2024 by avibootz
...