| Alternative 1 | |
|---|---|
| Accuracy | 64.8% |
| Cost | 52996 |
(FPCore (a b angle) :precision binary64 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))
(FPCore (a b angle)
:precision binary64
(let* ((t_0 (* PI (* 0.005555555555555556 angle)))
(t_1 (sin t_0))
(t_2 (cos t_0))
(t_3 (* angle (* PI 0.005555555555555556))))
(if (<= (- (pow b 2.0) (pow a 2.0)) 5e+198)
(fma
-2.0
(* a (* a (* t_1 t_2)))
(* (cos t_3) (* 2.0 (* (* b b) (sin t_3)))))
(* t_2 (* b (* t_1 (+ b b)))))))double code(double a, double b, double angle) {
return ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle / 180.0)))) * cos((((double) M_PI) * (angle / 180.0)));
}
double code(double a, double b, double angle) {
double t_0 = ((double) M_PI) * (0.005555555555555556 * angle);
double t_1 = sin(t_0);
double t_2 = cos(t_0);
double t_3 = angle * (((double) M_PI) * 0.005555555555555556);
double tmp;
if ((pow(b, 2.0) - pow(a, 2.0)) <= 5e+198) {
tmp = fma(-2.0, (a * (a * (t_1 * t_2))), (cos(t_3) * (2.0 * ((b * b) * sin(t_3)))));
} else {
tmp = t_2 * (b * (t_1 * (b + b)));
}
return tmp;
}
function code(a, b, angle) return Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle / 180.0)))) * cos(Float64(pi * Float64(angle / 180.0)))) end
function code(a, b, angle) t_0 = Float64(pi * Float64(0.005555555555555556 * angle)) t_1 = sin(t_0) t_2 = cos(t_0) t_3 = Float64(angle * Float64(pi * 0.005555555555555556)) tmp = 0.0 if (Float64((b ^ 2.0) - (a ^ 2.0)) <= 5e+198) tmp = fma(-2.0, Float64(a * Float64(a * Float64(t_1 * t_2))), Float64(cos(t_3) * Float64(2.0 * Float64(Float64(b * b) * sin(t_3))))); else tmp = Float64(t_2 * Float64(b * Float64(t_1 * Float64(b + b)))); end return tmp end
code[a_, b_, angle_] := N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], 5e+198], N[(-2.0 * N[(a * N[(a * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Cos[t$95$3], $MachinePrecision] * N[(2.0 * N[(N[(b * b), $MachinePrecision] * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$2 * N[(b * N[(t$95$1 * N[(b + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
\begin{array}{l}
t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\right)\\
t_1 := \sin t_0\\
t_2 := \cos t_0\\
t_3 := angle \cdot \left(\pi \cdot 0.005555555555555556\right)\\
\mathbf{if}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{+198}:\\
\;\;\;\;\mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(t_1 \cdot t_2\right)\right), \cos t_3 \cdot \left(2 \cdot \left(\left(b \cdot b\right) \cdot \sin t_3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \left(b \cdot \left(t_1 \cdot \left(b + b\right)\right)\right)\\
\end{array}
if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 5.00000000000000049e198Initial program 56.4%
Simplified56.4%
[Start]56.4 | \[ \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
\] |
|---|---|
*-commutative [=>]56.4 | \[ \color{blue}{\left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
\] |
associate-*l* [=>]56.4 | \[ \color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}
\] |
unpow2 [=>]56.4 | \[ \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
fma-neg [=>]56.4 | \[ \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(b, b, -{a}^{2}\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
unpow2 [=>]56.4 | \[ \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -\color{blue}{a \cdot a}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
Applied egg-rr55.5%
[Start]56.4 | \[ \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
|---|---|
add-cube-cbrt [=>]55.6 | \[ \sin \color{blue}{\left(\left(\sqrt[3]{\pi \cdot \frac{angle}{180}} \cdot \sqrt[3]{\pi \cdot \frac{angle}{180}}\right) \cdot \sqrt[3]{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
pow3 [=>]55.5 | \[ \sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)} \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
div-inv [=>]55.5 | \[ \sin \left({\left(\sqrt[3]{\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}}\right)}^{3}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
metadata-eval [=>]55.5 | \[ \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)}\right)}^{3}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
Taylor expanded in b around 0 56.4%
Simplified64.5%
[Start]56.4 | \[ 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot {b}^{2}\right)\right) + -2 \cdot \left({a}^{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
|---|---|
+-commutative [=>]56.4 | \[ \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) + 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot {b}^{2}\right)\right)}
\] |
*-commutative [=>]56.4 | \[ -2 \cdot \left({a}^{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) + 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \color{blue}{\left({b}^{2} \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right)
\] |
fma-def [=>]56.4 | \[ \color{blue}{\mathsf{fma}\left(-2, {a}^{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right), 2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left({b}^{2} \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)}
\] |
Taylor expanded in angle around inf 64.5%
Simplified64.6%
[Start]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \left({b}^{2} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)
\] |
|---|---|
associate-*r* [=>]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \color{blue}{\left(\left({b}^{2} \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right)
\] |
associate-*r* [=>]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \left(\left({b}^{2} \cdot \cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
*-commutative [<=]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \left(\left({b}^{2} \cdot \cos \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)}\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
*-commutative [<=]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \left(\color{blue}{\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot {b}^{2}\right)} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
*-commutative [=>]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \left(\left(\cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot {b}^{2}\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
associate-*r* [<=]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \left(\left(\cos \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)} \cdot {b}^{2}\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
associate-*r* [<=]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), 2 \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}\right)
\] |
*-commutative [=>]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot 2}\right)
\] |
associate-*r* [=>]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), \left(\cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot 2\right)
\] |
*-commutative [<=]64.5 | \[ \mathsf{fma}\left(-2, a \cdot \left(a \cdot \left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right), \left(\cos \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot 2\right)
\] |
if 5.00000000000000049e198 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) Initial program 29.7%
Simplified29.7%
[Start]29.7 | \[ \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
\] |
|---|---|
associate-*l* [=>]29.7 | \[ \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}
\] |
unpow2 [=>]29.7 | \[ \left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
unpow2 [=>]29.7 | \[ \left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)
\] |
Taylor expanded in b around inf 29.6%
Simplified29.5%
[Start]29.6 | \[ 2 \cdot \left({b}^{2} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
|---|---|
unpow2 [=>]29.6 | \[ 2 \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\] |
associate-*r* [=>]29.5 | \[ \color{blue}{\left(2 \cdot \left(b \cdot b\right)\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}
\] |
*-commutative [=>]29.5 | \[ \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)}
\] |
associate-*r* [=>]29.5 | \[ \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \color{blue}{\left(\left(2 \cdot b\right) \cdot b\right)}
\] |
Applied egg-rr68.5%
[Start]29.5 | \[ \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)
\] |
|---|---|
add-log-exp [=>]1.1 | \[ \color{blue}{\log \left(e^{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)}\right)}
\] |
*-un-lft-identity [=>]1.1 | \[ \log \color{blue}{\left(1 \cdot e^{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)}\right)}
\] |
log-prod [=>]1.1 | \[ \color{blue}{\log 1 + \log \left(e^{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)}\right)}
\] |
metadata-eval [=>]1.1 | \[ \color{blue}{0} + \log \left(e^{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)}\right)
\] |
add-log-exp [<=]29.5 | \[ 0 + \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)}
\] |
associate-*l* [=>]29.5 | \[ 0 + \color{blue}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)\right)}
\] |
associate-*r* [=>]29.4 | \[ 0 + \cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)\right)
\] |
*-commutative [=>]29.4 | \[ 0 + \cos \color{blue}{\left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(2 \cdot b\right) \cdot b\right)\right)
\] |
associate-*r* [=>]68.3 | \[ 0 + \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \color{blue}{\left(\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot b\right)\right) \cdot b\right)}
\] |
Final simplification65.3%
| Alternative 1 | |
|---|---|
| Accuracy | 64.8% |
| Cost | 52996 |
| Alternative 2 | |
|---|---|
| Accuracy | 64.9% |
| Cost | 39748 |
| Alternative 3 | |
|---|---|
| Accuracy | 60.3% |
| Cost | 26956 |
| Alternative 4 | |
|---|---|
| Accuracy | 58.5% |
| Cost | 13960 |
| Alternative 5 | |
|---|---|
| Accuracy | 58.5% |
| Cost | 13832 |
| Alternative 6 | |
|---|---|
| Accuracy | 52.4% |
| Cost | 7433 |
| Alternative 7 | |
|---|---|
| Accuracy | 52.3% |
| Cost | 7432 |
| Alternative 8 | |
|---|---|
| Accuracy | 48.4% |
| Cost | 7177 |
| Alternative 9 | |
|---|---|
| Accuracy | 48.5% |
| Cost | 7176 |
| Alternative 10 | |
|---|---|
| Accuracy | 48.4% |
| Cost | 7176 |
| Alternative 11 | |
|---|---|
| Accuracy | 32.3% |
| Cost | 6912 |
| Alternative 12 | |
|---|---|
| Accuracy | 36.8% |
| Cost | 6912 |
herbie shell --seed 2023136
(FPCore (a b angle)
:name "ab-angle->ABCF B"
:precision binary64
(* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))