/third_party/boost/libs/math/test/ |
D | test_real_concept.cpp | 27 long double tol = std::numeric_limits<long double>::epsilon() * 2; in BOOST_AUTO_TEST_CASE() local 34 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 37 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 40 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 43 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 48 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 51 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 54 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 57 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() 60 BOOST_CHECK_CLOSE_FRACTION(t.value(), t2, tol); in BOOST_AUTO_TEST_CASE() [all …]
|
D | chebyshev_test.cpp | 32 Real tol = 400*std::numeric_limits<Real>::epsilon(); in test_polynomials() local 33 if (tol > std::numeric_limits<float>::epsilon()) in test_polynomials() 34 tol *= 10; // float results have much larger error rates. in test_polynomials() 37 BOOST_CHECK_CLOSE_FRACTION(chebyshev_t(0, x), Real(1), tol); in test_polynomials() 38 BOOST_CHECK_CLOSE_FRACTION(chebyshev_t(1, x), x, tol); in test_polynomials() 39 BOOST_CHECK_CLOSE_FRACTION(chebyshev_t(2, x), 2*x*x - 1, tol); in test_polynomials() 40 BOOST_CHECK_CLOSE_FRACTION(chebyshev_t(3, x), x*(4*x*x-3), tol); in test_polynomials() 41 BOOST_CHECK_CLOSE_FRACTION(chebyshev_t(4, x), 8*x*x*(x*x - 1) + 1, tol); in test_polynomials() 42 BOOST_CHECK_CLOSE_FRACTION(chebyshev_t(5, x), x*(16*x*x*x*x - 20*x*x + 5), tol); in test_polynomials() 47 tol = 10*tol; in test_polynomials() [all …]
|
D | catmull_rom_test.cpp | 28 Real tol = std::numeric_limits<Real>::epsilon(); in test_alpha_distance() local 33 BOOST_CHECK_CLOSE_FRACTION(d, 1, tol); in test_alpha_distance() 36 BOOST_CHECK_CLOSE_FRACTION(d, 1, tol); in test_alpha_distance() 39 BOOST_CHECK_CLOSE_FRACTION(d, 1, tol); in test_alpha_distance() 43 BOOST_CHECK_CLOSE_FRACTION(d, pow(2, (Real)1/ (Real) 2), tol); in test_alpha_distance() 46 BOOST_CHECK_CLOSE_FRACTION(d, 1, tol); in test_alpha_distance() 49 BOOST_CHECK_CLOSE_FRACTION(d, 2, tol); in test_alpha_distance() 59 Real tol = 10*std::numeric_limits<Real>::epsilon(); in test_linear() local 68 BOOST_CHECK_CLOSE_FRACTION(cr.max_parameter(), 3, tol); in test_linear() 70 BOOST_CHECK_SMALL(p0[0], tol); in test_linear() [all …]
|
D | legendre_stieltjes_test.cpp | 30 Real tol = std::numeric_limits<Real>::epsilon(); in test_legendre_stieltjes() local 40 BOOST_CHECK_CLOSE_FRACTION(ls1(x), x, tol); in test_legendre_stieltjes() 41 BOOST_CHECK_CLOSE_FRACTION(ls1.prime(x), 1, tol); in test_legendre_stieltjes() 44 BOOST_CHECK_CLOSE_FRACTION(ls2(x), p2 - 2/static_cast<Real>(5), tol); in test_legendre_stieltjes() 45 BOOST_CHECK_CLOSE_FRACTION(ls2.prime(x), 3*x, tol); in test_legendre_stieltjes() 48 BOOST_CHECK_CLOSE_FRACTION(ls3(x), p3 - 9*x/static_cast<Real>(14), 600*tol); in test_legendre_stieltjes() 49 …CLOSE_FRACTION(ls3.prime(x), 15*x*x*half<Real>() -3*half<Real>()-9/static_cast<Real>(14), 100*tol); in test_legendre_stieltjes() 54 BOOST_CHECK_CLOSE_FRACTION(ls4(x), E4, 250*tol); in test_legendre_stieltjes() 55 BOOST_CHECK_CLOSE_FRACTION(ls4.prime(x), 35*x*(9*x*x -5)/static_cast<Real>(18), 250*tol); in test_legendre_stieltjes() 59 BOOST_CHECK_CLOSE_FRACTION(ls5(x), E5, 29000*tol); in test_legendre_stieltjes() [all …]
|
D | chebyshev_transform_test.cpp | 44 Real tol = 10*std::numeric_limits<Real>::epsilon(); in test_sin_chebyshev_transform() local 48 chebyshev_transform<Real> cheb(f, a, b, tol); in test_sin_chebyshev_transform() 55 if (abs(s) < tol) in test_sin_chebyshev_transform() 57 BOOST_CHECK_SMALL(cheb(x), 100*tol); in test_sin_chebyshev_transform() 58 BOOST_CHECK_CLOSE_FRACTION(c, cheb.prime(x), 100*tol); in test_sin_chebyshev_transform() 62 BOOST_CHECK_CLOSE_FRACTION(s, cheb(x), 100*tol); in test_sin_chebyshev_transform() 63 if (abs(c) < tol) in test_sin_chebyshev_transform() 65 BOOST_CHECK_SMALL(cheb.prime(x), 100*tol); in test_sin_chebyshev_transform() 69 BOOST_CHECK_CLOSE_FRACTION(c, cheb.prime(x), 100*tol); in test_sin_chebyshev_transform() 77 BOOST_CHECK_CLOSE_FRACTION(1 - cos(static_cast<Real>(1)), Q, 100*tol); in test_sin_chebyshev_transform() [all …]
|
D | test_hyperexponential_dist.cpp | 24 #define BOOST_MATH_HYPEREXP_CHECK_CLOSE_COLLECTIONS(T, actual, expected, tol) \ argument 32 BOOST_CHECK_CLOSE( x[i], y[i], tol ); \ 51 const RealT tol = make_tolerance<RealT>(); in BOOST_AUTO_TEST_CASE_TEMPLATE() local 55 BOOST_CHECK_CLOSE(dist.probabilities()[0], static_cast<RealT>(1L), tol); in BOOST_AUTO_TEST_CASE_TEMPLATE() 56 BOOST_CHECK_CLOSE(dist.rates()[0], static_cast<RealT>(1L), tol); in BOOST_AUTO_TEST_CASE_TEMPLATE() 64 …P_CHECK_CLOSE_COLLECTIONS(RealT, dist_it.probabilities(), std::vector<RealT>(probs, probs+n), tol); in BOOST_AUTO_TEST_CASE_TEMPLATE() 65 …_HYPEREXP_CHECK_CLOSE_COLLECTIONS(RealT, dist_it.rates(), std::vector<RealT>(rates, rates+n), tol); in BOOST_AUTO_TEST_CASE_TEMPLATE() 69 …XP_CHECK_CLOSE_COLLECTIONS(RealT, dist_r.probabilities(), std::vector<RealT>(probs, probs+n), tol); in BOOST_AUTO_TEST_CASE_TEMPLATE() 70 …H_HYPEREXP_CHECK_CLOSE_COLLECTIONS(RealT, dist_r.rates(), std::vector<RealT>(rates, rates+n), tol); in BOOST_AUTO_TEST_CASE_TEMPLATE() 75 …P_CHECK_CLOSE_COLLECTIONS(RealT, dist_il.probabilities(), std::vector<RealT>(probs, probs+n), tol); in BOOST_AUTO_TEST_CASE_TEMPLATE() [all …]
|
D | bivariate_statistics_test.cpp | 42 Real tol = std::numeric_limits<Real>::epsilon(); in test_covariance() local 50 BOOST_TEST(abs(cov1) < tol); in test_covariance() 51 BOOST_TEST(abs(mu_u1 - 8) < tol); in test_covariance() 52 BOOST_TEST(abs(mu_v1 - 17) < tol); in test_covariance() 59 BOOST_TEST(abs(cov2+4) < tol); in test_covariance() 60 BOOST_TEST(abs(mu_u2 - 6) < tol); in test_covariance() 61 BOOST_TEST(abs(mu_v2 - 5) < tol); in test_covariance() 69 BOOST_TEST(abs(cov3) < tol); in test_covariance() 70 BOOST_TEST(abs(mu_u3 - 2) < tol); in test_covariance() 71 BOOST_TEST(abs(mu_v3 - 1) < tol); in test_covariance() [all …]
|
D | norms_test.cpp | 118 Real tol = 50*std::numeric_limits<Real>::epsilon(); in test_lp() local 122 BOOST_TEST(abs(l3 - 1) < tol); in test_lp() 126 BOOST_TEST(abs(l3 - 8) < tol); in test_lp() 134 BOOST_TEST(abs(l8 - expected) < tol*abs(expected)); in test_lp() 146 BOOST_TEST(abs(l20 - expected) < tol*expected); in test_lp() 156 BOOST_TEST(abs(l7_ - l7) < tol*l7); in test_lp() 164 Real tol = 50*std::numeric_limits<Real>::epsilon(); in test_complex_lp() local 167 BOOST_TEST(abs(l3 - 1) < tol); in test_complex_lp() 170 BOOST_TEST(abs(l3 - 1) < tol); in test_complex_lp() 180 BOOST_TEST(abs(l7_ - l7) < tol*l7); in test_complex_lp() [all …]
|
D | univariate_statistics_test.cpp | 105 double tol = 100*std::numeric_limits<double>::epsilon(); in test_integer_mean() local 108 BOOST_TEST(abs(mu - 3) < tol); in test_integer_mean() 113 BOOST_TEST(abs(mu - 3) < tol); in test_integer_mean() 124 BOOST_TEST(abs(m1 - m2) < tol*abs(m1)); in test_integer_mean() 141 Real tol = std::numeric_limits<Real>::epsilon(); in test_mean() local 144 BOOST_TEST(abs(mu - 3) < tol); in test_mean() 148 BOOST_TEST(abs(mu - 3) < tol); in test_mean() 152 BOOST_TEST(abs(mu - 2) < tol); in test_mean() 156 BOOST_TEST(abs(mu - 3) < tol); in test_mean() 161 BOOST_TEST(abs(mu - 4) < 10*tol); in test_mean() [all …]
|
D | signal_statistics_test.cpp | 40 Real tol = 5*std::numeric_limits<Real>::epsilon(); in test_hoyer_sparsity() local 43 BOOST_TEST(abs(hs - 1) < tol); in test_hoyer_sparsity() 46 BOOST_TEST(abs(hs - 1) < tol); in test_hoyer_sparsity() 50 BOOST_TEST(abs(hs - 1) < tol); in test_hoyer_sparsity() 56 BOOST_TEST(abs(hs) < tol); in test_hoyer_sparsity() 60 BOOST_TEST(abs(hs) < tol); in test_hoyer_sparsity() 79 BOOST_TEST(abs(hs) < tol); in test_hoyer_sparsity() 87 BOOST_TEST(abs(hs) < tol); in test_hoyer_sparsity() 95 double tol = 5*std::numeric_limits<double>::epsilon(); in test_integer_hoyer_sparsity() local 98 BOOST_TEST(abs(hs - 1) < tol); in test_integer_hoyer_sparsity() [all …]
|
D | test_jacobi.hpp | 151 T tol = boost::math::tools::epsilon<T>() * 100; in test_spots() local 153 …5), T(0.5)), static_cast<T>(0.905869360370352996327275878479104183407762212476128499788493L), tol); in test_spots() 154 …(0.5), pol), static_cast<T>(0.905869360370352996327275878479104183407762212476128499788493L), tol); in test_spots() 156 …5), T(0.5)), static_cast<T>(0.879941022963758342138211939938800035594045353539382810624647L), tol); in test_spots() 157 …(0.5), pol), static_cast<T>(0.879941022963758342138211939938800035594045353539382810624647L), tol); in test_spots() 159 ….5), T(0.5)), static_cast<T>(1.85218402142505803268146025319200184620073865036147924150565L), tol); in test_spots() 160 …T(0.5), pol), static_cast<T>(1.85218402142505803268146025319200184620073865036147924150565L), tol); in test_spots() 162 ….5), T(0.5)), static_cast<T>(1.10391193669599654696698383614539220889596741980833071370343L), tol); in test_spots() 163 …T(0.5), pol), static_cast<T>(1.10391193669599654696698383614539220889596741980833071370343L), tol); in test_spots() 165 …5), T(0.5)), static_cast<T>(0.971377398838178842823315157470233933307542433588855341182382L), tol); in test_spots() [all …]
|
D | gauss_quadrature_test.cpp | 253 Real tol = boost::math::tools::epsilon<Real>() * 10; in test_linear() local 260 BOOST_CHECK_CLOSE_FRACTION(Q, 9.5, tol); in test_linear() 261 BOOST_CHECK_CLOSE_FRACTION(L1, 9.5, tol); in test_linear() 263 BOOST_CHECK_CLOSE(Q, 0, tol); in test_linear() 265 BOOST_CHECK_CLOSE_FRACTION(Q, -9.5, tol); in test_linear() 272 Real tol = boost::math::tools::epsilon<Real>() * 10; in test_quadratic() local 277 BOOST_CHECK_CLOSE_FRACTION(Q, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 278 BOOST_CHECK_CLOSE_FRACTION(L1, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 287 Real tol = expected_error<Points>(test_ca_error_id); in test_ca() local 293 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol); in test_ca() [all …]
|
D | gauss_kronrod_quadrature_test.cpp | 257 Real tol = boost::math::tools::epsilon<Real>() * 10; in test_linear() local 265 BOOST_CHECK_CLOSE_FRACTION(Q, 9.5, tol); in test_linear() 266 BOOST_CHECK_CLOSE_FRACTION(L1, 9.5, tol); in test_linear() 269 BOOST_CHECK_CLOSE_FRACTION(Q, -9.5, tol); in test_linear() 270 BOOST_CHECK_CLOSE_FRACTION(L1, 9.5, tol); in test_linear() 273 BOOST_CHECK_CLOSE(Q, Real(0), tol); in test_linear() 280 Real tol = boost::math::tools::epsilon<Real>() * 10; in test_quadratic() local 286 BOOST_CHECK_CLOSE_FRACTION(Q, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 287 BOOST_CHECK_CLOSE_FRACTION(L1, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 296 Real tol = expected_error<Points>(test_ca_error_id); in test_ca() local [all …]
|
D | tanh_sinh_quadrature_test.cpp | 210 Real tol = 10*boost::math::tools::epsilon<Real>(); in test_linear() local 219 BOOST_CHECK_CLOSE_FRACTION(Q, 9.5, tol); in test_linear() 220 BOOST_CHECK_CLOSE_FRACTION(L1, 9.5, tol); in test_linear() 222 BOOST_CHECK_CLOSE_FRACTION(Q, -9.5, tol); in test_linear() 223 BOOST_CHECK_CLOSE_FRACTION(L1, 9.5, tol); in test_linear() 233 Real tol = 10*boost::math::tools::epsilon<Real>(); in test_quadratic() local 239 BOOST_CHECK_CLOSE_FRACTION(Q, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 240 BOOST_CHECK_CLOSE_FRACTION(L1, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 248 Real tol = 10*boost::math::tools::epsilon<Real>(); in test_singular() local 256 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol); in test_singular() [all …]
|
D | test_trapezoidal.cpp | 57 Real tol = 10*std::numeric_limits<Real>::epsilon(); in test_complex_bessel() local 58 BOOST_CHECK_CLOSE_FRACTION(Jnz.real(), Jnzx, tol); in test_complex_bessel() 59 BOOST_CHECK_CLOSE_FRACTION(Jnz.imag(), Jnzy, tol); in test_complex_bessel() 86 Real tol = 10*std::numeric_limits<Real>::epsilon(); in test_I0_complex() local 87 BOOST_CHECK_CLOSE_FRACTION(I0z.real(), I0zx, tol); in test_I0_complex() 88 BOOST_CHECK_CLOSE_FRACTION(I0z.imag(), I0zy, tol); in test_I0_complex() 119 Real tol = 5000*std::numeric_limits<Real>::epsilon(); in test_erfc() local 120 BOOST_CHECK_CLOSE_FRACTION(erfcz.real(), erfczx, tol); in test_erfc() 121 BOOST_CHECK_CLOSE_FRACTION(erfcz.imag(), erfczy, tol); in test_erfc() 150 Real tol = 100*boost::math::tools::epsilon<Real>(); in test_rational_periodic() local [all …]
|
D | test_beta_dist.cpp | 62 RealType tol) // Test tolerance. in test_spot() argument 65 BOOST_CHECK_CLOSE_FRACTION(cdf(abeta, x), P, tol); in test_spot() 71 cdf(complement(abeta, x)), Q, tol); in test_spot() 75 quantile(abeta, P), x, tol); in test_spot() 90 BOOST_CHECK_CLOSE_FRACTION(quantile(complement(abeta, Q)), x, tol); in test_spot() 104 abeta.alpha(), tol); in test_spot() 107 abeta.beta(), tol); in test_spot() 112 abeta.alpha(), tol); in test_spot() 115 abeta.beta(), tol); in test_spot() 576 double tol = std::numeric_limits<double>::epsilon() * 10; in BOOST_AUTO_TEST_CASE() local [all …]
|
D | test_tgamma_ratio.hpp | 144 T tol = boost::math::tools::epsilon<T>() * 20; in test_spots() local 147 …p(T(1), -500)), T(180.25)), T(8.0113754557649679470816892372669519037339812035512e-178L), 3 * tol); in test_spots() 148 …p(T(1), -525)), T(192.25)), T(1.5966560279353205461166489184101261541784867035063e-197L), 3 * tol); in test_spots() 149 ….25), T(ldexp(T(1), -500))), T(4.077990437521002194346763299159975185747917450788e+181L), 3 * tol); in test_spots() 150 …25), T(ldexp(T(1), -525))), T(1.2040790040958522422697601672703926839178050326148e+199L), 3 * tol); in test_spots() 151 …ratio(T(193.25), T(194.75)), T(0.00037151765099653237632823607820104961270831942138159L), 3 * tol); in test_spots() 167 …(1), -1020)), T(100)), T(1.20390418056093374068585549133304106854441830616070800417660e151L), tol); in test_spots() 168 …T(1), -1020)), T(150)), T(2.94980580122226729924781231239336413648584663386992050529324e46L), tol); in test_spots() 169 …(1), -1020)), T(180)), T(1.00669209319561468911303652019446665496398881230516805140750e-20L), tol); in test_spots() 170 …1), -1020)), T(220)), T(1.08230263539550701700187215488533416834407799907721731317227e-112L), tol); in test_spots() [all …]
|
D | adaptive_gauss_kronrod_quadrature_test.cpp | 77 Real tol = boost::math::tools::epsilon<Real>() * 10; in test_linear() local 85 BOOST_CHECK_CLOSE_FRACTION(Q, 9.5, tol); in test_linear() 86 BOOST_CHECK_CLOSE_FRACTION(L1, 9.5, tol); in test_linear() 95 Real tol = boost::math::tools::epsilon<Real>() * 10; in test_quadratic() local 101 BOOST_CHECK_CLOSE_FRACTION(Q, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 102 BOOST_CHECK_CLOSE_FRACTION(L1, (Real) 17 + half<Real>()*third<Real>(), tol); in test_quadratic() 113 Real tol = boost::math::tools::epsilon<Real>() * 10; in test_ca() local 120 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol); in test_ca() 121 BOOST_CHECK_CLOSE_FRACTION(L1, Q_expected, tol); in test_ca() 128 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol); in test_ca() [all …]
|
D | exp_sinh_quadrature_test.cpp | 178 Real tol = 10 * boost::math::tools::epsilon<Real>(); in test_right_limit_infinite() local 195 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol * tol_mult); in test_right_limit_infinite() 197 BOOST_CHECK_CLOSE_FRACTION(L1, Q_expected, tol * tol_mult); in test_right_limit_infinite() 202 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol); in test_right_limit_infinite() 205 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, 10 * tol); in test_right_limit_infinite() 209 …T_CHECK_CLOSE_FRACTION(Q, Q_expected, std::numeric_limits<Real>::digits10 > 30 ? 1000 * tol : tol); in test_right_limit_infinite() 214 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol); in test_right_limit_infinite() 215 BOOST_CHECK_CLOSE_FRACTION(L1, Q_expected, tol); in test_right_limit_infinite() 218 BOOST_CHECK_CLOSE_FRACTION(Q, Q_expected, tol); in test_right_limit_infinite() 219 BOOST_CHECK_CLOSE_FRACTION(L1, Q_expected, tol); in test_right_limit_infinite() [all …]
|
D | lanczos_smoothing_test.cpp | 38 Real tol = std::numeric_limits<Real>::epsilon(); in test_dlp_norms() local 40 BOOST_CHECK_CLOSE_FRACTION(dlp.norm_sq(0), 3, tol); in test_dlp_norms() 41 BOOST_CHECK_CLOSE_FRACTION(dlp.norm_sq(1), 2, tol); in test_dlp_norms() 43 BOOST_CHECK_CLOSE_FRACTION(dlp.norm_sq(0), Real(5)/Real(2), tol); in test_dlp_norms() 44 BOOST_CHECK_CLOSE_FRACTION(dlp.norm_sq(1), Real(5)/Real(4), tol); in test_dlp_norms() 45 BOOST_CHECK_CLOSE_FRACTION(dlp.norm_sq(2), Real(3*3*7)/Real(pow(2,6)), 2*tol); in test_dlp_norms() 61 Real tol = std::numeric_limits<Real>::epsilon(); in test_dlp_evaluation() local 72 BOOST_CHECK_CLOSE_FRACTION(q2, expected, tol); in test_dlp_evaluation() 75 BOOST_CHECK_CLOSE_FRACTION(q3, expected, 2*tol); in test_dlp_evaluation() 87 BOOST_CHECK_CLOSE_FRACTION(q1, q2, tol); in test_dlp_evaluation() [all …]
|
D | test_roots.cpp | 160 boost::math::tools::eps_tolerance<double> tol(precision); in inverse_ibeta_bisect() local 161 …return boost::math::tools::bisect(ibeta_roots_1<double, pol>(a, b, z, invert), min, max, tol).firs… in inverse_ibeta_bisect() 192 boost::math::tools::eps_tolerance<double> tol(precision); in inverse_ibeta_bisect_neg() local 193 …boost::math::tools::bisect(ibeta_roots_1<double, pol>(a, b, z, invert, true), min, max, tol).first; in inverse_ibeta_bisect_neg() 452 Real tol = std::numeric_limits<Real>::epsilon(); in test_complex_newton() local 460 BOOST_CHECK(abs(root.real()) <= tol); in test_complex_newton() 461 BOOST_CHECK_CLOSE(root.imag(), (Real)1, tol); in test_complex_newton() 465 BOOST_CHECK(abs(root.real()) <= tol); in test_complex_newton() 466 BOOST_CHECK_CLOSE(root.imag(), (Real)-1, tol); in test_complex_newton() 476 BOOST_CHECK(abs(root.real()) < 10*sqrt(tol)); in test_complex_newton() [all …]
|
/third_party/boost/libs/math/test/float128/ |
D | test_std_lib.cpp | 17 boost::float128_t tol = std::numeric_limits<boost::float128_t>::epsilon() * 4; in BOOST_AUTO_TEST_CASE() local 26 …28_C(0.25)), BOOST_FLOAT128_C(1.31811607165281796574566425464604046984639096659071471685355), tol); in BOOST_AUTO_TEST_CASE() 27 …8_C(-0.25)), BOOST_FLOAT128_C(1.82347658193697527271697912863346241435077843278439110412140), tol); in BOOST_AUTO_TEST_CASE() 28 …8_C(0.75)), BOOST_FLOAT128_C(0.722734247813415611178377352641333362025218486424440267626754), tol); in BOOST_AUTO_TEST_CASE() 29 …8_C(-0.75)), BOOST_FLOAT128_C(2.41885840577637762728426603063816952217195091295066555334819), tol); in BOOST_AUTO_TEST_CASE() 31 …128_C(0.0)), BOOST_FLOAT128_C(1.57079632679489661923132169163975144209858469968755291048747), tol); in BOOST_AUTO_TEST_CASE() 33 …28_C(0.25)), BOOST_FLOAT128_C(0.25268025514207865348565743699371097225219373309683819363392), tol); in BOOST_AUTO_TEST_CASE() 34 …C(-0.25)), BOOST_FLOAT128_C(-0.252680255142078653485657436993710972252193733096838193633924), tol); in BOOST_AUTO_TEST_CASE() 35 …8_C(0.75)), BOOST_FLOAT128_C(0.848062078981481008052944338998418080073366213263112642860718), tol); in BOOST_AUTO_TEST_CASE() 36 …C(-0.75)), BOOST_FLOAT128_C(-0.848062078981481008052944338998418080073366213263112642860718), tol); in BOOST_AUTO_TEST_CASE() [all …]
|
/third_party/boost/libs/multiprecision/test/ |
D | test_complex.cpp | 36 const float_type tol = boost::lexical_cast<float_type>(str_tol.c_str()); in test() local 38 std::cout << "Testing with tolerance: " << tol << std::endl; in test() 100 BOOST_CHECK_CLOSE_FRACTION(result_01.real(), control_01.real(), tol); in test() 101 BOOST_CHECK_CLOSE_FRACTION(result_01.imag(), control_01.imag(), tol); in test() 102 BOOST_CHECK_CLOSE_FRACTION(result_02.real(), control_02.real(), tol); in test() 103 BOOST_CHECK_CLOSE_FRACTION(result_02.imag(), control_02.imag(), tol); in test() 104 BOOST_CHECK_CLOSE_FRACTION(result_03.real(), control_03.real(), tol); in test() 105 BOOST_CHECK_CLOSE_FRACTION(result_03.imag(), control_03.imag(), tol); in test() 106 BOOST_CHECK_CLOSE_FRACTION(result_04.real(), control_04.real(), tol); in test() 107 BOOST_CHECK_CLOSE_FRACTION(result_04.imag(), control_04.imag(), tol); in test() [all …]
|
/third_party/boost/libs/numeric/ublas/test/ |
D | test_ticket7296.cpp | 26 static const float tol(1e-6f); variable 27 static const float mul(tol*10); 66 BOOST_UBLAS_TEST_CHECK_CLOSE( float(c1), float(c1), tol ); in BOOST_UBLAS_TEST_DEF() 67 BOOST_UBLAS_TEST_CHECK_CLOSE( double(c1), double(c1), tol ); in BOOST_UBLAS_TEST_DEF() 68 BOOST_UBLAS_TEST_CHECK_CLOSE( std::complex<float>(c1,c2), std::complex<float>(c1,c2), tol ); in BOOST_UBLAS_TEST_DEF() 69 BOOST_UBLAS_TEST_CHECK_CLOSE( std::complex<double>(c1,c2), std::complex<double>(c1,c2), tol ); in BOOST_UBLAS_TEST_DEF() 73 BOOST_UBLAS_TEST_CHECK_CLOSE( float(c1), double(c1), tol ); in BOOST_UBLAS_TEST_DEF() 74 BOOST_UBLAS_TEST_CHECK_CLOSE( double(c1), float(c1), tol ); in BOOST_UBLAS_TEST_DEF() 75 BOOST_UBLAS_TEST_CHECK_CLOSE( std::complex<float>(c1,c2), std::complex<double>(c1,c2), tol ); in BOOST_UBLAS_TEST_DEF() 76 BOOST_UBLAS_TEST_CHECK_CLOSE( std::complex<double>(c1,c2), std::complex<float>(c1,c2), tol ); in BOOST_UBLAS_TEST_DEF() [all …]
|
/third_party/boost/libs/geometry/test/srs/ |
D | check_geometry.hpp | 39 static void apply(Point const& point1, Point const& point2, T tol) in apply() 47 BOOST_CHECK_CLOSE(x1, x2, tol); in apply() 48 BOOST_CHECK_CLOSE(y1, y2, tol); in apply() 56 static void apply(Range const& range1, Range const& range2, T tol) in apply() 64 boost::begin(range2), tol); in apply() 68 static void apply(It first1, It last1, It first2, T tol) in apply() 71 Policy::apply(*first1, *first2, tol); in apply() 89 static void apply(Segment const& g1, Segment const& g2, T tol) in apply() 96 check_point::apply(p1, q1, tol); in apply() 97 check_point::apply(p2, q2, tol); in apply() [all …]
|