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

◆ mult_by() [2/2]

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

Definition at line 249 of file overflow.hpp.

250{
251 int64_t z = (int64_t)x * y;
252 int32_t w = (int32_t)z;
253 if
254 expect_false(z != (int64_t)w) ov(msg);
255 return x = w;
256}
void ov(const char *msg)
Definition overflow.cpp:5
volatile int x
#define expect_false(x)
Definition overflow.hpp:66

References expect_false, ov(), and x.

Referenced by mult_by().