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

◆ mult() [2/2]

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

Definition at line 236 of file overflow.hpp.

237{
238 int64_t z = (int64_t)x * y;
239 int32_t w = (int32_t)z;
240 if
241 expect_false(z != (int64_t)w) ov(msg);
242 return w;
243}
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 main(), monomialOrderEncodeFromActualExponents(), mult(), ExponentVector< int, true >::multpower(), ExponentVector< int, true >::power(), and ExponentVector< int, true >::weight().