2
0
mirror of https://github.com/boostorg/math.git synced 2026-01-19 04:22:09 +00:00

Simple continued fraction (#377)

* Simple continued fraction [CI SKIP]

* Comments on error analysis [CI SKIP]

* Simple continued fraction [CI SKIP]

* Clarify comment and kick off build.
This commit is contained in:
Nick
2020-06-26 14:50:04 -04:00
committed by GitHub
parent 3cc1ebef5e
commit 1ac89b2b02
9 changed files with 432 additions and 3 deletions

View File

@@ -323,9 +323,15 @@ bool check_equal(Real x, Real y, std::string const & filename, std::string const
if (x != y) {
std::ios_base::fmtflags f( std::cerr.flags() );
std::cerr << "\033[0;31mError at " << filename << ":" << function << ":" << line << "\n";
std::cerr << "\033[0m Expected " << x << " == " << y << " but:\n";
std::cerr << " Expected = " << std::defaultfloat << std::fixed << x << " = " << std::scientific << x << std::hexfloat << " = " << x << "\n";
std::cerr << " Computed = " << std::defaultfloat << std::fixed << y << " = " << std::scientific << y << std::hexfloat << " = " << y << "\n";
std::cerr << "\033[0m Condition '" << x << " == " << y << "' is not satisfied:\n";
if (std::is_floating_point<Real>::value) {
std::cerr << " Expected = " << std::defaultfloat << std::fixed << x << " = " << std::scientific << x << std::hexfloat << " = " << x << "\n";
std::cerr << " Computed = " << std::defaultfloat << std::fixed << y << " = " << std::scientific << y << std::hexfloat << " = " << y << "\n";
} else {
std::cerr << " Expected: " << x << " = " << "0x" << std::hex << x << "\n";
std::cerr << std::dec;
std::cerr << " Computed: " << y << " = " << "0x" << std::hex << y << "\n";
}
std::cerr.flags(f);
++detail::global_error_count;
return false;