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
Numbers landing page to explain generic issues around:
Hardware limitations
A Python int can be much bigger than what is known as 64 bit int and why NUM13 does not apply
Python relation to primitive int numpy ctypes
implicit conversion can come unexpected
explicit conversion can have unexpected results.
Upper boundaries
Lower boundaries.
Content that is helpful for understanding numbers or above points and applicable for all numeric related issues such as Avoid loss of precision when converting primitive integers to floating-point
Pythons array module is the closest thing to primitive types mentioned in the Java or C rules such as unsigned or signed int, float, long or char. The array module should be at least mentioned together with numpy and ctypes.
myteron
changed the title
pySCG: Numbers related landing page to explain generic issues
pySCG: Numbers related landing page to explain generic issues, such as array with ctypes and numpy
May 8, 2025
Uh oh!
There was an error while loading. Please reload this page.
Numbers landing page to explain generic issues around:
Content that is helpful for understanding numbers or above points and applicable for all numeric related issues such as
Avoid loss of precision when converting primitive integers to floating-point
Pythons array module is the closest thing to primitive types mentioned in the Java or
C
rules such as unsigned or signedint
,float
,long
orchar
. Thearray
module should be at least mentioned together withnumpy
andctypes
.CWE-191: Detect or prevent integer overflow
"by classes and are protected against overflows. Primitive types such as
numpy
,time
orctype
share issues known fromC
, orC++
"CWE-1335: Incorrect Bitwise Shift of Integer
CWE-1335: Promote readability and compatibility by using mathematical written code with arithmetic operations instead of bit-wise operations
"outcomes. Python's
ctypes
module allows integration ofC
based system libraries into Python and direct access to C-type variables that can have"CWE-197: Control rounding when converting to less precise numbers
"Python has
ctypes
module allowing users to work with many different data types. "The text was updated successfully, but these errors were encountered: