Re: Signaling NaNs

2021-12-10 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote: > I could reformulate my question to: "Is there a way to produce a (quiet) > NaN that won't occur as a result of the C library functions?" There are 2^51 possible quiet NaNs [1]. I would guess that the hardware and libc functions produce only a small portion of this s

Re: Signaling NaNs

2021-12-09 Thread Marc Nieper-Wißkirchen
Hi Bruno, thanks for replying so quickly! My intention is neither to feed the signaling NaN into floating-point operations nor to cause it an exception to be raised. What I really want to do is to model a type whose value is either a floating-point number (including infinities and the NaNs retur

Re: Signaling NaNs

2021-12-09 Thread Bruno Haible
Hi Marc, > I have been searching through the list of modules but haven't been able to > find it: Does Gnulib offer a way to store a signaling NaN in a memory > location (if supported by the platform) It doesn't, because quiet NaNs are easier to work with. > The forthcoming C2x standard will hav