You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C integers are fixed-precision, and usually overflow at some value (often near $2^{31}$ or $2^{63}$, depending on your system). Python integers are variable-precision, so you can do computations that would overflow in other languages:
I don't think it's correct to use the term "precision" to describe integers. They are as precise as they can be in both C and python. A better way to phrase it would be something like this:
C integers are limited to a fixed range, and usually overflow at some value (often near $2^{31}$ or $2^{63}$, depending on your system). Python integers are not limited to any fixed range, but are only limited by the available memory, so you can do computations that would overflow in other languages:
The text was updated successfully, but these errors were encountered:
In my experience, "precision" is used in exactly this manner when talking about the bit representation of integers. As one example, take a look at the Wikipedia Article on Integers:
The width or precision of an integral type is the number of bits in its representation. An integral type with n bits can encode 2^n numbers
In 05-Built-in-Scalar-Types.ipynb it says:
I don't think it's correct to use the term "precision" to describe integers. They are as precise as they can be in both C and python. A better way to phrase it would be something like this:
C integers are limited to a fixed range, and usually overflow at some value (often near $2^{31}$ or $2^{63}$, depending on your system). Python integers are not limited to any fixed range, but are only limited by the available memory, so you can do computations that would overflow in other languages:
The text was updated successfully, but these errors were encountered: