?

Average Accuracy: 42.9% → 42.9%
Time: 19.2s
Precision: binary64
Cost: 91264

?

\[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
\[\begin{array}{l} t_0 := \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\\ t_1 := \sqrt[3]{t_0}\\ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(t_1 \cdot {\left(t_0 \cdot t_1\right)}^{2}\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
  (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)))
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (cbrt (* 0.005555555555555556 (* angle PI)))) (t_1 (cbrt t_0)))
   (+
    (pow (* a (sin (* (/ angle 180.0) PI))) 2.0)
    (pow (* b (cos (* t_1 (pow (* t_0 t_1) 2.0)))) 2.0))))
double code(double a, double b, double angle) {
	return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos(((angle / 180.0) * ((double) M_PI)))), 2.0);
}
double code(double a, double b, double angle) {
	double t_0 = cbrt((0.005555555555555556 * (angle * ((double) M_PI))));
	double t_1 = cbrt(t_0);
	return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow((b * cos((t_1 * pow((t_0 * t_1), 2.0)))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos(((angle / 180.0) * Math.PI))), 2.0);
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.cbrt((0.005555555555555556 * (angle * Math.PI)));
	double t_1 = Math.cbrt(t_0);
	return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow((b * Math.cos((t_1 * Math.pow((t_0 * t_1), 2.0)))), 2.0);
}
function code(a, b, angle)
	return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(Float64(angle / 180.0) * pi))) ^ 2.0))
end
function code(a, b, angle)
	t_0 = cbrt(Float64(0.005555555555555556 * Float64(angle * pi)))
	t_1 = cbrt(t_0)
	return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (Float64(b * cos(Float64(t_1 * (Float64(t_0 * t_1) ^ 2.0)))) ^ 2.0))
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
code[a_, b_, angle_] := Block[{t$95$0 = N[Power[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 1/3], $MachinePrecision]}, N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(t$95$1 * N[Power[N[(t$95$0 * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}
\begin{array}{l}
t_0 := \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\\
t_1 := \sqrt[3]{t_0}\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(t_1 \cdot {\left(t_0 \cdot t_1\right)}^{2}\right)\right)}^{2}
\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 42.9%

    \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
  2. Applied egg-rr42.9%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left({\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right)}^{3}\right)}\right)}^{2} \]
    Proof

    [Start]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]

    add-cube-cbrt [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\left(\sqrt[3]{\frac{angle}{180} \cdot \pi} \cdot \sqrt[3]{\frac{angle}{180} \cdot \pi}\right) \cdot \sqrt[3]{\frac{angle}{180} \cdot \pi}\right)}\right)}^{2} \]

    pow3 [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\frac{angle}{180} \cdot \pi}\right)}^{3}\right)}\right)}^{2} \]

    div-inv [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt[3]{\color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \pi}\right)}^{3}\right)\right)}^{2} \]

    associate-*l* [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt[3]{\color{blue}{angle \cdot \left(\frac{1}{180} \cdot \pi\right)}}\right)}^{3}\right)\right)}^{2} \]

    metadata-eval [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(\color{blue}{0.005555555555555556} \cdot \pi\right)}\right)}^{3}\right)\right)}^{2} \]
  3. Applied egg-rr42.9%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(\pi \cdot angle\right)} \cdot \sqrt[3]{\sqrt[3]{0.005555555555555556 \cdot \left(\pi \cdot angle\right)}}\right)}^{2} \cdot \sqrt[3]{\sqrt[3]{0.005555555555555556 \cdot \left(\pi \cdot angle\right)}}\right)}\right)}^{2} \]
    Proof

    [Start]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right)}^{3}\right)\right)}^{2} \]

    unpow3 [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)} \cdot \sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right) \cdot \sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right)}\right)}^{2} \]

    add-cube-cbrt [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)} \cdot \sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right) \cdot \color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}} \cdot \sqrt[3]{\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}}\right) \cdot \sqrt[3]{\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}}\right)}\right)\right)}^{2} \]

    associate-*r* [=>]42.9

    \[ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\left(\left(\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)} \cdot \sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right) \cdot \left(\sqrt[3]{\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}} \cdot \sqrt[3]{\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}}\right)\right) \cdot \sqrt[3]{\sqrt[3]{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}}\right)}\right)}^{2} \]
  4. Final simplification42.9%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\sqrt[3]{\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}} \cdot {\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)} \cdot \sqrt[3]{\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}}\right)}^{2}\right)\right)}^{2} \]

Alternatives

Alternative 1
Accuracy42.9%
Cost39360
\[{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} \]
Alternative 2
Accuracy42.9%
Cost39360
\[\begin{array}{l} t_0 := \frac{angle}{180} \cdot \pi\\ {\left(a \cdot \sin t_0\right)}^{2} + {\left(b \cdot \cos t_0\right)}^{2} \end{array} \]
Alternative 3
Accuracy42.9%
Cost39360
\[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
Alternative 4
Accuracy42.9%
Cost26240
\[{\left(a \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2} + {b}^{2} \]
Alternative 5
Accuracy42.9%
Cost26240
\[{b}^{2} + {\left(a \cdot \sin \left(angle \cdot \frac{\pi}{180}\right)\right)}^{2} \]
Alternative 6
Accuracy42.9%
Cost26240
\[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {b}^{2} \]
Alternative 7
Accuracy41.3%
Cost20361
\[\begin{array}{l} \mathbf{if}\;angle \leq -1.12 \cdot 10^{-8} \lor \neg \left(angle \leq 4.2 \cdot 10^{+23}\right):\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;{b}^{2} + \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\left(a \cdot angle\right) \cdot \left(a \cdot angle\right)\right)\right) \cdot {\pi}^{2}\\ \end{array} \]
Alternative 8
Accuracy41.3%
Cost20041
\[\begin{array}{l} \mathbf{if}\;angle \leq -1.1 \cdot 10^{-8} \lor \neg \left(angle \leq 29000000000000\right):\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(3.08641975308642 \cdot 10^{-5}, {\left(angle \cdot \left(a \cdot \pi\right)\right)}^{2}, b \cdot b\right)\\ \end{array} \]
Alternative 9
Accuracy41.3%
Cost20041
\[\begin{array}{l} \mathbf{if}\;angle \leq -1.12 \cdot 10^{-8} \lor \neg \left(angle \leq 10^{+17}\right):\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left({\left(\pi \cdot \left(a \cdot angle\right)\right)}^{2}, 3.08641975308642 \cdot 10^{-5}, b \cdot b\right)\\ \end{array} \]
Alternative 10
Accuracy41.4%
Cost19977
\[\begin{array}{l} \mathbf{if}\;angle \leq -1.12 \cdot 10^{-8} \lor \neg \left(angle \leq 8.8 \cdot 10^{+15}\right):\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(b, \pi \cdot \left(a \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{2}\\ \end{array} \]
Alternative 11
Accuracy41.4%
Cost19977
\[\begin{array}{l} \mathbf{if}\;angle \leq -1.12 \cdot 10^{-8} \lor \neg \left(angle \leq 8.3 \cdot 10^{+18}\right):\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;{\left(\mathsf{hypot}\left(b, 0.005555555555555556 \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right)\right)}^{2}\\ \end{array} \]
Alternative 12
Accuracy31.8%
Cost192
\[b \cdot b \]

Error

Reproduce?

herbie shell --seed 2023153 
(FPCore (a b angle)
  :name "ab-angle->ABCF A"
  :precision binary64
  (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow (* b (cos (* (/ angle 180.0) PI))) 2.0)))