I did not understand what Math.pow() was doing? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

I did not understand what Math.pow() was doing?

30th Jul 2017, 4:03 AM
Gilad Pinhas
Gilad Pinhas - avatar
3 Answers
+ 7
The java.lang.Math.pow(double a, double b) returns the value of the first argument raised to the power of the second argument. Special cases − If the second argument is positive or negative zero, then the result is 1.0. If the second argument is 1.0, then the result is the same as the first argument. example: In Math 2^8 = 2x2x2x2x2x2x2x2 =256 In Java Math.pow(2, 8)
30th Jul 2017, 4:06 AM
Art456
Art456 - avatar
+ 6
😊
30th Jul 2017, 4:11 AM
Art456
Art456 - avatar
0
Thanks
30th Jul 2017, 4:08 AM
Gilad Pinhas
Gilad Pinhas - avatar