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