+ 1

Powers for Math

How to add "power of" in codes?

17th Oct 2017, 1:27 AM
Uber Charge
Uber Charge - avatar
11 Réponses
+ 11
^ is xor operator which is binary operator If you don't know what xor is.You can know it later Oh well power right? float a = Math.pow(2,4);//2*2*2*2 = 16 float b = Math.pow(10,-2);//0.01 //You will receive problem from root //Since if second arg is double number //It will return "1" //Which is....Damn a lot float c = Math.pow(4,1/2);// 1 float d = Math.pow(9,1/3);// 1
17th Oct 2017, 1:38 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
17th Oct 2017, 2:17 AM
Apoorva Shenoy Nayak
Apoorva Shenoy Nayak - avatar
+ 6
@Gordie I think I already typed "root"
17th Oct 2017, 4:22 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 4
Ouchhhh Srry Maybe My brain is too blurry Lemme sleep Zzz
17th Oct 2017, 4:36 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 1
Would you use "^"
17th Oct 2017, 1:27 AM
Uber Charge
Uber Charge - avatar