Macaulay2 Engine
Loading...
Searching...
No Matches

◆ pos_add_4() [2/2]

int32_t safe::pos_add_4 ( int32_t x,
int32_t y,
const char * msg )
inlinestatic

Definition at line 222 of file overflow.hpp.

223{
224 assert(!over_4(x) && !over_4(y));
225 int32_t z = (uint32_t)x + (uint32_t)y;
226 if
227 expect_false(over_4(z)) ov(msg);
228 return z;
229}
static int32_t over_4(int32_t x)
Definition overflow.hpp:111
void ov(const char *msg)
Definition overflow.cpp:5
volatile int x
#define expect_false(x)
Definition overflow.hpp:66

References expect_false, ov(), over_4(), and x.

Referenced by Monoid::mult(), and pos_add_4().