On Wed, Jan 10, 2018 at 08:17:08PM +0000, Joseph Myers wrote: > On Wed, 10 Jan 2018, Bernhard Reutner-Fischer wrote: > > > > >+ /* x <= +Inf is the same as x == x, i.e. !isnan(x), but this > > > >loses > > > >+ an "invalid" exception. */ > > > >+ (if (!flag_trapping_math) > > > >+ (eq @0 @0)))) > > > >+ /* x == +Inf and x >= +Inf are always equal to x > DBL_MAX, but > > > >+ for == this introduces an exception for x a NaN. */ > > > > What does "x a NaN" mean? x OP NaN resp. x CMP NaN ? > > That x is a NaN. fpclassify (x) == FP_NAN. It's not a C comparison
So s/for x a NaN/if x is a NaN/ wouldn't have thrown me off. > operator since NaNs compare unequal to everything. > > > Shouldn't run tests return 0 here? Also drop the exit() declaration > > since it's unused? > > C99 automatically returns 0 from the end of main, but it's true the > default style would be exit (0) in tests. Ah right fenv_exceptions even sets -std=gnu99 and fenv support would require a minimum of C99 anyway so you're of course right. Obviously i'm half asleep, sorry for the noise.. thanks,