Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #14698
| From | Miles Bader <miles@gnu.org> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: NaN values in c++ |
| Date | 2012-03-03 07:35 +0900 |
| Message-ID | <87hay6pr65.fsf@catnip.gol.com> (permalink) |
| References | <24636042.467.1330680257816.JavaMail.geo-discussion-forums@vbkl3> <jiq897$2b4$1@dont-email.me> <jiqb5p$t8b$1@news-rocq.inria.fr> |
Marc <marc.glisse@gmail.com> writes: >> You just have to document requirements very cleary, e.g. "this library >> requires IEEE 754 conformance, don't use e.g. -fastmath option". ... >> Happily the C++11 standard, by incorporating most of the C99 standard >> library, requires a common isnan() function: > > I don't see how that changes anything. -ffinite-math-only (implied by > -ffast-math) is a way for the user to say that there won't be a NaN > (or an infinity) anywhere. That flag is then likely to replace isnan > with a function that always returns false. ... and indeed that does happen in gcc. One could probably get around this in practice by using one's own external "really_is_nan" function, making sure that it's compiled without -ffast-math or whatever... -Miles -- Quidquid latine dictum sit, altum viditur.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Find similar | Unroll thread
NaN values in c++ Luca Cerone <luca.cerone@gmail.com> - 2012-03-02 01:24 -0800
Re: NaN values in c++ "Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com> - 2012-03-02 11:43 +0100
Re: NaN values in c++ Marc <marc.glisse@gmail.com> - 2012-03-02 11:33 +0000
Re: NaN values in c++ Luca Cerone <luca.cerone@gmail.com> - 2012-03-02 08:01 -0800
Re: NaN values in c++ Paavo Helde <myfirstname@osa.pri.ee> - 2012-03-02 11:14 -0600
Re: NaN values in c++ Miles Bader <miles@gnu.org> - 2012-03-03 07:35 +0900
csiph-web