Friday, May 25, 2012
Calculate the power of a number in Java
To calculate the result of "power of number" in Java, calling the method:
static double pow(double a, double b)
It returns the value of the first argument (a) raised to the power of the second argument (b).
Reference: java.lang.Math
PS. ^ operator in Java is Bitwise exclusive OR.
static double pow(double a, double b)
It returns the value of the first argument (a) raised to the power of the second argument (b).
Reference: java.lang.Math
PS. ^ operator in Java is Bitwise exclusive OR.
標籤:
fundamental.Java
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
[フレーム]