IS_REM_SAFE 3CW "21 March 2008" "mathcw-1.00"

Table of contents


NAME

is_rem_safe, is_rem_safel, is_rem_safell - test for safe integer remainder

SYNOPSIS

cc [ flags ] -I/usr/local/include file(s) -L/usr/local/lib -lmcw [ ... ]

#include <mathcw.h>

extern int is_rem_safe (int a, int b);

extern int is_rem_safel (long int a, long int b);

extern int is_rem_safell (long long int a, long long int b);

DESCRIPTION

Determine whether the integer arguments can be remaindered (a % b) safely without overflow.

RETURN VALUES

Return 1 if the operation is safe, and 0 otherwise.

ERRORS

None.

SEE ALSO

is_abs_safe(3CW), is_add_safe(3CW), is_div_safe(3CW), is_mul_safe(3CW), is_neg_safe(3CW), is_sub_safe(3CW).