Skip to content

Commit

Permalink
Multiplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
pleroy committed Oct 11, 2024
1 parent 87de705 commit 6bde557
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numerics/sin_cos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Value SinImplementation(DoublePrecision<Argument> const argument) {

DoublePrecision<double> const sin_x₀_plus_h_cos_x₀ =
TwoProductAdd<fma_policy>(cos_x₀, h, sin_x₀);
double const h² = h * (h + (e + e));
double const h² = h * (h + 2 * e);
double const h³ = h² * h;
return sin_x₀_plus_h_cos_x₀.value +
((sin_x₀ * h² * CosPolynomial<fma_policy>(h²) +
Expand Down Expand Up @@ -154,7 +154,7 @@ Value CosImplementation(DoublePrecision<Argument> const argument) {

DoublePrecision<double> const cos_x₀_minus_h_sin_x₀ =
TwoProductNegatedAdd<fma_policy>(sin_x₀, h, cos_x₀);
double const h² = h * (h + (e + e));
double const h² = h * (h + 2 * e);
double const h³ = h² * h;
return cos_x₀_minus_h_sin_x₀.value +
((cos_x₀ * h² * CosPolynomial<fma_policy>(h²) -
Expand Down

0 comments on commit 6bde557

Please sign in to comment.