Jul-19-2023, 04:08 PM
(This post was last modified: Jul-19-2023, 04:11 PM by AlexanderWulf.)
I agree, that overflow is bad in general. But it is perfectly fine when doing "wrapping" math.
That is why, for example, in Rust the standard × and + operators throw an error on overflow, whereas the wrapping_add() or wrapping_mul() intrinsics do not.
Does Python/numpy have a similar thing? Turning off the warnings "globally" probably isn't a good idea...
That is why, for example, in Rust the standard × and + operators throw an error on overflow, whereas the wrapping_add() or wrapping_mul() intrinsics do not.
Does Python/numpy have a similar thing? Turning off the warnings "globally" probably isn't a good idea...