Re: [PATCH] Fix truncf for sNaN input
Joseph Myers <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 11 Mar 2020, Keith Packard via Newlib wrote: > I think this isn't right. According to the trunc/truncf man page: > > If x is integral, infinite, or NaN, x itself is returned. > > I think this means that we should just return x in these cases, and not > raise an exception? That manpage is wrong. The underlying IEEE operation should raise "invalid" and return a qNaN for an sNaN operand (but never raises "inexact"). -- Joseph S. Myers [email protected]