「view this page in B3 βῆτα server」

Revisions №59033

branch: master 「№59033」
Commited by: Rocco Moretti
GitHub commit link: 「174451937457cb21」 「№1737」
Difference from previous tested commit:  code diff
Commit date: 2016-10-24 15:59:56

Merge pull request #1737 from RosettaCommons/roccomoretti/gcc_with_inf Change compile settings to allow NaN/Inf Current settings for GCC and MSVC enable "fast math", which as part of their optimizations allow the compiler to assume that IEEE-754 NAN and INF values aren't generated. This is a problem, as there are a number of places in Rosetta which explicitly test for NaN/Inf, and these optimizations mean that these tests aren't doing what people think they are in release mode. (Note that clang does not have a "fast math" setting, or at least one that we enable, so it is immune to these issues.) This adds the -fno-finite-math-only flag to the GCC settings, which tells GCC to keep proper NaN/Inf support. (I'm disabling /fp:fast in MSVC, as it doesn't appear that MSVC has fine grain control of the fast math options.) This pull request also attempts to centralize the isnan/isinf handling in the code (to the functions in src/utility/numbers.hh), so we can better use robust methods if we do need to make an adjustment.

...