DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   What is the code for exponent in java? (http://www.daniweb.com/forums/thread142323.html)

ocreds Aug 26th, 2008 3:10 am
What is the code for exponent in java?
 
In:

multiplication = var1 * var2
Division = var1 / var2

addition = var1 + var2
Subtraction = var1 - var2

exponentiation = ???

One more thing, how to read this one, isDigit?

Thanks in advance

javaAddict Aug 26th, 2008 3:50 am
Re: What is the code for exponent in java?
 
double a = Math.exp(b); //e^b

double c = Math.pow(a,b); //a^b

Go to this link: Math


All times are GMT -4. The time now is 6:16 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC