0

Hello what happens if we evaluate the following code(1e1000)

2nd Jul 2017, 7:15 AM
Ganesh Gana
Ganesh Gana - avatar
4 odpowiedzi
+ 3
'inf' stand for infinity... meaning you're reaching the accuracy limit of floating point storage (exponential notation implicitly store number as float), but you can handle greater integer number with Python... to be conviced, try and play with this: a = 1 for i in range(1000): a = a * 10 print(a)
2nd Jul 2017, 8:26 AM
visph
visph - avatar
+ 2
what code
2nd Jul 2017, 7:26 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
i am getting output as inf
2nd Jul 2017, 7:27 AM
Ganesh Gana
Ganesh Gana - avatar
0
that means it is floating point code
2nd Jul 2017, 7:27 AM
Ganesh Gana
Ganesh Gana - avatar