[Dune] [Dune-Commit] dune-grid r8017 - trunk/dune/grid/genericgeometry/test

Jö Fahlke jorrit at jorrit.de
Wed May 2 14:29:17 CEST 2012


Am Wed,  2. May 2012, 13:56:16 +0200 schrieb Martin Nolte:
> Is this check really safe? If I remember correctly, -ffast-math lets
> the compiler assume that isnan is always false.

It probably wouldn't hurt to pass the skip flag as another bool argument.
Then again, DUNE hasn't been written with non-standard math in mind, so I
didn't bother.

> On 05/02/2012 01:48 PM, sander at dune-project.org wrote:
> >Author: sander
> >Date: 2012-05-02 13:48:42 +0200 (Wed, 02 May 2012)
> >New Revision: 8017
> >
> >Modified:
> >    trunk/dune/grid/genericgeometry/test/testbasicgeometry.cc
> >Log:
> >Use std::isnan instead of a==a to test for NaN-ness.

isnan() isn't part of the C++2003 standard, as far as I could determine.  It
is part of C99, but it is a macro there.  So we definitely should remove the
namespace from it.

Or maybe it is indeed best (and clearest) to use an extra flag.

Bye,
Jö.

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

This is the first age that's paid much attention to the future, which
is a little ironic since we may not have one.
-- Arthur C Clarke
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20120502/2ae0eea4/attachment.pgp>


More information about the Dune mailing list