On 2015-06-22 11:45, Walt Farrell wrote: > On Mon, 22 Jun 2015 07:26:10 -0700, Ed Jaffe wrote: > >> On 6/17/2015 2:55 PM, David Cole wrote: >>> Excellent! Just stuff that into an ignorable dsect, and there you go! >>> I never thought of this method. Very creative. >> >> We use the same basic technique in a robust set of macro-based math >> functions to to ensure one EQU is greater or less than another, to >> ensure a set of EQU values are all equal, to compute the max/min of the >> set, etc. Such functions come in quite handy... >> > > How do you get a min using that approach, Ed? I'd also be interested in how > you test equality. I have one guess for equality, but I'm not sure it's the > only way of doing it, and no ideas on min. > The min of two items is their sum minus their max. But the range is limited by possible overflow. (Is the range also limited by any limit on the size of a control section?) For more than two, apply the technique iteratively.
What about for signed operands? Again, if one tolerates a limit of the operand range the function can apply a bias. Error reporting? (Implied by "robust"?) -- gil
