Python / Go / Java number overflow | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Python / Go / Java number overflow

Hi!!! Why is Python the unique language with capabilities of resolve all digits even without using decimal.Decimal? I know that in Java I should use BigInteger and in Go the package "math/big". https://code.sololearn.com/cAgTQvZmnHhD/?ref=app https://code.sololearn.com/cPtWHU9t8rpe/?ref=app https://code.sololearn.com/codvl5JIZrty/?ref=app

10th Jul 2021, 6:52 PM
David Ordás
David Ordás - avatar
3 Answers
+ 1
Its beacuse of inmutable technic that python used to define numbers and base on it automaticly analyse input numbers as str and base on allocate memory to it
11th Jul 2021, 11:35 PM
S.Hossein Motaharpour
S.Hossein Motaharpour - avatar
+ 1
To see how it exacly work see int and fioat type in cpython and jython
12th Jul 2021, 11:56 AM
S.Hossein Motaharpour
S.Hossein Motaharpour - avatar
0
S.Hossein Motaharpour thanks for response. I don't know it. I also was working on the Big-Endian version for Java and Go languages. https://code.sololearn.com/cea4uUuAD0ck/?ref=app https://code.sololearn.com/cKOUyfv0Ikw5/?ref=app Where can I look for more info about you say?
12th Jul 2021, 2:51 AM
David Ordás
David Ordás - avatar