[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
Thu Aug 1 08:07:32 PDT 2024


================
@@ -26,7 +26,13 @@
 
 #include "type_algorithms.h"
 
-inline constexpr unsigned g_max_n = 128;
+template <class Real>
+constexpr unsigned get_maximal_order() {
+  if constexpr (std::numeric_limits<Real>::max_exponent10 < std::numeric_limits<Real>::max_exponent)
----------------
PaulXiCao wrote:

This might not test what we actually need. 
My idea was rather along the lines of max_exponent10< 60 then return 39 else if max_exponent10 <... return 128. Hope this helps otherwise let me know and I can reformulate this. 
We should check which exponents we actually need here (e.g. the 60 and ... above).

(Sorry for the formatting. I am on my phone.)

https://github.com/llvm/llvm-project/pull/101019


More information about the libcxx-commits mailing list