0

why the operation print( 9**(1/2)**2 ) shows the output as 1.7... rather than 9.0

16th Sep 2020, 5:39 AM
srija Mukherjee
3 Answers
+ 7
Because exponential is measured from right to left not from left to right, so you start by (1/2)**2 = 1/4 then 9**(1/4)
16th Sep 2020, 5:42 AM
Ruba Kh
Ruba Kh - avatar
+ 4
remember exponentiation is right associative. therefore (1/2)**2 is 1/4 and 9**{1/4) approximately equals 1.7
16th Sep 2020, 6:16 AM
Rick Shiffman
Rick Shiffman - avatar
+ 2
i think you should use (9**(1/2*2)) for 9.0
16th Sep 2020, 8:16 AM
Divya Mohan
Divya Mohan - avatar