Skip to content

Commit 5df433b

Browse files
committed
Fix hermite.pass.cpp for HEX float on z/OS
1 parent 77655f4 commit 5df433b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

libcxx/test/std/numerics/c.math/hermite.pass.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@
2626

2727
#include "type_algorithms.h"
2828

29-
inline constexpr unsigned g_max_n = 128;
29+
inline constexpr unsigned g_max_n =
30+
#if !(defined(__MVS__) && !defined(__BFP__))
31+
128;
32+
#else
33+
39;
34+
#endif
3035

3136
template <class T>
3237
std::array<T, 11> sample_points() {
@@ -203,6 +208,7 @@ std::vector<T> get_roots(unsigned n) {
203208

204209
template <class Real>
205210
void test() {
211+
#if !(defined(__MVS__) && !defined(__BFP__))
206212
{ // checks if NaNs are reported correctly (i.e. output == input for input == NaN)
207213
using nl = std::numeric_limits<Real>;
208214
for (Real NaN : {nl::quiet_NaN(), nl::signaling_NaN()})
@@ -215,6 +221,7 @@ void test() {
215221
for (unsigned n = 0; n < g_max_n; ++n)
216222
assert(!std::isnan(std::hermite(n, x)));
217223
}
224+
#endif
218225

219226
{ // checks std::hermite(n, x) for n=0..5 against analytic polynoms
220227
const auto h0 = [](Real) -> Real { return 1; };
@@ -289,6 +296,7 @@ void test() {
289296
}
290297
}
291298

299+
#if !(defined(__MVS__) && !defined(__BFP__))
292300
{ // check input infinity is handled correctly
293301
Real inf = std::numeric_limits<Real>::infinity();
294302
for (unsigned n = 1; n < g_max_n; ++n) {
@@ -316,6 +324,7 @@ void test() {
316324
}
317325
}
318326
}
327+
#endif
319328
}
320329

321330
struct TestFloat {

0 commit comments

Comments
 (0)