[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
}
- [lmi-commits] [lmi] master updated (df07870 -> d1e29f2), Greg Chicares, 2017/01/05
- [lmi-commits] [lmi] master 6b06fd4 2/6: Use standard <cfenv> macros with standard <cfenv> functions,
Greg Chicares <=
- [lmi-commits] [lmi] master ba30a9f 5/6: Sequester <cfenv> from code that includes 'fenv_lmi.hpp', Greg Chicares, 2017/01/05
- [lmi-commits] [lmi] master 6ecceb5 4/6: Rename a local variable for clarity, Greg Chicares, 2017/01/05
- [lmi-commits] [lmi] master 17b62a5 1/6: Update history of C and C++ numerics, Greg Chicares, 2017/01/05
- [lmi-commits] [lmi] master d1e29f2 6/6: Check return values of <cfenv> functions, Greg Chicares, 2017/01/05
- [lmi-commits] [lmi] master e04cad4 3/6: Explicitly qualify standard functions, Greg Chicares, 2017/01/05