Re: [PATCH] Fix truncf for sNaN input

Keith Packard via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Joseph Myers <[email protected]> writes:

> That manpage is wrong.  The underlying IEEE operation should raise 
> "invalid" and return a qNaN for an sNaN operand (but never raises 
> "inexact").

Hrm. IEEE 754 says that you only get "invalid" if the NaN or infinite
operand cannot be represented in the destination format. As these
functions return the same type as their operand, NaN and inf values can
be represented in the return value.

Are you referring to some other standard?

Also, glibc works the way the manual says, and I'd really like newlib
and glibc to have the same general behavior, even if newlib isn't quite
as accurate as glibc for some operations.

-- 
-keith
signature.asc (application/pgp-signature, 832 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAl5paQ0ACgkQ2yIaaQAA
ABHqZw//b5aCxncOwZRG3dLFr2WSxPT/oHQZltRltWDCTAi5HKttSnAaHmVs6d3p
NIrH1I4P8x+ETEJZ+G9su04Qz/43qMsvAg+jIcuu8Cta7ea2hpza2JwyfoLKPouR
/so/o6iKv5CsyqQRZVbLvOF+174ufBFDVoEZJSQ1wyHgLu9rAuJqXUxHGA1n3lV2
CTqn41n/r0l760nrVgYJ0di1Qi768QdLyD550RN3dAuVBW8DyUTuAFz6q19Y7/2+
3RpYjZvcPQ6HuRT8n79bLDNt2GmlUlRDX0rtNrkyr1iyxL8qTRXl7JlrcjnGRLFE
ejo/RAbbf7NU23OR3EVEB6ak4R0zf2wdr25YXmUNSzwmBnDUBwdd24+a4xraDS8X
gBzk8cjcSRF5kC2grMEwUbCEOxjo11UCIv12lJPl+uNRD3FGFXbYqHgoC+H8Or9L
qhKpHfrDS8C3kt+z4MD5/8qqyR1/sgFQYPM6vtbk6gRP+oEUm2Nacq3jhYKWz6fS
Mrw6+Apm28ygFMR2Rs3bLhHwVsTZKTZ0YRQZgCtB6kpyeA8BlUE7HuHcamG1s9Ab
3MDIH4oItTlBMp8DEb5y4ZodTl0VVzlk0yXgSxZYuPogIYt6MtFyMNU/Qs42mBmW
9pdQA7v9cbKR8/ijF1kBdsqAyYgvs3XhHK9eQkQ4Pw0qhCjE/Pg=
=Avl5
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.