| Alternative 1 | |
|---|---|
| Error | 2.7 |
| Cost | 13705 |
(FPCore (x c s) :precision binary64 (/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))
(FPCore (x c s)
:precision binary64
(let* ((t_0 (* c (* x s))) (t_1 (cos (+ x x))))
(if (<= x -2e-130)
(* t_1 (pow (* x (* c s)) -2.0))
(if (<= x 4.2e-43)
(pow t_0 -2.0)
(if (<= x 4.5e+115)
(* (/ 1.0 (* (* c s) (* x x))) (/ t_1 (* c s)))
(/ t_1 (* c (* (* x s) t_0))))))))double code(double x, double c, double s) {
return cos((2.0 * x)) / (pow(c, 2.0) * ((x * pow(s, 2.0)) * x));
}
double code(double x, double c, double s) {
double t_0 = c * (x * s);
double t_1 = cos((x + x));
double tmp;
if (x <= -2e-130) {
tmp = t_1 * pow((x * (c * s)), -2.0);
} else if (x <= 4.2e-43) {
tmp = pow(t_0, -2.0);
} else if (x <= 4.5e+115) {
tmp = (1.0 / ((c * s) * (x * x))) * (t_1 / (c * s));
} else {
tmp = t_1 / (c * ((x * s) * t_0));
}
return tmp;
}
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
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 = c * (x * s)
t_1 = cos((x + x))
if (x <= (-2d-130)) then
tmp = t_1 * ((x * (c * s)) ** (-2.0d0))
else if (x <= 4.2d-43) then
tmp = t_0 ** (-2.0d0)
else if (x <= 4.5d+115) then
tmp = (1.0d0 / ((c * s) * (x * x))) * (t_1 / (c * s))
else
tmp = t_1 / (c * ((x * s) * t_0))
end if
code = tmp
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));
}
public static double code(double x, double c, double s) {
double t_0 = c * (x * s);
double t_1 = Math.cos((x + x));
double tmp;
if (x <= -2e-130) {
tmp = t_1 * Math.pow((x * (c * s)), -2.0);
} else if (x <= 4.2e-43) {
tmp = Math.pow(t_0, -2.0);
} else if (x <= 4.5e+115) {
tmp = (1.0 / ((c * s) * (x * x))) * (t_1 / (c * s));
} else {
tmp = t_1 / (c * ((x * s) * t_0));
}
return tmp;
}
def code(x, c, s): return math.cos((2.0 * x)) / (math.pow(c, 2.0) * ((x * math.pow(s, 2.0)) * x))
def code(x, c, s): t_0 = c * (x * s) t_1 = math.cos((x + x)) tmp = 0 if x <= -2e-130: tmp = t_1 * math.pow((x * (c * s)), -2.0) elif x <= 4.2e-43: tmp = math.pow(t_0, -2.0) elif x <= 4.5e+115: tmp = (1.0 / ((c * s) * (x * x))) * (t_1 / (c * s)) else: tmp = t_1 / (c * ((x * s) * t_0)) return tmp
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 code(x, c, s) t_0 = Float64(c * Float64(x * s)) t_1 = cos(Float64(x + x)) tmp = 0.0 if (x <= -2e-130) tmp = Float64(t_1 * (Float64(x * Float64(c * s)) ^ -2.0)); elseif (x <= 4.2e-43) tmp = t_0 ^ -2.0; elseif (x <= 4.5e+115) tmp = Float64(Float64(1.0 / Float64(Float64(c * s) * Float64(x * x))) * Float64(t_1 / Float64(c * s))); else tmp = Float64(t_1 / Float64(c * Float64(Float64(x * s) * t_0))); end return tmp end
function tmp = code(x, c, s) tmp = cos((2.0 * x)) / ((c ^ 2.0) * ((x * (s ^ 2.0)) * x)); end
function tmp_2 = code(x, c, s) t_0 = c * (x * s); t_1 = cos((x + x)); tmp = 0.0; if (x <= -2e-130) tmp = t_1 * ((x * (c * s)) ^ -2.0); elseif (x <= 4.2e-43) tmp = t_0 ^ -2.0; elseif (x <= 4.5e+115) tmp = (1.0 / ((c * s) * (x * x))) * (t_1 / (c * s)); else tmp = t_1 / (c * ((x * s) * t_0)); end tmp_2 = tmp; 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]
code[x_, c_, s_] := Block[{t$95$0 = N[(c * N[(x * s), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(x + x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -2e-130], N[(t$95$1 * N[Power[N[(x * N[(c * s), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e-43], N[Power[t$95$0, -2.0], $MachinePrecision], If[LessEqual[x, 4.5e+115], N[(N[(1.0 / N[(N[(c * s), $MachinePrecision] * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / N[(c * s), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(c * N[(N[(x * s), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\begin{array}{l}
t_0 := c \cdot \left(x \cdot s\right)\\
t_1 := \cos \left(x + x\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{-130}:\\
\;\;\;\;t_1 \cdot {\left(x \cdot \left(c \cdot s\right)\right)}^{-2}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-43}:\\
\;\;\;\;{t_0}^{-2}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+115}:\\
\;\;\;\;\frac{1}{\left(c \cdot s\right) \cdot \left(x \cdot x\right)} \cdot \frac{t_1}{c \cdot s}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{c \cdot \left(\left(x \cdot s\right) \cdot t_0\right)}\\
\end{array}
Results
if x < -2.0000000000000002e-130Initial program 25.3
Simplified1.9
[Start]25.3 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\] |
|---|---|
*-commutative [=>]25.3 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\color{blue}{\left({s}^{2} \cdot x\right)} \cdot x\right)}
\] |
associate-*l* [=>]26.4 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \color{blue}{\left({s}^{2} \cdot \left(x \cdot x\right)\right)}}
\] |
associate-*r* [=>]26.5 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left({c}^{2} \cdot {s}^{2}\right) \cdot \left(x \cdot x\right)}}
\] |
*-commutative [=>]26.5 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot x\right) \cdot \left({c}^{2} \cdot {s}^{2}\right)}}
\] |
unpow2 [=>]26.5 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\color{blue}{\left(c \cdot c\right)} \cdot {s}^{2}\right)}
\] |
unpow2 [=>]26.5 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\left(s \cdot s\right)}\right)}
\] |
unswap-sqr [=>]13.2 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \color{blue}{\left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)}}
\] |
unswap-sqr [=>]1.9 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot \left(c \cdot s\right)\right) \cdot \left(x \cdot \left(c \cdot s\right)\right)}}
\] |
Applied egg-rr1.6
if -2.0000000000000002e-130 < x < 4.2000000000000001e-43Initial program 38.0
Simplified34.9
[Start]38.0 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\] |
|---|---|
associate-*r* [=>]34.9 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left({c}^{2} \cdot \left(x \cdot {s}^{2}\right)\right) \cdot x}}
\] |
unpow2 [=>]34.9 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(\color{blue}{\left(c \cdot c\right)} \cdot \left(x \cdot {s}^{2}\right)\right) \cdot x}
\] |
unpow2 [=>]34.9 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(\left(c \cdot c\right) \cdot \left(x \cdot \color{blue}{\left(s \cdot s\right)}\right)\right) \cdot x}
\] |
Taylor expanded in x around 0 49.3
Simplified28.9
[Start]49.3 | \[ \frac{1}{{s}^{2} \cdot \left({c}^{2} \cdot {x}^{2}\right)}
\] |
|---|---|
associate-*r* [=>]49.3 | \[ \frac{1}{\color{blue}{\left({s}^{2} \cdot {c}^{2}\right) \cdot {x}^{2}}}
\] |
*-commutative [<=]49.3 | \[ \frac{1}{\color{blue}{\left({c}^{2} \cdot {s}^{2}\right)} \cdot {x}^{2}}
\] |
associate-*r* [<=]49.0 | \[ \frac{1}{\color{blue}{{c}^{2} \cdot \left({s}^{2} \cdot {x}^{2}\right)}}
\] |
unpow2 [=>]49.0 | \[ \frac{1}{\color{blue}{\left(c \cdot c\right)} \cdot \left({s}^{2} \cdot {x}^{2}\right)}
\] |
sqr-pow [=>]49.0 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\color{blue}{\left({s}^{\left(\frac{2}{2}\right)} \cdot {s}^{\left(\frac{2}{2}\right)}\right)} \cdot {x}^{2}\right)}
\] |
unpow2 [=>]49.0 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left({s}^{\left(\frac{2}{2}\right)} \cdot {s}^{\left(\frac{2}{2}\right)}\right) \cdot \color{blue}{\left(x \cdot x\right)}\right)}
\] |
unswap-sqr [=>]25.5 | \[ \frac{1}{\left(c \cdot c\right) \cdot \color{blue}{\left(\left({s}^{\left(\frac{2}{2}\right)} \cdot x\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)}}
\] |
metadata-eval [=>]25.5 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left({s}^{\color{blue}{1}} \cdot x\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)}
\] |
unpow1 [=>]25.5 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(\color{blue}{s} \cdot x\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)}
\] |
rem-square-sqrt [<=]39.2 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right) \cdot \left({s}^{\left(\frac{2}{2}\right)} \cdot x\right)\right)}
\] |
metadata-eval [=>]39.2 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right) \cdot \left({s}^{\color{blue}{1}} \cdot x\right)\right)}
\] |
unpow1 [=>]39.2 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right) \cdot \left(\color{blue}{s} \cdot x\right)\right)}
\] |
rem-square-sqrt [<=]39.3 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right) \cdot \left(s \cdot \color{blue}{\left(\sqrt{x} \cdot \sqrt{x}\right)}\right)\right)}
\] |
associate-*l* [<=]39.3 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\color{blue}{\left(\left(s \cdot \sqrt{x}\right) \cdot \sqrt{x}\right)} \cdot \left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right)\right)}
\] |
associate-*l* [<=]39.3 | \[ \frac{1}{\left(c \cdot c\right) \cdot \left(\left(\left(s \cdot \sqrt{x}\right) \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\left(s \cdot \sqrt{x}\right) \cdot \sqrt{x}\right)}\right)}
\] |
Applied egg-rr34.9
Applied egg-rr24.4
Simplified4.5
[Start]24.4 | \[ {\left(\left(c \cdot \left(s \cdot \sqrt{x}\right)\right) \cdot \sqrt{x}\right)}^{-1} \cdot {\left(\left(c \cdot \left(s \cdot \sqrt{x}\right)\right) \cdot \sqrt{x}\right)}^{-1}
\] |
|---|---|
pow-sqr [=>]24.4 | \[ \color{blue}{{\left(\left(c \cdot \left(s \cdot \sqrt{x}\right)\right) \cdot \sqrt{x}\right)}^{\left(2 \cdot -1\right)}}
\] |
associate-*l* [=>]26.3 | \[ {\color{blue}{\left(c \cdot \left(\left(s \cdot \sqrt{x}\right) \cdot \sqrt{x}\right)\right)}}^{\left(2 \cdot -1\right)}
\] |
associate-*l* [=>]26.3 | \[ {\left(c \cdot \color{blue}{\left(s \cdot \left(\sqrt{x} \cdot \sqrt{x}\right)\right)}\right)}^{\left(2 \cdot -1\right)}
\] |
rem-square-sqrt [=>]4.5 | \[ {\left(c \cdot \left(s \cdot \color{blue}{x}\right)\right)}^{\left(2 \cdot -1\right)}
\] |
metadata-eval [=>]4.5 | \[ {\left(c \cdot \left(s \cdot x\right)\right)}^{\color{blue}{-2}}
\] |
if 4.2000000000000001e-43 < x < 4.49999999999999963e115Initial program 22.3
Simplified0.6
[Start]22.3 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\] |
|---|---|
*-commutative [=>]22.3 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\color{blue}{\left({s}^{2} \cdot x\right)} \cdot x\right)}
\] |
associate-*l* [=>]22.3 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \color{blue}{\left({s}^{2} \cdot \left(x \cdot x\right)\right)}}
\] |
associate-*r* [=>]22.6 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left({c}^{2} \cdot {s}^{2}\right) \cdot \left(x \cdot x\right)}}
\] |
*-commutative [=>]22.6 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot x\right) \cdot \left({c}^{2} \cdot {s}^{2}\right)}}
\] |
unpow2 [=>]22.6 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\color{blue}{\left(c \cdot c\right)} \cdot {s}^{2}\right)}
\] |
unpow2 [=>]22.6 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\left(s \cdot s\right)}\right)}
\] |
unswap-sqr [=>]4.8 | \[ \frac{\cos \left(2 \cdot x\right)}{\left(x \cdot x\right) \cdot \color{blue}{\left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)}}
\] |
unswap-sqr [=>]0.6 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left(x \cdot \left(c \cdot s\right)\right) \cdot \left(x \cdot \left(c \cdot s\right)\right)}}
\] |
Applied egg-rr0.4
if 4.49999999999999963e115 < x Initial program 27.8
Simplified14.9
[Start]27.8 | \[ \frac{\cos \left(2 \cdot x\right)}{{c}^{2} \cdot \left(\left(x \cdot {s}^{2}\right) \cdot x\right)}
\] |
|---|---|
associate-*r* [=>]26.0 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{\left({c}^{2} \cdot \left(x \cdot {s}^{2}\right)\right) \cdot x}}
\] |
*-commutative [=>]26.0 | \[ \frac{\cos \left(2 \cdot x\right)}{\color{blue}{x \cdot \left({c}^{2} \cdot \left(x \cdot {s}^{2}\right)\right)}}
\] |
*-commutative [=>]26.0 | \[ \frac{\cos \left(2 \cdot x\right)}{x \cdot \left({c}^{2} \cdot \color{blue}{\left({s}^{2} \cdot x\right)}\right)}
\] |
associate-*r* [=>]28.6 | \[ \frac{\cos \left(2 \cdot x\right)}{x \cdot \color{blue}{\left(\left({c}^{2} \cdot {s}^{2}\right) \cdot x\right)}}
\] |
*-commutative [=>]28.6 | \[ \frac{\cos \left(2 \cdot x\right)}{x \cdot \color{blue}{\left(x \cdot \left({c}^{2} \cdot {s}^{2}\right)\right)}}
\] |
unpow2 [=>]28.6 | \[ \frac{\cos \left(2 \cdot x\right)}{x \cdot \left(x \cdot \left(\color{blue}{\left(c \cdot c\right)} \cdot {s}^{2}\right)\right)}
\] |
unpow2 [=>]28.6 | \[ \frac{\cos \left(2 \cdot x\right)}{x \cdot \left(x \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\left(s \cdot s\right)}\right)\right)}
\] |
unswap-sqr [=>]14.9 | \[ \frac{\cos \left(2 \cdot x\right)}{x \cdot \left(x \cdot \color{blue}{\left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)}\right)}
\] |
Taylor expanded in x around inf 30.7
Simplified2.4
[Start]30.7 | \[ \frac{\cos \left(2 \cdot x\right)}{{s}^{2} \cdot \left({c}^{2} \cdot {x}^{2}\right)}
\] |
|---|---|
count-2 [<=]30.7 | \[ \frac{\cos \color{blue}{\left(x + x\right)}}{{s}^{2} \cdot \left({c}^{2} \cdot {x}^{2}\right)}
\] |
associate-*r* [=>]30.9 | \[ \frac{\cos \left(x + x\right)}{\color{blue}{\left({s}^{2} \cdot {c}^{2}\right) \cdot {x}^{2}}}
\] |
associate-/r* [=>]30.9 | \[ \color{blue}{\frac{\frac{\cos \left(x + x\right)}{{s}^{2} \cdot {c}^{2}}}{{x}^{2}}}
\] |
*-commutative [<=]30.9 | \[ \frac{\frac{\cos \left(x + x\right)}{\color{blue}{{c}^{2} \cdot {s}^{2}}}}{{x}^{2}}
\] |
unpow2 [=>]30.9 | \[ \frac{\frac{\cos \left(x + x\right)}{\color{blue}{\left(c \cdot c\right)} \cdot {s}^{2}}}{{x}^{2}}
\] |
unpow2 [=>]30.9 | \[ \frac{\frac{\cos \left(x + x\right)}{\left(c \cdot c\right) \cdot \color{blue}{\left(s \cdot s\right)}}}{{x}^{2}}
\] |
swap-sqr [<=]21.3 | \[ \frac{\frac{\cos \left(x + x\right)}{\color{blue}{\left(c \cdot s\right) \cdot \left(c \cdot s\right)}}}{{x}^{2}}
\] |
unpow2 [<=]21.3 | \[ \frac{\frac{\cos \left(x + x\right)}{\color{blue}{{\left(c \cdot s\right)}^{2}}}}{{x}^{2}}
\] |
associate-/l/ [=>]21.2 | \[ \color{blue}{\frac{\cos \left(x + x\right)}{{x}^{2} \cdot {\left(c \cdot s\right)}^{2}}}
\] |
unpow2 [=>]21.2 | \[ \frac{\cos \left(x + x\right)}{\color{blue}{\left(x \cdot x\right)} \cdot {\left(c \cdot s\right)}^{2}}
\] |
unpow2 [=>]21.2 | \[ \frac{\cos \left(x + x\right)}{\left(x \cdot x\right) \cdot \color{blue}{\left(\left(c \cdot s\right) \cdot \left(c \cdot s\right)\right)}}
\] |
swap-sqr [<=]2.9 | \[ \frac{\cos \left(x + x\right)}{\color{blue}{\left(x \cdot \left(c \cdot s\right)\right) \cdot \left(x \cdot \left(c \cdot s\right)\right)}}
\] |
unpow2 [<=]2.9 | \[ \frac{\cos \left(x + x\right)}{\color{blue}{{\left(x \cdot \left(c \cdot s\right)\right)}^{2}}}
\] |
*-commutative [=>]2.9 | \[ \frac{\cos \left(x + x\right)}{{\color{blue}{\left(\left(c \cdot s\right) \cdot x\right)}}^{2}}
\] |
associate-*l* [=>]2.4 | \[ \frac{\cos \left(x + x\right)}{{\color{blue}{\left(c \cdot \left(s \cdot x\right)\right)}}^{2}}
\] |
Applied egg-rr4.9
Final simplification2.8
| Alternative 1 | |
|---|---|
| Error | 2.7 |
| Cost | 13705 |
| Alternative 2 | |
|---|---|
| Error | 2.8 |
| Cost | 7884 |
| Alternative 3 | |
|---|---|
| Error | 6.9 |
| Cost | 7625 |
| Alternative 4 | |
|---|---|
| Error | 4.1 |
| Cost | 7625 |
| Alternative 5 | |
|---|---|
| Error | 2.5 |
| Cost | 7625 |
| Alternative 6 | |
|---|---|
| Error | 13.0 |
| Cost | 7624 |
| Alternative 7 | |
|---|---|
| Error | 7.6 |
| Cost | 7624 |
| Alternative 8 | |
|---|---|
| Error | 17.0 |
| Cost | 6784 |
| Alternative 9 | |
|---|---|
| Error | 24.7 |
| Cost | 1228 |
| Alternative 10 | |
|---|---|
| Error | 25.5 |
| Cost | 1097 |
| Alternative 11 | |
|---|---|
| Error | 19.6 |
| Cost | 1097 |
| Alternative 12 | |
|---|---|
| Error | 17.0 |
| Cost | 960 |
| Alternative 13 | |
|---|---|
| Error | 17.0 |
| Cost | 960 |
| Alternative 14 | |
|---|---|
| Error | 27.0 |
| Cost | 832 |
| Alternative 15 | |
|---|---|
| Error | 17.1 |
| Cost | 832 |
herbie shell --seed 2023046
(FPCore (x c s)
:name "mixedcos"
:precision binary64
(/ (cos (* 2.0 x)) (* (pow c 2.0) (* (* x (pow s 2.0)) x))))