The MODZ function returns
the remainder from the division of
argument-1 by
argument-2.
When the result is non-zero, the result has the same sign as the first
argument. The sign of the second argument is ignored.
The computation that
is performed by the MODZ function is exact if both of the following
conditions are true:
-
Both arguments are exact integers.
-
All integers that are less than
either argument have exact 8-byte floating-point representation.
To determine the largest
integer for which the computation is exact, execute the following
DATA step:
data _null_;
exactint = constant('exactint');
put exactint=;
run;
Operating Environment Information: For
information about the largest integer, see the SAS documentation for
your operating environment.
If either of the above
conditions is not true, a small amount of numerical error can occur
in the floating-point computation. For example, when you use exact
arithmetic and the result is zero, MODZ might return a very small
positive value or a value slightly less than the second argument.