July 2002
Intermediate to advanced
320 pages
8h 15m
English
The “doz” function is “difference or zero,” defined as follows, for signed arguments:

It has been called “first grade subtraction,” because the result is 0 if you try to take away too much. We will use it to implement max(x, y) and min(x, y). In this connection it is important to note that doz(x, y) can be negative; it is negative if the subtraction overflows. The difference or zero function can be used directly to implement the Fortran IDIM function, although in Fortran, results are generally undefined if overflow occurs.
There seems to be no very good way to implement doz(x, y), max(x, y), and min(x, y) in a branch-free ...
Read now
Unlock full access