tags:

views:

113

answers:

3

Hi,

I cant find any pre defined function in blackberry JDE to implement Math.pow(). Can anyone please suggest how to power the values that are retrieved from the Edit text fields(Like X^Y value)...

+2  A: 

What about net.rim.device.api.util.MathUtilities.pow ( double double ).

Alex K.
A: 

You don't need to implement your own. Check out

net.rim.device.api.util.MathUtilities.pow ( double double ) 
fmark
Can u tell me how to implement this???float fSecondFactor=(float) (Math.pow(1+fRatePerMonth,fNumberofMonths)-1);
Rahul Varma
A: 

for what it's worth, i also came across this limitation at one point- (keeping a single library to be used in both j2me AND blackBerry) and there's a decent discussion at http://today.java.net/pub/a/today/2007/11/06/creating-java-me-math-pow-method.html which should help you. i've used this code and it's worked for me

bryanallott