What is the code for exponent in java?

Reply

Join Date: Jul 2008
Posts: 5
Reputation: ocreds has a little shameless behaviour in the past 
Solved Threads: 0
ocreds ocreds is offline Offline
Newbie Poster

What is the code for exponent in java?

 
0
  #1
Aug 26th, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,634
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 222
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is online now Online
Posting Virtuoso

Re: What is the code for exponent in java?

 
0
  #2
Aug 26th, 2008
  1. double a = Math.exp(b); //e^b
  2.  
  3. double c = Math.pow(a,b); //a^b

Go to this link: Math
Last edited by javaAddict; Aug 26th, 2008 at 3:50 am.
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC