Sigh, one more thing. There are further possibilities for a NAN result, even if the operands are !NAN and the result from frange_arithmetic is free of NANs. Adding different signed infinities.
For example, [-INF,+INF] + [-INF,+INF] has the possibility of adding -INF and +INF, which is a NAN. Since we end up calling frange arithmetic on the lower bounds and then on the upper bounds, we miss this, and mistakenly think we're free of NANs. I have a patch in testing, but FYI, in case anyone notices this before I get around to it tomorrow. Aldy On Tue, Nov 8, 2022 at 3:11 PM Jakub Jelinek <ja...@redhat.com> wrote: > > On Tue, Nov 08, 2022 at 03:06:53PM +0100, Aldy Hernandez wrote: > > +// If either operand is a NAN, set R to the combination of both NANs > > +// signwise and return TRUE. > > This comment doesn't describe what it does now. > If either operand is a NAN, set R to NAN with unspecified sign bit and return > TRUE. > ? > > Other than this LGTM. > > Jakub >