lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 6b06fd4 2/6: Use standard <cfenv> macros with


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 6b06fd4 2/6: Use standard <cfenv> macros with standard <cfenv> functions
Date: Thu, 5 Jan 2017 21:52:29 +0000 (UTC)

branch: master
commit 6b06fd45bc5c15de2018d20281723fc51a9f07d6
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Use standard <cfenv> macros with standard <cfenv> functions
    
    At present, comparing an lmi enumerator to std::fegetround()'s result
    was not an error, but only because the enumerators are contrived to
    have the same names as the macros. However, that contrivance is quirky
    and fragile, and it requires <cfenv> to be included in 'fenv_lmi.hpp',
    whence it leaks broadly, making it harder to sequester <cfenv> as an
    implementation detail and encourage lmi's equivalent but more robust
    facilities to be used instead.
---
 fenv_lmi.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fenv_lmi.cpp b/fenv_lmi.cpp
index 889f88c..31e9a57 100644
--- a/fenv_lmi.cpp
+++ b/fenv_lmi.cpp
@@ -161,7 +161,7 @@ bool fenv_is_valid()
 #if defined LMI_X87
     return default_x87_control_word() == x87_control_word();
 #else  // !defined LMI_X87
-    return fe_tonearest == fegetround() && 0 == fetestexcept(FE_ALL_EXCEPT);
+    return FE_TONEAREST == fegetround() && 0 == fetestexcept(FE_ALL_EXCEPT);
 #endif // !defined LMI_X87
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]