Why does this code outputs "inf" ? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

Why does this code outputs "inf" ?

print(1.20892582E24*1.20892582E24*1.20892582E24*1.20892582E24*1.20892582E24*1.20892582E24*1.20892582E24**10) output: inf

5th Oct 2022, 8:09 AM
Shantanu
Shantanu - avatar
2 Réponses
+ 6
"inf" is "Infinity" - an infinitely long number.
5th Oct 2022, 10:46 AM
Solo
Solo - avatar
+ 1
Maybe because it's a very large number...
5th Oct 2022, 9:58 AM
Ausgrindtube
Ausgrindtube - avatar