Skip to content

Commit

Permalink
potential new minimax polynomial
Browse files Browse the repository at this point in the history
  • Loading branch information
Geolm authored Jan 23, 2024
1 parent 6736c89 commit 7372888
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions extra/simd_approx_math.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ static inline simd_vector simd_approx_sin(simd_vector x)
simd_vector c5 = simd_splat(8.3109378e-3f);
simd_vector c7 = simd_splat(-1.84477486e-4f);

// try to replace by
// // p(x)=((2.6000548e-6*x-1.9806615e-4)*x+8.3330173e-3)*x-1.6666657e-1
// Estimated max error: 4.618689e-9
// result = x + x * p(x)

simd_vector result;
result = simd_fmad(x_squared, c7, c5);
result = simd_fmad(x_squared, result, c3);
Expand Down

0 comments on commit 7372888

Please sign in to comment.