[libcxx-commits] [libcxx] [libcxx][test][z/OS] Fix hermite.pass.cpp for HEX float (PR #101019)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 31 10:59:12 PDT 2024
================
@@ -26,7 +26,12 @@
#include "type_algorithms.h"
-inline constexpr unsigned g_max_n = 128;
+inline constexpr unsigned g_max_n =
+#if !(defined(__MVS__) && !defined(__BFP__))
+ 128;
+#else
+ 39;
+#endif
----------------
PaulXiCao wrote:
Can we find a way to implement this more reliable to also work for other special architectures?
E.g. making use of `std::numeric_limits<Real>::max_exponent10`.
https://en.cppreference.com/w/cpp/types/numeric_limits/max_exponent10
Maybe via a function similar to
```cpp
template <class Real>
constexp unsigned get_maximal_order() {
if constexpr (..max_exponent10 < ...)
return ...;
else ...
}
```
https://github.com/llvm/llvm-project/pull/101019
More information about the libcxx-commits
mailing list