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

◆ sub_pos() [2/2]

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

Definition at line 172 of file overflow.hpp.

173{
174 if (x <= y) return 0;
175 int32_t z = (uint32_t)x - (uint32_t)y;
176 if
177 expect_false(z < 0) ov(msg);
178 return z;
179}
return(void *) result
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 ExponentVector< int, true >::quotient(), and sub_pos().