
(FPCore (x c s) :precision binary64 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
double code(double x, double c, double s) {
return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
code = cos((2.0d0 * x)) / ((c ** 2.0d0) * ((x * (s ** 2.0d0)) * x))
end function
public static double code(double x, double c, double s) {
return Math.cos((2.0 * x)) / (Math.pow(c, 2.0) * ((x * Math.pow(s, 2.0)) * x));
}
def code(x, c, s): return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
function code(x, c, s) return Float64(cos(Float64(2.0 * x)) / Float64((c ^ 2.0) * Float64(Float64(x * (s ^ 2.0)) * x))) end
function tmp = code(x, c, s) tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x)); end
code[x_, c_, s_] := N[(N[Cos[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] / N[(N[Power[c, 2.0], $MachinePrecision] * N[(N[(x * N[Power[s, 2.0], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 4 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x c s) :precision binary64 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
double code(double x, double c, double s) {
return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
code = cos((2.0d0 * x)) / ((c ** 2.0d0) * ((x * (s ** 2.0d0)) * x))
end function
public static double code(double x, double c, double s) {
return Math.cos((2.0 * x)) / (Math.pow(c, 2.0) * ((x * Math.pow(s, 2.0)) * x));
}
def code(x, c, s): return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
function code(x, c, s) return Float64(cos(Float64(2.0 * x)) / Float64((c ^ 2.0) * Float64(Float64(x * (s ^ 2.0)) * x))) end
function tmp = code(x, c, s) tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x)); end
code[x_, c_, s_] := N[(N[Cos[N[(2.0 * x), $MachinePrecision]], $MachinePrecision] / N[(N[Power[c, 2.0], $MachinePrecision] * N[(N[(x * N[Power[s, 2.0], $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\end{array}
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
(FPCore (x c s)
:precision binary64
(let* ((t_0 (* s (* x c))) (t_1 (cos (* x 2.0))))
(if (<= x 5e-6)
(/ t_1 (pow (* c (fabs (* x s))) 2.0))
(/ 1.0 (/ (* t_0 t_0) t_1)))))x = abs(x);
c = abs(c);
s = abs(s);
assert(c < s);
double code(double x, double c, double s) {
double t_0 = s * (x * c);
double t_1 = cos((x * 2.0));
double tmp;
if (x <= 5e-6) {
tmp = t_1 / pow((c * fabs((x * s))), 2.0);
} else {
tmp = 1.0 / ((t_0 * t_0) / t_1);
}
return tmp;
}
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = s * (x * c)
t_1 = cos((x * 2.0d0))
if (x <= 5d-6) then
tmp = t_1 / ((c * abs((x * s))) ** 2.0d0)
else
tmp = 1.0d0 / ((t_0 * t_0) / t_1)
end if
code = tmp
end function
x = Math.abs(x);
c = Math.abs(c);
s = Math.abs(s);
assert c < s;
public static double code(double x, double c, double s) {
double t_0 = s * (x * c);
double t_1 = Math.cos((x * 2.0));
double tmp;
if (x <= 5e-6) {
tmp = t_1 / Math.pow((c * Math.abs((x * s))), 2.0);
} else {
tmp = 1.0 / ((t_0 * t_0) / t_1);
}
return tmp;
}
x = abs(x) c = abs(c) s = abs(s) [c, s] = sort([c, s]) def code(x, c, s): t_0 = s * (x * c) t_1 = math.cos((x * 2.0)) tmp = 0 if x <= 5e-6: tmp = t_1 / math.pow((c * math.fabs((x * s))), 2.0) else: tmp = 1.0 / ((t_0 * t_0) / t_1) return tmp
x = abs(x) c = abs(c) s = abs(s) c, s = sort([c, s]) function code(x, c, s) t_0 = Float64(s * Float64(x * c)) t_1 = cos(Float64(x * 2.0)) tmp = 0.0 if (x <= 5e-6) tmp = Float64(t_1 / (Float64(c * abs(Float64(x * s))) ^ 2.0)); else tmp = Float64(1.0 / Float64(Float64(t_0 * t_0) / t_1)); end return tmp end
x = abs(x)
c = abs(c)
s = abs(s)
c, s = num2cell(sort([c, s])){:}
function tmp_2 = code(x, c, s)
t_0 = s * (x * c);
t_1 = cos((x * 2.0));
tmp = 0.0;
if (x <= 5e-6)
tmp = t_1 / ((c * abs((x * s))) ^ 2.0);
else
tmp = 1.0 / ((t_0 * t_0) / t_1);
end
tmp_2 = tmp;
end
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
code[x_, c_, s_] := Block[{t$95$0 = N[(s * N[(x * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, 5e-6], N[(t$95$1 / N[Power[N[(c * N[Abs[N[(x * s), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(t$95$0 * t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
x = |x|\\
c = |c|\\
s = |s|\\
[c, s] = \mathsf{sort}([c, s])\\
\\
\begin{array}{l}
t_0 := s \cdot \left(x \cdot c\right)\\
t_1 := \cos \left(x \cdot 2\right)\\
\mathbf{if}\;x \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\frac{t_1}{{\left(c \cdot \left|x \cdot s\right|\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{t_0 \cdot t_0}{t_1}}\\
\end{array}
\end{array}
if x < 5.00000000000000041e-6Initial program 62.3%
Taylor expanded in c around 0 55.6%
*-commutative55.6%
unpow255.6%
unpow255.6%
swap-sqr75.8%
unpow275.8%
unpow275.8%
rem-square-sqrt75.8%
swap-sqr82.8%
unpow282.8%
unpow282.8%
rem-sqrt-square96.8%
*-commutative96.8%
Simplified96.8%
if 5.00000000000000041e-6 < x Initial program 62.5%
clear-num62.5%
associate-/r/62.5%
associate-/r*62.4%
pow-flip62.5%
metadata-eval62.5%
*-commutative62.5%
associate-*r*53.7%
unpow253.7%
pow-prod-down77.7%
Applied egg-rr77.7%
Applied egg-rr96.4%
pow296.4%
Applied egg-rr96.4%
Final simplification96.7%
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
(FPCore (x c s)
:precision binary64
(let* ((t_0 (* s (* x c))) (t_1 (* c (* x s))))
(if (<= x 2e-35)
(/ 1.0 (* t_1 t_1))
(/ 1.0 (/ (* t_0 t_0) (cos (* x 2.0)))))))x = abs(x);
c = abs(c);
s = abs(s);
assert(c < s);
double code(double x, double c, double s) {
double t_0 = s * (x * c);
double t_1 = c * (x * s);
double tmp;
if (x <= 2e-35) {
tmp = 1.0 / (t_1 * t_1);
} else {
tmp = 1.0 / ((t_0 * t_0) / cos((x * 2.0)));
}
return tmp;
}
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = s * (x * c)
t_1 = c * (x * s)
if (x <= 2d-35) then
tmp = 1.0d0 / (t_1 * t_1)
else
tmp = 1.0d0 / ((t_0 * t_0) / cos((x * 2.0d0)))
end if
code = tmp
end function
x = Math.abs(x);
c = Math.abs(c);
s = Math.abs(s);
assert c < s;
public static double code(double x, double c, double s) {
double t_0 = s * (x * c);
double t_1 = c * (x * s);
double tmp;
if (x <= 2e-35) {
tmp = 1.0 / (t_1 * t_1);
} else {
tmp = 1.0 / ((t_0 * t_0) / Math.cos((x * 2.0)));
}
return tmp;
}
x = abs(x) c = abs(c) s = abs(s) [c, s] = sort([c, s]) def code(x, c, s): t_0 = s * (x * c) t_1 = c * (x * s) tmp = 0 if x <= 2e-35: tmp = 1.0 / (t_1 * t_1) else: tmp = 1.0 / ((t_0 * t_0) / math.cos((x * 2.0))) return tmp
x = abs(x) c = abs(c) s = abs(s) c, s = sort([c, s]) function code(x, c, s) t_0 = Float64(s * Float64(x * c)) t_1 = Float64(c * Float64(x * s)) tmp = 0.0 if (x <= 2e-35) tmp = Float64(1.0 / Float64(t_1 * t_1)); else tmp = Float64(1.0 / Float64(Float64(t_0 * t_0) / cos(Float64(x * 2.0)))); end return tmp end
x = abs(x)
c = abs(c)
s = abs(s)
c, s = num2cell(sort([c, s])){:}
function tmp_2 = code(x, c, s)
t_0 = s * (x * c);
t_1 = c * (x * s);
tmp = 0.0;
if (x <= 2e-35)
tmp = 1.0 / (t_1 * t_1);
else
tmp = 1.0 / ((t_0 * t_0) / cos((x * 2.0)));
end
tmp_2 = tmp;
end
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
code[x_, c_, s_] := Block[{t$95$0 = N[(s * N[(x * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c * N[(x * s), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2e-35], N[(1.0 / N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[Cos[N[(x * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
x = |x|\\
c = |c|\\
s = |s|\\
[c, s] = \mathsf{sort}([c, s])\\
\\
\begin{array}{l}
t_0 := s \cdot \left(x \cdot c\right)\\
t_1 := c \cdot \left(x \cdot s\right)\\
\mathbf{if}\;x \leq 2 \cdot 10^{-35}:\\
\;\;\;\;\frac{1}{t_1 \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{t_0 \cdot t_0}{\cos \left(x \cdot 2\right)}}\\
\end{array}
\end{array}
if x < 2.00000000000000002e-35Initial program 61.8%
Taylor expanded in x around 0 52.5%
associate-/r*52.5%
*-commutative52.5%
unpow252.5%
unpow252.5%
swap-sqr69.1%
unpow269.1%
associate-/r*69.6%
rem-square-sqrt69.6%
unpow269.6%
swap-sqr75.1%
unpow275.1%
unpow275.1%
rem-sqrt-square85.4%
*-commutative85.4%
Simplified85.4%
*-commutative85.4%
unpow-prod-down69.6%
add-sqr-sqrt44.1%
fabs-sqr44.1%
add-sqr-sqrt69.6%
pow169.6%
metadata-eval69.6%
sqrt-pow169.6%
pow269.6%
pow269.6%
swap-sqr75.1%
sqrt-pow155.3%
metadata-eval55.3%
pow155.3%
associate-*l*55.3%
sqrt-pow184.6%
metadata-eval84.6%
pow184.6%
associate-*l*85.9%
Applied egg-rr85.9%
Taylor expanded in s around 0 84.6%
Taylor expanded in s around 0 85.4%
if 2.00000000000000002e-35 < x Initial program 63.9%
clear-num63.9%
associate-/r/63.9%
associate-/r*63.8%
pow-flip63.9%
metadata-eval63.9%
*-commutative63.9%
associate-*r*56.7%
unpow256.7%
pow-prod-down76.3%
Applied egg-rr76.3%
Applied egg-rr96.9%
pow296.9%
Applied egg-rr96.9%
Final simplification88.6%
NOTE: x should be positive before calling this function NOTE: c should be positive before calling this function NOTE: s should be positive before calling this function NOTE: c and s should be sorted in increasing order before calling this function. (FPCore (x c s) :precision binary64 (let* ((t_0 (* s (* x c))) (t_1 (* c (* x s)))) (if (<= x 2e-35) (/ 1.0 (* t_1 t_1)) (/ (cos (* x 2.0)) (* t_0 t_0)))))
x = abs(x);
c = abs(c);
s = abs(s);
assert(c < s);
double code(double x, double c, double s) {
double t_0 = s * (x * c);
double t_1 = c * (x * s);
double tmp;
if (x <= 2e-35) {
tmp = 1.0 / (t_1 * t_1);
} else {
tmp = cos((x * 2.0)) / (t_0 * t_0);
}
return tmp;
}
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = s * (x * c)
t_1 = c * (x * s)
if (x <= 2d-35) then
tmp = 1.0d0 / (t_1 * t_1)
else
tmp = cos((x * 2.0d0)) / (t_0 * t_0)
end if
code = tmp
end function
x = Math.abs(x);
c = Math.abs(c);
s = Math.abs(s);
assert c < s;
public static double code(double x, double c, double s) {
double t_0 = s * (x * c);
double t_1 = c * (x * s);
double tmp;
if (x <= 2e-35) {
tmp = 1.0 / (t_1 * t_1);
} else {
tmp = Math.cos((x * 2.0)) / (t_0 * t_0);
}
return tmp;
}
x = abs(x) c = abs(c) s = abs(s) [c, s] = sort([c, s]) def code(x, c, s): t_0 = s * (x * c) t_1 = c * (x * s) tmp = 0 if x <= 2e-35: tmp = 1.0 / (t_1 * t_1) else: tmp = math.cos((x * 2.0)) / (t_0 * t_0) return tmp
x = abs(x) c = abs(c) s = abs(s) c, s = sort([c, s]) function code(x, c, s) t_0 = Float64(s * Float64(x * c)) t_1 = Float64(c * Float64(x * s)) tmp = 0.0 if (x <= 2e-35) tmp = Float64(1.0 / Float64(t_1 * t_1)); else tmp = Float64(cos(Float64(x * 2.0)) / Float64(t_0 * t_0)); end return tmp end
x = abs(x)
c = abs(c)
s = abs(s)
c, s = num2cell(sort([c, s])){:}
function tmp_2 = code(x, c, s)
t_0 = s * (x * c);
t_1 = c * (x * s);
tmp = 0.0;
if (x <= 2e-35)
tmp = 1.0 / (t_1 * t_1);
else
tmp = cos((x * 2.0)) / (t_0 * t_0);
end
tmp_2 = tmp;
end
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
code[x_, c_, s_] := Block[{t$95$0 = N[(s * N[(x * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(c * N[(x * s), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2e-35], N[(1.0 / N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(x * 2.0), $MachinePrecision]], $MachinePrecision] / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
x = |x|\\
c = |c|\\
s = |s|\\
[c, s] = \mathsf{sort}([c, s])\\
\\
\begin{array}{l}
t_0 := s \cdot \left(x \cdot c\right)\\
t_1 := c \cdot \left(x \cdot s\right)\\
\mathbf{if}\;x \leq 2 \cdot 10^{-35}:\\
\;\;\;\;\frac{1}{t_1 \cdot t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\cos \left(x \cdot 2\right)}{t_0 \cdot t_0}\\
\end{array}
\end{array}
if x < 2.00000000000000002e-35Initial program 61.8%
Taylor expanded in x around 0 52.5%
associate-/r*52.5%
*-commutative52.5%
unpow252.5%
unpow252.5%
swap-sqr69.1%
unpow269.1%
associate-/r*69.6%
rem-square-sqrt69.6%
unpow269.6%
swap-sqr75.1%
unpow275.1%
unpow275.1%
rem-sqrt-square85.4%
*-commutative85.4%
Simplified85.4%
*-commutative85.4%
unpow-prod-down69.6%
add-sqr-sqrt44.1%
fabs-sqr44.1%
add-sqr-sqrt69.6%
pow169.6%
metadata-eval69.6%
sqrt-pow169.6%
pow269.6%
pow269.6%
swap-sqr75.1%
sqrt-pow155.3%
metadata-eval55.3%
pow155.3%
associate-*l*55.3%
sqrt-pow184.6%
metadata-eval84.6%
pow184.6%
associate-*l*85.9%
Applied egg-rr85.9%
Taylor expanded in s around 0 84.6%
Taylor expanded in s around 0 85.4%
if 2.00000000000000002e-35 < x Initial program 63.9%
Taylor expanded in c around 0 56.6%
*-commutative56.6%
unpow256.6%
unpow256.6%
swap-sqr76.3%
unpow276.3%
unpow276.3%
rem-square-sqrt76.3%
swap-sqr83.7%
unpow283.7%
unpow283.7%
rem-sqrt-square97.2%
*-commutative97.2%
Simplified97.2%
*-commutative73.2%
unpow-prod-down63.8%
add-sqr-sqrt23.7%
fabs-sqr23.7%
add-sqr-sqrt63.8%
pow163.8%
metadata-eval63.8%
sqrt-pow163.8%
pow263.8%
pow263.8%
swap-sqr68.8%
sqrt-pow154.8%
metadata-eval54.8%
pow154.8%
associate-*l*54.2%
sqrt-pow173.0%
metadata-eval73.0%
pow173.0%
associate-*l*73.4%
Applied egg-rr97.0%
Final simplification88.6%
NOTE: x should be positive before calling this function NOTE: c should be positive before calling this function NOTE: s should be positive before calling this function NOTE: c and s should be sorted in increasing order before calling this function. (FPCore (x c s) :precision binary64 (let* ((t_0 (* c (* x s)))) (/ 1.0 (* t_0 t_0))))
x = abs(x);
c = abs(c);
s = abs(s);
assert(c < s);
double code(double x, double c, double s) {
double t_0 = c * (x * s);
return 1.0 / (t_0 * t_0);
}
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
real(8) function code(x, c, s)
real(8), intent (in) :: x
real(8), intent (in) :: c
real(8), intent (in) :: s
real(8) :: t_0
t_0 = c * (x * s)
code = 1.0d0 / (t_0 * t_0)
end function
x = Math.abs(x);
c = Math.abs(c);
s = Math.abs(s);
assert c < s;
public static double code(double x, double c, double s) {
double t_0 = c * (x * s);
return 1.0 / (t_0 * t_0);
}
x = abs(x) c = abs(c) s = abs(s) [c, s] = sort([c, s]) def code(x, c, s): t_0 = c * (x * s) return 1.0 / (t_0 * t_0)
x = abs(x) c = abs(c) s = abs(s) c, s = sort([c, s]) function code(x, c, s) t_0 = Float64(c * Float64(x * s)) return Float64(1.0 / Float64(t_0 * t_0)) end
x = abs(x)
c = abs(c)
s = abs(s)
c, s = num2cell(sort([c, s])){:}
function tmp = code(x, c, s)
t_0 = c * (x * s);
tmp = 1.0 / (t_0 * t_0);
end
NOTE: x should be positive before calling this function
NOTE: c should be positive before calling this function
NOTE: s should be positive before calling this function
NOTE: c and s should be sorted in increasing order before calling this function.
code[x_, c_, s_] := Block[{t$95$0 = N[(c * N[(x * s), $MachinePrecision]), $MachinePrecision]}, N[(1.0 / N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x = |x|\\
c = |c|\\
s = |s|\\
[c, s] = \mathsf{sort}([c, s])\\
\\
\begin{array}{l}
t_0 := c \cdot \left(x \cdot s\right)\\
\frac{1}{t_0 \cdot t_0}
\end{array}
\end{array}
Initial program 62.4%
Taylor expanded in x around 0 52.5%
associate-/r*52.5%
*-commutative52.5%
unpow252.5%
unpow252.5%
swap-sqr67.7%
unpow267.7%
associate-/r*68.0%
rem-square-sqrt68.0%
unpow268.0%
swap-sqr73.4%
unpow273.4%
unpow273.4%
rem-sqrt-square82.0%
*-commutative82.0%
Simplified82.0%
*-commutative82.0%
unpow-prod-down68.0%
add-sqr-sqrt38.4%
fabs-sqr38.4%
add-sqr-sqrt68.0%
pow168.0%
metadata-eval68.0%
sqrt-pow168.0%
pow268.0%
pow268.0%
swap-sqr73.4%
sqrt-pow155.1%
metadata-eval55.1%
pow155.1%
associate-*l*55.0%
sqrt-pow181.4%
metadata-eval81.4%
pow181.4%
associate-*l*82.4%
Applied egg-rr82.4%
Taylor expanded in s around 0 81.4%
Taylor expanded in s around 0 82.0%
Final simplification82.0%
herbie shell --seed 2023318
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))