Skip to content

Commit 4e6336a

Browse files
committed
Fix issue with polyeval not being found
Signed-off-by: Ian <[email protected]>
1 parent 8719733 commit 4e6336a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

fuzzing/TODO.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# TODO: Implement fuzzing with libFuzzer
2+
# libFuzzer's command is as follows: -fsanitize=fuzzer
3+
# We should also couple it with -fsanitize=address and -fsanitize=undefined to detect memory errors and undefined behavior
4+
# More info here: https://llvm.org/docs/LibFuzzer.html

include/ccmath/internal/math/generic/func/power/pow_impl/powf_impl.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace ccm::gen::impl
9797
};
9898

9999
const DoubleDouble dx_dd({ 0.0, dx2 });
100-
const DoubleDouble p = support::polyeval(dx_dd, COEFFS[0], COEFFS[1], COEFFS[2], COEFFS[3], COEFFS[4], COEFFS[5]);
100+
const DoubleDouble p = ::ccm::support::polyeval(dx_dd, COEFFS[0], COEFFS[1], COEFFS[2], COEFFS[3], COEFFS[4], COEFFS[5]);
101101

102102
// log2(1 + dx2) ~ dx2 * P(dx2)
103103
const DoubleDouble log2_x_lo = quick_mult(dx2, p);
@@ -132,7 +132,7 @@ namespace ccm::gen::impl
132132
DoubleDouble{ -0x1.8483eabd9642dp-132, 0x1.b5251ff97bee1p-78 },
133133
};
134134

135-
DoubleDouble pp = support::polyeval(lo6,
135+
DoubleDouble pp = ::ccm::support::polyeval(lo6,
136136
EXP2_COEFFS[0],
137137
EXP2_COEFFS[1],
138138
EXP2_COEFFS[2],
@@ -194,8 +194,8 @@ namespace ccm::gen::impl
194194
if (x == 0.0F && y_u == 0xff80'0000)
195195
{
196196
// pow(+/-0, -inf) = +inf and raise FE_DIVBYZERO
197-
support::fenv::set_errno_if_required(EDOM);
198-
support::fenv::raise_except_if_required(FE_DIVBYZERO);
197+
::ccm::support::fenv::set_errno_if_required(EDOM);
198+
::ccm::support::fenv::raise_except_if_required(FE_DIVBYZERO);
199199
return FloatBits::inf().get_val();
200200
}
201201
return ((x_abs < 0x3f80'0000) == (y_u == 0xff80'0000)) ? FloatBits::inf().get_val() : 0.0F;
@@ -366,7 +366,7 @@ namespace ccm::gen::impl
366366
const double c1 = support::multiply_add(dx, COEFFS[3], COEFFS[2]);
367367
const double c2 = support::multiply_add(dx, COEFFS[5], COEFFS[4]);
368368

369-
const double p = support::polyeval(dx2, c0, c1, c2);
369+
const double p = ::ccm::support::polyeval(dx2, c0, c1, c2);
370370

371371
//////////////////////////////////////////////////////////////////////////////
372372
// NOTE: For some reason, this is significantly less efficient than above!
@@ -455,7 +455,7 @@ namespace ccm::gen::impl
455455
const double d0 = support::multiply_add(lo6, EXP2_COEFFS[1], EXP2_COEFFS[0]);
456456
const double d1 = support::multiply_add(lo6, EXP2_COEFFS[3], EXP2_COEFFS[2]);
457457
const double d2 = support::multiply_add(lo6, EXP2_COEFFS[5], EXP2_COEFFS[4]);
458-
const double pp = support::polyeval(lo6_sqr, d0, d1, d2);
458+
const double pp = ::ccm::support::polyeval(lo6_sqr, d0, d1, d2);
459459

460460
const double r = pp * exp2_hi_mid;
461461

0 commit comments

Comments
 (0)