Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libcxx][test][z/OS] Fix hermite.pass.cpp for HEX float #101019

Merged
merged 5 commits into from
Aug 7, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion libcxx/test/std/numerics/c.math/hermite.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

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

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

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

#if !(defined(__MVS__) && !defined(__BFP__))
{ // check input infinity is handled correctly
Real inf = std::numeric_limits<Real>::infinity();
for (unsigned n = 1; n < g_max_n; ++n) {
Expand Down Expand Up @@ -316,6 +324,7 @@ void test() {
}
}
}
#endif
}

struct TestFloat {
Expand Down
Loading