Implementation of the mathematical function J2ME (double, double)

I want the function of the mathematical function to double, can you use an algorithm for this?

I looked at Java ME open source sources - math , but I want to implement it from scratch.

Thank!

+3
source share
1 answer

I do not know J2ME well enough to know, but you have Math.log()and Math.exp()?

Then you can just use this relation:

x^y = exp(y * log(x))

If you do not have the above two functions, you should start by implementing them. As far as I know, the above relation is the only reasonable way to calculate x^y.


: , , , pow, . ! "" , exp() log().

+2

All Articles