Home
last modified time | relevance | path

Searched refs:fabs (Results 1 – 25 of 1012) sorted by relevance

12345678910>>...41

/third_party/mindspore/mindspore/lite/test/st/
Dgraph_test.cc87 ASSERT_LE(fabs(fp32_data[0] - (0.115831)), 0.01); in TEST_F()
88 ASSERT_LE(fabs(fp32_data[1] - (0.113074)), 0.01); in TEST_F()
89 ASSERT_LE(fabs(fp32_data[2] - (0.245932)), 0.01); in TEST_F()
90 ASSERT_LE(fabs(fp32_data[3] - (0.346307)), 0.01); in TEST_F()
91 ASSERT_LE(fabs(fp32_data[4] - (-0.15687)), 0.01); in TEST_F()
95 ASSERT_LE(fabs(fp32_data[0] - (0.06387864)), 0.01); in TEST_F()
96 ASSERT_LE(fabs(fp32_data[1] - (0.22883008)), 0.01); in TEST_F()
97 ASSERT_LE(fabs(fp32_data[2] - (0.23308714)), 0.01); in TEST_F()
98 ASSERT_LE(fabs(fp32_data[3] - (0.04586578)), 0.01); in TEST_F()
99 ASSERT_LE(fabs(fp32_data[4] - (0.06820235)), 0.01); in TEST_F()
[all …]
/third_party/boost/libs/gil/test/extension/toolbox/
Dcolor_convert_xyz.cpp47 BOOST_TEST_LT(std::fabs(p32f[0] - p32f_b[0]), SKEW); in test_rgb32f_xyz32f_1()
48 BOOST_TEST_LT(std::fabs(p32f[1] - p32f_b[1]), SKEW); in test_rgb32f_xyz32f_1()
49 BOOST_TEST_LT(std::fabs(p32f[2] - p32f_b[2]), SKEW); in test_rgb32f_xyz32f_1()
50 BOOST_TEST_LT(std::fabs(xyz32f[0] - 0.562669), SKEW); in test_rgb32f_xyz32f_1()
51 BOOST_TEST_LT(std::fabs(xyz32f[1] - 0.597462), SKEW); in test_rgb32f_xyz32f_1()
52 BOOST_TEST_LT(std::fabs(xyz32f[2] - 0.096050), SKEW); in test_rgb32f_xyz32f_1()
74 BOOST_TEST_LT(std::fabs(p32f[0] - p32f_b[0]), SKEW); in test_rgb32f_xyz32f_2()
75 BOOST_TEST_LT(std::fabs(p32f[1] - p32f_b[1]), SKEW); in test_rgb32f_xyz32f_2()
76 BOOST_TEST_LT(std::fabs(p32f[2] - p32f_b[2]), SKEW); in test_rgb32f_xyz32f_2()
77 BOOST_TEST_LT(std::fabs(xyz32f[0] - 0.197823), SKEW); in test_rgb32f_xyz32f_2()
[all …]
/third_party/boost/boost/math/special_functions/
Drelative_difference.hpp43 if(fabs(b) > max_val) in relative_difference()
45 if(fabs(a) > max_val) in relative_difference()
50 else if(fabs(a) > max_val) in relative_difference()
58 a = fabs(a); in relative_difference()
59 b = fabs(b); in relative_difference()
69 return (std::max)(fabs((a - b) / a), fabs((a - b) / b)); in relative_difference()
92 if(fabs(b) > max_val) in relative_difference()
94 if(fabs(a) > max_val) in relative_difference()
99 else if(fabs(a) > max_val) in relative_difference()
107 a = fabs(a); in relative_difference()
[all …]
Dhypergeometric_1F1.hpp69 T z_limit = fabs((2 * a - b) / (sqrt(fabs(a)))); in hypergeometric_1F1_divergent_fallback()
73 if ((k > 0) && (k < 50) && (fabs(convergence_at_50) < 1) && (z > z_limit)) in hypergeometric_1F1_divergent_fallback()
179 if ((fabs(z * a / b) < 2) && (fabs(z * (a + 10) / ((b + 10) * 10)) < 1)) in is_convergent_negative_z_series()
185 if (fabs((a + n) * z / ((b + n) * n)) < 1) in is_convergent_negative_z_series()
190 if (fabs((a + m) * z / ((b + m) * m)) < 1) in is_convergent_negative_z_series()
200 if (fabs((a + n) * z / ((b + n) * n)) < 1) in is_convergent_negative_z_series()
223 if(fabs((a + n) * z / ((b + n) * n)) < 1) in is_convergent_negative_z_series()
252 if(fabs(a) == 0.5) in hypergeometric_1F1_is_13_3_6_region()
254 if ((z < 0) && (fabs(10 * a / b) < 1) && (fabs(a) < 50)) in hypergeometric_1F1_is_13_3_6_region()
258 …if ((fabs((2 * a - 1) * (2 * a - b) / b) < 2) && (fabs(shrinkage * (2 * a + 9) * (2 * a - b + 10) … in hypergeometric_1F1_is_13_3_6_region()
[all …]
/third_party/ffmpeg/tests/checkasm/
Daf_afir.c62 double t = fabs(src0[i]) + in test_fcmul_add()
63 fabs(tre) + fabs(tim) + fabs(cre) + fabs(cim) + in test_fcmul_add()
64 fabs(tre * cre) + fabs(tim * cim) + in test_fcmul_add()
65 fabs(tre * cim) + fabs(tim * cre) + in test_fcmul_add()
66 fabs(tre * cre - tim * cim) + in test_fcmul_add()
67 fabs(tre * cim + tim * cre) + in test_fcmul_add()
68 fabs(cdst[i]) + 1.0; in test_fcmul_add()
/third_party/boost/boost/math/special_functions/detail/
Dhypergeometric_asym.hpp50 if ((fabs(a) < 10) && (fabs(b) < 10)) in hypergeometric_1F1_asym_large_z_series()
86 abs_sum += fabs(sum); in hypergeometric_1F1_asym_large_z_series()
91 if (fabs(sum) * boost::math::policies::get_epsilon<T, Policy>() > fabs(term)) in hypergeometric_1F1_asym_large_z_series()
93 if(fabs(sum) / abs_sum < boost::math::policies::get_epsilon<T, Policy>()) in hypergeometric_1F1_asym_large_z_series()
99 if((k > 10) && (fabs(term) > fabs(last_term))) in hypergeometric_1F1_asym_large_z_series()
115 if (fabs(a) < 0.001f) in hypergeometric_1F1_asym_region()
129 if (fabs((one_minus_a + half_digits) * (b_minus_a + half_digits) / (half_digits * z)) < 0.7) in hypergeometric_1F1_asym_region()
137 if (fabs(one_minus_a * b_minus_a / z) > 0.5) in hypergeometric_1F1_asym_region()
142 else if (fabs((1 - (b - a) + half_digits) * (a + half_digits) / (half_digits * z)) < 0.7) in hypergeometric_1F1_asym_region()
153 if (fabs(a1 * a / z) > 0.5) in hypergeometric_1F1_asym_region()
[all …]
Dbessel_jn.hpp82 … if((fabs(fact) > 1) && ((tools::max_value<T>() - fabs(prev)) / fabs(fact) < fabs(current))) in bessel_jn()
109 … if((fabs(fact) > 1) && ((tools::max_value<T>() - fabs(prev)) / fabs(fact) < fabs(current))) in bessel_jn()
124 if(tools::max_value<T>() * scale < fabs(value)) in bessel_jn()
Dhypergeometric_pFq_checked_series.hpp137 if (fabs(z) > 1) in hypergeometric_pFq_checked_series_impl()
156 if (fabs(z) > 1) in hypergeometric_pFq_checked_series_impl()
161 if (fabs(z) == 1) in hypergeometric_pFq_checked_series_impl()
219 if (fabs(abs_result) >= upper_limit) in hypergeometric_pFq_checked_series_impl()
227 if (fabs(abs_result) < lower_limit) in hypergeometric_pFq_checked_series_impl()
328 p = s * log(fabs(z)); in hypergeometric_pFq_checked_series_impl()
342 loop_error_scale = fabs(expm1(loop_error_scale)); in hypergeometric_pFq_checked_series_impl()
376 loop_abs_result += fabs(term); in hypergeometric_pFq_checked_series_impl()
378 if (fabs(loop_result) >= upper_limit) in hypergeometric_pFq_checked_series_impl()
385 if (fabs(loop_result) < lower_limit) in hypergeometric_pFq_checked_series_impl()
[all …]
Dhypergeometric_1F1_bessel.hpp37 T x = sqrt(fabs(2 * z * b - 4 * a * z)); in hypergeometric_1F1_is_tricomi_viable_positive_b()
53 using std::fabs; in arbitrary_small_value()
54 return (tools::min_value<T>() / tools::epsilon<T>()) * (fabs(target) > 1 ? target : 1); in arbitrary_small_value()
71 term /= pow(fabs(bessel_arg), b_minus_1_plus_n / 2); in hypergeometric_1F1_AS_13_3_7_tricomi_series()
72 mult /= sqrt(fabs(bessel_arg)); in hypergeometric_1F1_AS_13_3_7_tricomi_series()
74 if (fabs(bessel_cache[cache_size - 1]) < tools::min_value<T>() / tools::epsilon<T>()) in hypergeometric_1F1_AS_13_3_7_tricomi_series()
79 …oost::math::isfinite)(term) || (!std::numeric_limits<T>::has_infinity && (fabs(term) > tools::max_… in hypergeometric_1F1_AS_13_3_7_tricomi_series()
81 term = -log(fabs(bessel_arg)) * b_minus_1_plus_n / 2; in hypergeometric_1F1_AS_13_3_7_tricomi_series()
95 …if ((boost::math::isnan)(bessel_cache[cache_size - 1]) || (fabs(bessel_cache[cache_size - 1]) >= t… in hypergeometric_1F1_AS_13_3_7_tricomi_series()
99 …::has_infinity && ((boost::math::isnan)(bessel_cache[cache_size - 1]) || (fabs(bessel_cache[cache_… in hypergeometric_1F1_AS_13_3_7_tricomi_series()
[all …]
Dbessel_jy.hpp62 ok = fabs(mult) < 0.5f; in hankel_PQ()
68 while((fabs(term) > tolerance * *p) && ok); in hankel_PQ()
85 BOOST_ASSERT(fabs(v) <= 0.5f); // precondition for using this routine in temme_jy()
102 T vspv = (fabs(v) < tools::epsilon<T>()) ? T(1/constants::pi<T>()) : T(v / spv); in temme_jy()
200 BOOST_ASSERT(fabs(x) > 1); in CF2_jy()
218 if (fabs(Cr) + fabs(Ci) < tiny) { Cr = tiny; } in CF2_jy()
219 if (fabs(Dr) + fabs(Di) < tiny) { Dr = tiny; } in CF2_jy()
239 if (fabs(Cr) + fabs(Ci) < tiny) { Cr = tiny; } in CF2_jy()
240 if (fabs(Dr) + fabs(Di) < tiny) { Dr = tiny; } in CF2_jy()
249 if (fabs(delta_r - 1) + fabs(delta_i) < tolerance) in CF2_jy()
[all …]
/third_party/boost/libs/math/tools/
Dmp_t.hpp43 if(fabs(b) >= max_val) in relative_error()
45 if(fabs(a) >= max_val) in relative_error()
57 return (std::max)(fabs((a - b) / a), fabs((a - b) / b)); in relative_error()
62 return fabs(a - b); in relative_error()
63 if(fabs(a) < min_val) in relative_error()
65 if(fabs(b) < min_val) in relative_error()
67 return (std::max)(fabs((a - b) / a), fabs((a - b) / b)); in relative_error()
Dgenerate_rational_test.cpp85 if(fabs(r5) < tools::max_value<float>()) in main()
91 if(fabs(r6) < tools::max_value<float>()) in main()
118 if(fabs(r5) < tools::max_value<float>()) in main()
124 if(fabs(r6) < tools::max_value<float>()) in main()
151 if(fabs(r5) < tools::max_value<float>()) in main()
157 if(fabs(r6) < tools::max_value<float>()) in main()
191 if(fabs(r5) < tools::max_value<float>()) in main()
197 if(fabs(r6) < tools::max_value<float>()) in main()
224 if(fabs(r5) < tools::max_value<float>()) in main()
230 if(fabs(r6) < tools::max_value<float>()) in main()
[all …]
/third_party/boost/boost/math/tools/
Dtoms748_solve.hpp46 return fabs(a - b) <= (eps * (std::min)(fabs(a), fabs(b))); in operator ()()
109 else if(c <= a + fabs(a) * tol) in bracket()
111 c = a + fabs(a) * tol; in bracket()
113 else if(c >= b - fabs(b) * tol) in bracket()
115 c = b - fabs(b) * tol; in bracket()
160 if(fabs(denom) < 1) in safe_div()
162 if(fabs(denom * tools::max_value<T>()) <= fabs(num)) in safe_div()
184 if((c <= a + fabs(a) * tol) || (c >= b - fabs(b) * tol)) in secant_interpolate()
380fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb … in toms748_solve()
402fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb … in toms748_solve()
[all …]
Drecurrence.hpp157 ((fabs(tools::max_value<T>() * (c / (a * 2048))) < fabs(first)) in apply_recurrence_relation_forward()
158 || (fabs(tools::max_value<T>() * (c / (b * 2048))) < fabs(second)) in apply_recurrence_relation_forward()
159 || (fabs(tools::min_value<T>() * (c * 2048 / a)) > fabs(first)) in apply_recurrence_relation_forward()
160 || (fabs(tools::min_value<T>() * (c * 2048 / b)) > fabs(second)) in apply_recurrence_relation_forward()
165 int log_scale = itrunc(log(fabs(second))); in apply_recurrence_relation_forward()
212 ( (fabs(tools::max_value<T>() * (a / b) / 2048) < fabs(second)) in apply_recurrence_relation_backward()
213 || (fabs(tools::max_value<T>() * (a / c) / 2048) < fabs(first)) in apply_recurrence_relation_backward()
214 || (fabs(tools::min_value<T>() * (a / b) * 2048) > fabs(second)) in apply_recurrence_relation_backward()
215 || (fabs(tools::min_value<T>() * (a / c) * 2048) > fabs(first)) in apply_recurrence_relation_backward()
219 int log_scale = itrunc(log(fabs(second))); in apply_recurrence_relation_backward()
Dminima.hpp51 fract1 = tolerance * fabs(x) + tolerance / 4; in brent_find_minima()
53 if(fabs(x - mid) <= (fract2 - (max - min) / 2)) in brent_find_minima()
56 if(fabs(delta2) > fract1) in brent_find_minima()
65 q = fabs(q); in brent_find_minima()
69 if((fabs(p) >= fabs(q * td / 2)) || (p <= q * (min - x)) || (p >= q * (max - x))) in brent_find_minima()
81 delta = (mid - x) < 0 ? (T)-fabs(fract1) : (T)fabs(fract1); in brent_find_minima()
91 …u = (fabs(delta) >= fract1) ? T(x + delta) : (delta > 0 ? T(x + fabs(fract1)) : T(x - fabs(fract1)… in brent_find_minima()
Droots.hpp297 if (fabs(delta * 2) > fabs(delta2)) in newton_raphson_iterate()
301 if ((result != 0) && (fabs(shift) > fabs(result))) in newton_raphson_iterate()
303 delta = sign(delta) * fabs(result) * 1.1f; // Protect against huge jumps! in newton_raphson_iterate()
346 }while(count && (fabs(result * factor) < fabs(delta))); in newton_raphson_iterate()
379 using std::fabs; in step()
387 if ((fabs(num) < 1) && (fabs(denom) >= fabs(num) * tools::max_value<T>())) in step()
404 using std::fabs; in bracket_root_towards_max()
411 if (fabs(min) < fabs(max)) in bracket_root_towards_max()
459 using std::fabs; in bracket_root_towards_min()
467 if (fabs(min) < fabs(max)) in bracket_root_towards_min()
[all …]
/third_party/libsnd/tests/
Dpcm_test.tpl120 if (fabs (int_data [k] - float_data [k]) > 1.0)
273 zero_count = (fabs (float_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
320 if (fabs (float_out [k] - float_in [k]) > 1e-10)
336 zero_count = (fabs (double_out [k]) > 1e-10) ? zero_count : zero_count + 1 ;
383 if (fabs (double_out [k] - double_in [k]) > 1e-10)
471 { error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
472 if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
486 { error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
487 if (fabs (data [k]) > 1e-100 && fabs (error / data [k]) > 1e-5)
498 { error = fabs (data [k] - ((double) k) / 100.0 * (sign *= -1)) ;
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/subzero/crosstest/
Dtest_arith_fabs.ll1 declare float @llvm.fabs.f32(float)
2 declare double @llvm.fabs.f64(double)
3 declare <4 x float> @llvm.fabs.v4f32(<4 x float>)
6 %x = call float @llvm.fabs.f32(float %a)
11 %x = call double @llvm.fabs.f64(double %a)
16 %x = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
/third_party/skia/src/pathops/
DSkPathOpsTypes.h331 return fabs(x) < FLT_EPSILON; in approximately_zero()
335 return fabs(x) < DBL_EPSILON_ERR; in precisely_zero()
339 return fabs(x) < DBL_EPSILON_SUBDIVIDE_ERR; in precisely_subdivide_zero()
343 return fabs(x) < FLT_EPSILON; in approximately_zero()
347 return fabs(x) < FLT_EPSILON_CUBED; in approximately_zero_cubed()
351 return fabs(x) < FLT_EPSILON_HALF; in approximately_zero_half()
355 return fabs(x) < FLT_EPSILON_DOUBLE; in approximately_zero_double()
359 return fabs(x) < FLT_EPSILON_ORDERABLE_ERR; in approximately_zero_orderable()
363 return fabs(x) < FLT_EPSILON_SQUARED; in approximately_zero_squared()
367 return fabs(x) < FLT_EPSILON_SQRT; in approximately_zero_sqrt()
[all …]
/third_party/flutter/skia/src/pathops/
DSkPathOpsTypes.h331 return fabs(x) < FLT_EPSILON; in approximately_zero()
335 return fabs(x) < DBL_EPSILON_ERR; in precisely_zero()
339 return fabs(x) < DBL_EPSILON_SUBDIVIDE_ERR; in precisely_subdivide_zero()
343 return fabs(x) < FLT_EPSILON; in approximately_zero()
347 return fabs(x) < FLT_EPSILON_CUBED; in approximately_zero_cubed()
351 return fabs(x) < FLT_EPSILON_HALF; in approximately_zero_half()
355 return fabs(x) < FLT_EPSILON_DOUBLE; in approximately_zero_double()
359 return fabs(x) < FLT_EPSILON_ORDERABLE_ERR; in approximately_zero_orderable()
363 return fabs(x) < FLT_EPSILON_SQUARED; in approximately_zero_squared()
367 return fabs(x) < FLT_EPSILON_SQRT; in approximately_zero_sqrt()
[all …]
/third_party/boost/boost/geometry/srs/projections/proj/
Dloxim.hpp82 if (fabs(xy_y) < epsilon) in fwd()
86 if (fabs(xy_x) < epsilon || fabs(fabs(xy_x) - half_pi) < epsilon) in fwd()
101 if (fabs(xy_y) < epsilon) { in inv()
105 if (fabs(lp_lon) < epsilon || fabs(fabs(lp_lon) - half_pi) < epsilon) in inv()
Dvandg4.hpp73 if (fabs(lp_lat) < tolerance) { in fwd()
76 … } else if (fabs(lp_lon) < tolerance || fabs(fabs(lp_lat) - half_pi) < tolerance) { in fwd()
80 bt = fabs(two_div_pi * lp_lat); in fwd()
88 if ((fabs(lp_lon) - half_pi) < 0.) dt = -dt; in fwd()
98 xy_y = half_pi * sqrt(1. + dt * fabs(x1) - x1 * x1); in fwd()
Domerc.hpp87 if (fabs(fabs(lp_lat) - half_pi) > epsilon) { in fwd()
94 if (fabs(fabs(U) - 1.0) < epsilon) { in fwd()
99 if(fabs(temp) < tolerance) { in fwd()
138 if (fabs(fabs(Up) - 1.) < epsilon) { in inv()
193 if (fabs(phi1 - phi2) <= tolerance || in setup_omerc()
194 (con = fabs(phi1)) <= tolerance || in setup_omerc()
195 fabs(con - half_pi) <= tolerance || in setup_omerc()
196 fabs(fabs(par.phi0) - half_pi) <= tolerance || in setup_omerc()
197 fabs(fabs(phi2) - half_pi) <= tolerance) in setup_omerc()
201 if (fabs(par.phi0) > epsilon) { in setup_omerc()
[all …]
Dvandg.hpp82 p2 = fabs(lp_lat / half_pi); in fwd()
88 if (fabs(lp_lat) <= tolerance) { in fwd()
91 } else if (fabs(lp_lon) <= tolerance || fabs(p2 - 1.) < tolerance) { in fwd()
96 al = .5 * fabs(pi / lp_lon - lp_lon / pi); in fwd()
106 xy_y = fabs(xy_x / pi); in fwd()
136 if ((ay = fabs(xy_y)) < tolerance) { in inv()
139 lp_lon = fabs(xy_x) <= tolerance ? 0. : in inv()
153 if (((t = fabs(d = 3. * d / (al * m))) - tolerance) <= 1.) { in inv()
158 lp_lon = fabs(xy_x) <= tolerance ? 0. : in inv()
Dbipc.hpp106 if (fabs(fabs(lp_lat) - half_pi) < epsilon10) { in fwd()
117 if (fabs(z) > 1.) { in fwd()
118 if (fabs(z) > one_plus_eps) in fwd()
130 if (fabs(z) > 1.) { in fwd()
131 if (fabs(z) > one_plus_eps) in fwd()
148 if (fabs(al) > 1.) { in fwd()
149 if (fabs(al) > one_plus_eps) in fwd()
155 if (fabs(t = n * (Av - Az)) < al) in fwd()
190 fAz = fabs(Az = atan2(xy_x, xy_y)); in inv()
197 if (fabs(rl - r) < epsilon) in inv()

12345678910>>...41