mirror of
https://github.com/boostorg/math.git
synced 2026-02-26 04:42:22 +00:00
S390x testing: make all the tests 128-bit float safe.
* Remove tests we don't need right now. !!!REVERT THIS COMMIT BEFORE MERGING!!! * Add s390x testing to drone. * Correct drone file. * Correct drone file (again) * Prevent complete cancellation in bessel_jy logic. * Correct testing for 128-bit floats. * Make some more tests 128-bit long double safe. * Make more tests 128-bit float safe. * Fix some more 128-bit testing issues. * More 128-bit float fixes. * Make more tests 128-bit float safe. * Fix up remaining tests for 128-bit floats. * Yet more 128-bit float test case fixes. * Fix up more tests for 128-bit floats and non-intel platforms. * Fix up more tests to be 128-bit long double safe. * More test case adjustments. * More 128-bit float error rate adjustments. * Fixes for autodiff tests * Two more test fixes. * Fix up daubechies_scaling_test.cpp and reinstate full CI. Co-authored-by: Matt Borland <matt@mattborland.com>
This commit is contained in:
@@ -30,6 +30,7 @@ public:
|
||||
using boost::math::constants::pi;
|
||||
using std::isfinite;
|
||||
using std::floor;
|
||||
using std::ceil;
|
||||
Real y = 0;
|
||||
Real x = (t - m_t0)/m_h;
|
||||
Real z = x;
|
||||
@@ -61,6 +62,7 @@ public:
|
||||
using boost::math::constants::pi;
|
||||
using std::isfinite;
|
||||
using std::floor;
|
||||
using std::ceil;
|
||||
|
||||
Real x = (t - m_t0)/m_h;
|
||||
if (ceil(x) == x) {
|
||||
|
||||
@@ -465,6 +465,13 @@ namespace boost { namespace math {
|
||||
for (k = n; k > 0; k--) // backward recurrence for J
|
||||
{
|
||||
next = 2 * (u + k) * current / x - prev;
|
||||
//
|
||||
// We can't allow next to completely cancel out or the subsequent logic breaks.
|
||||
// Pretend that one bit did not cancel:
|
||||
if (next == 0)
|
||||
{
|
||||
next = prev * tools::epsilon<T>() / 2;
|
||||
}
|
||||
prev = current;
|
||||
current = next;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user