Top "Integer-overflow" questions

Integer overflow occurs when the result of an operation is larger than the maximal value that can be represented by the underlying integer type.

Convert hexadecimal string to long

I am trying to do an hexadecimal to integer conversion on a 32 bit machine. Here is the code I am …

c hex type-conversion integer-overflow strtol
Overflow when multiplying Integers and assigning to Long

If I type the following into the immediate window I get Runtime error '6': Overflow. MsgBox 24 * 60 * 60 Why is this? …

vba integer-overflow
C++ Template for safe integer casts

I am trying to write a C++ template function that will throw a runtime exception on integer overflow in casts …

c++ templates casting integer-overflow
How to avoid overflow in expr. A * B - C * D

I need to compute an expression which looks like: A*B - C*D, where their types are: signed long …

c++ c integer-overflow
detecting multiplication of uint64_t integers overflow with C

Is there any efficient and portable way to check when multiplication operations with int64_t or uint64_t operands overflow …

c multiplication integer-overflow
overflows in size_t additions

I like to have my code warning free for VS.NET and GCC, and I like to have my code 64…

c integer-overflow size-t
Detect signed int overflow in Go

I'm building a Lisp, and I want 32 bit integers to automatically switch to 64 bit integers if a computation would cause …

go integer-overflow
Avoid overflow when adding numpy arrays

I want to add numpy arrays with datatyp uint8. I know that the values in these arrays may be large …

python numpy image-processing integer-overflow numpy-ndarray
Can doubles or BigDecimal overflow?

Java 8 gave us Math.addExact() for integers but not decimals. Is it possible for double and BigDecimal to overflow? Judging …

java double bigdecimal integer-overflow
Simulating integer overflow in Python

Python 2 has two integer datatypes int and long, and automatically converts between them as necessary, especially in order to avoid …

python ctypes integer-overflow