]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Hotfix muparser: Fix problem with IntelLLVM finite math 15312/head
authorMarc Fehling <mafehling.git@gmail.com>
Mon, 5 Jun 2023 21:45:21 +0000 (15:45 -0600)
committerMarc Fehling <mafehling.git@gmail.com>
Mon, 5 Jun 2023 23:35:09 +0000 (17:35 -0600)
bundled/muparser_v2_3_3/src/muParserTest.cpp

index eaff3aa8bf36daba8e5a65baea2d52a2c6bb27ae..8dc01caaeac195559cf41bc0f4b71c4cd77a512e 100644 (file)
@@ -1546,17 +1546,7 @@ namespace mu
                                        // The tests equations never result in infinity, if they do thats a bug.
                                        // reference:
                                        // http://sourceforge.net/projects/muparser/forums/forum/462843/topic/5037825
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
-                                       if (std::numeric_limits<value_type>::has_infinity)
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-                                       {
-                                               bCloseEnough &= (fabs(fVal[i]) != numeric_limits<value_type>::infinity());
-                                       }
+                                       bCloseEnough &= std::isfinite(fVal[i]);
                                }
 
                                iRet = ((bCloseEnough && a_fPass) || (!bCloseEnough && !a_fPass)) ? 0 : 1;

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.