Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,907 questions

51,839 answers

573 users

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

1 Answer

0 votes
console.log("Math.cosh(-1) = " + Math.cosh(-1));
console.log("Math.cosh(1) = " + Math.cosh(1));
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(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(-1) = 1.5430806348152437
Math.cosh(1) = 1.5430806348152437
Math.cosh(0) = 1
Math.cosh(-0) = 1
Math.cosh(0.9) = 1.4330863854487745
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 2, 2016 by avibootz
edited Aug 11, 2024 by avibootz
...