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,880 questions

51,806 answers

573 users

How to use the Math.exp1() function to get the base-e exponential raised to the power of argument x in JavaScript

1 Answer

0 votes
document.write("Math.expm1(-1) = " + Math.expm1(-1) + "<br />");
document.write("Math.expm1(1) = " + Math.expm1(1) + "<br />");
document.write("Math.expm1(0) = " + Math.expm1(0) + "<br />");
document.write("Math.expm1(-0) = " + Math.expm1(-0) + "<br />");
document.write("Math.expm1(100) = " + Math.expm1(100) + "<br />");
document.write("Math.expm1(710) = " + Math.expm1(710) + "<br />");
document.write("Math.expm1(Infinity) = " + Math.expm1(Infinity) + "<br />");
document.write("Math.expm1(-Infinity) = " + Math.expm1(-Infinity) + "<br />");

 
/*
run

Math.expm1(-1) = -0.6321205588285577
Math.expm1(1) = 1.718281828459045
Math.expm1(0) = 0
Math.expm1(-0) = 0
Math.expm1(100) = 2.6881171418161356e+43
Math.expm1(710) = Infinity
Math.expm1(Infinity) = Infinity
Math.expm1(-Infinity) = -1
 
*/

 



answered Aug 2, 2016 by avibootz
...