ab-angle->ABCF C

Percentage Accurate: 80.0% → 79.9%
Time: 28.3s
Alternatives: 14
Speedup: 1.0×

Specification

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t_0\right)}^{2} + {\left(b \cdot \sin t_0\right)}^{2}
\end{array}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 80.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \cos t_0\right)}^{2} + {\left(b \cdot \sin t_0\right)}^{2}
\end{array}
\end{array}

Alternative 1: 79.9% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\\
{\left(a \cdot \cos \left(t_0 \cdot {\left({\left(\sqrt[3]{t_0}\right)}^{2}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Step-by-step derivation
    1. add-cube-cbrt84.1%

      \[\leadsto {\left(a \cdot \cos \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)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. pow384.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. pow-to-exp41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\log \left(\sqrt[3]{\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}}\right) \cdot 3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. metadata-eval41.9%

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

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  4. Step-by-step derivation
    1. pow-to-exp84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. rem-cube-cbrt84.2%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. add-exp-log41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. *-un-lft-identity41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. exp-prod41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. metadata-eval41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  5. Applied egg-rr41.9%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Step-by-step derivation
    1. pow-exp41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{1 \cdot \log \left(\pi \cdot \frac{angle}{180}\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. *-un-lft-identity41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\color{blue}{\log \left(\pi \cdot \frac{angle}{180}\right)}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. add-exp-log84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. rem-cube-cbrt84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. add-exp-log41.7%

      \[\leadsto {\left(a \cdot \cos \left({\left(\sqrt[3]{\color{blue}{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. add-cube-cbrt41.7%

      \[\leadsto {\left(a \cdot \cos \left({\color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}} \cdot \sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right) \cdot \sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}}^{3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. unpow-prod-down41.7%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}} \cdot \sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}^{3} \cdot {\left(\sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  7. Applied egg-rr84.3%

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

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

Alternative 2: 41.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\\
{\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left(t_0 \cdot {\left(\sqrt{\sqrt[3]{t_0}}\right)}^{12}\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Step-by-step derivation
    1. add-cube-cbrt84.1%

      \[\leadsto {\left(a \cdot \cos \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)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. pow384.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. pow-to-exp41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\log \left(\sqrt[3]{\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}}\right) \cdot 3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. metadata-eval41.9%

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

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  4. Step-by-step derivation
    1. pow-to-exp84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. rem-cube-cbrt84.2%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. add-exp-log41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. *-un-lft-identity41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. exp-prod41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. metadata-eval41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  5. Applied egg-rr41.9%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Step-by-step derivation
    1. pow-exp41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{1 \cdot \log \left(\pi \cdot \frac{angle}{180}\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. *-un-lft-identity41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\color{blue}{\log \left(\pi \cdot \frac{angle}{180}\right)}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. add-exp-log84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. rem-cube-cbrt84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. add-exp-log41.7%

      \[\leadsto {\left(a \cdot \cos \left({\left(\sqrt[3]{\color{blue}{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. add-cube-cbrt41.7%

      \[\leadsto {\left(a \cdot \cos \left({\color{blue}{\left(\left(\sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}} \cdot \sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right) \cdot \sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}}^{3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. unpow-prod-down41.7%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}} \cdot \sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}^{3} \cdot {\left(\sqrt[3]{\sqrt[3]{e^{\log \left(\pi \cdot \frac{angle}{180}\right)}}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  7. Applied egg-rr84.3%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left({\left(\sqrt[3]{\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}\right)}^{2}\right)}^{3} \cdot \sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  8. Step-by-step derivation
    1. pow-pow84.1%

      \[\leadsto {\left(a \cdot \cos \left(\color{blue}{{\left(\sqrt[3]{\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}\right)}^{\left(2 \cdot 3\right)}} \cdot \sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. add-sqr-sqrt41.8%

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

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

      \[\leadsto {\left(a \cdot \cos \left(\left({\left(\sqrt{\sqrt[3]{\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}}\right)}^{\color{blue}{6}} \cdot {\left(\sqrt{\sqrt[3]{\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}}\right)}^{\left(2 \cdot 3\right)}\right) \cdot \sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. metadata-eval41.9%

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

    \[\leadsto {\left(a \cdot \cos \left(\color{blue}{\left({\left(\sqrt{\sqrt[3]{\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}}\right)}^{6} \cdot {\left(\sqrt{\sqrt[3]{\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}}\right)}^{6}\right)} \cdot \sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  10. Step-by-step derivation
    1. pow-sqr41.9%

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

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

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

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

Alternative 3: 41.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\left(2 \cdot \log \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow (* b (sin (* PI (/ angle 180.0)))) 2.0)
  (pow
   (*
    a
    (cos (pow (exp 0.5) (* 2.0 (log (* 0.005555555555555556 (* PI angle)))))))
   2.0)))
double code(double a, double b, double angle) {
	return pow((b * sin((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((a * cos(pow(exp(0.5), (2.0 * log((0.005555555555555556 * (((double) M_PI) * angle))))))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((b * Math.sin((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((a * Math.cos(Math.pow(Math.exp(0.5), (2.0 * Math.log((0.005555555555555556 * (Math.PI * angle))))))), 2.0);
}
def code(a, b, angle):
	return math.pow((b * math.sin((math.pi * (angle / 180.0)))), 2.0) + math.pow((a * math.cos(math.pow(math.exp(0.5), (2.0 * math.log((0.005555555555555556 * (math.pi * angle))))))), 2.0)
function code(a, b, angle)
	return Float64((Float64(b * sin(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(a * cos((exp(0.5) ^ Float64(2.0 * log(Float64(0.005555555555555556 * Float64(pi * angle))))))) ^ 2.0))
end
function tmp = code(a, b, angle)
	tmp = ((b * sin((pi * (angle / 180.0)))) ^ 2.0) + ((a * cos((exp(0.5) ^ (2.0 * log((0.005555555555555556 * (pi * angle))))))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[Power[N[Exp[0.5], $MachinePrecision], N[(2.0 * N[Log[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\left(2 \cdot \log \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Step-by-step derivation
    1. add-cube-cbrt84.1%

      \[\leadsto {\left(a \cdot \cos \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)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. pow384.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. pow-to-exp41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\log \left(\sqrt[3]{\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}}\right) \cdot 3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. metadata-eval41.9%

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

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  4. Step-by-step derivation
    1. pow-to-exp84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. rem-cube-cbrt84.2%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. add-exp-log41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. *-un-lft-identity41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. exp-prod41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. metadata-eval41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  5. Applied egg-rr41.9%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Step-by-step derivation
    1. add-sqr-sqrt41.8%

      \[\leadsto {\left(a \cdot \cos \left({\color{blue}{\left(\sqrt{e^{1}} \cdot \sqrt{e^{1}}\right)}}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. unpow-prod-down41.8%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. add-exp-log41.8%

      \[\leadsto {\left(a \cdot \cos \left({\color{blue}{\left(e^{\log \left(\sqrt{e^{1}}\right)}\right)}}^{\log \left(\pi \cdot \frac{angle}{180}\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. pow1/241.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{\log \color{blue}{\left({\left(e^{1}\right)}^{0.5}\right)}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. log-pow41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{\color{blue}{0.5 \cdot \log \left(e^{1}\right)}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. add-log-exp41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5 \cdot \color{blue}{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. metadata-eval41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{\color{blue}{0.5}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    8. div-inv41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    9. metadata-eval41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)} \cdot {\left(\sqrt{e^{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    10. add-exp-log41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\color{blue}{\left(e^{\log \left(\sqrt{e^{1}}\right)}\right)}}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    11. pow1/241.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\left(e^{\log \color{blue}{\left({\left(e^{1}\right)}^{0.5}\right)}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    12. log-pow41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\left(e^{\color{blue}{0.5 \cdot \log \left(e^{1}\right)}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    13. add-log-exp41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\left(e^{0.5 \cdot \color{blue}{1}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    14. metadata-eval41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\left(e^{\color{blue}{0.5}}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    15. div-inv41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\left(e^{0.5}\right)}^{\log \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    16. metadata-eval41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  7. Applied egg-rr41.8%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot {\left(e^{0.5}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  8. Step-by-step derivation
    1. pow-sqr41.8%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{0.5}\right)}^{\left(2 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. associate-*r*41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\left(2 \cdot \log \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. *-commutative41.8%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{0.5}\right)}^{\left(2 \cdot \log \color{blue}{\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  9. Simplified41.8%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{0.5}\right)}^{\left(2 \cdot \log \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  10. Final simplification41.8%

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

Alternative 4: 41.1% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
{\left(b \cdot \sin t_0\right)}^{2} + {\left(a \cdot \cos \left({e}^{\log t_0}\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Step-by-step derivation
    1. add-cube-cbrt84.1%

      \[\leadsto {\left(a \cdot \cos \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)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. pow384.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. pow-to-exp41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\log \left(\sqrt[3]{\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}}\right) \cdot 3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. metadata-eval41.9%

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

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right) \cdot 3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  4. Step-by-step derivation
    1. pow-to-exp84.1%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. rem-cube-cbrt84.2%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. add-exp-log41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. *-un-lft-identity41.9%

      \[\leadsto {\left(a \cdot \cos \left(e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. exp-prod41.9%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    6. metadata-eval41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    7. div-inv41.9%

      \[\leadsto {\left(a \cdot \cos \left({\left(e^{1}\right)}^{\log \left(\pi \cdot \color{blue}{\frac{angle}{180}}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  5. Applied egg-rr41.9%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \frac{angle}{180}\right)}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Final simplification41.9%

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

Alternative 5: 79.9% accurate, 0.9× speedup?

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

\\
{\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left(angle \cdot \left(\sqrt[3]{-1.7146776406035666 \cdot 10^{-7}} \cdot \left(-\pi\right)\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Step-by-step derivation
    1. add-cbrt-cube63.3%

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

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left(\left(\left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}^{0.3333333333333333}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. pow349.9%

      \[\leadsto {\left(a \cdot \cos \left({\color{blue}{\left({\left(\pi \cdot \frac{angle}{180}\right)}^{3}\right)}}^{0.3333333333333333}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. div-inv49.9%

      \[\leadsto {\left(a \cdot \cos \left({\left({\left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)}^{3}\right)}^{0.3333333333333333}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    5. metadata-eval49.9%

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

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left({\left({\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}^{3}\right)}^{0.3333333333333333}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  4. Taylor expanded in angle around -inf 84.2%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(-1 \cdot \left(angle \cdot \left(\sqrt[3]{-1.7146776406035666 \cdot 10^{-7}} \cdot \pi\right)\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  5. Step-by-step derivation
    1. associate-*r*84.2%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\left(-1 \cdot angle\right) \cdot \left(\sqrt[3]{-1.7146776406035666 \cdot 10^{-7}} \cdot \pi\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. neg-mul-184.2%

      \[\leadsto {\left(a \cdot \cos \left(\color{blue}{\left(-angle\right)} \cdot \left(\sqrt[3]{-1.7146776406035666 \cdot 10^{-7}} \cdot \pi\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. *-commutative84.2%

      \[\leadsto {\left(a \cdot \cos \left(\left(-angle\right) \cdot \color{blue}{\left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  6. Simplified84.2%

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\left(-angle\right) \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  7. Final simplification84.2%

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

Alternative 6: 80.0% accurate, 1.0× speedup?

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

\\
{\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Taylor expanded in angle around inf 84.0%

    \[\leadsto {\left(a \cdot \color{blue}{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  3. Step-by-step derivation
    1. *-commutative84.0%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. *-commutative84.0%

      \[\leadsto {\left(a \cdot \cos \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. associate-*r*84.2%

      \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  4. Simplified84.2%

    \[\leadsto {\left(a \cdot \color{blue}{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  5. Final simplification84.2%

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

Alternative 7: 80.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow (* b (sin (* PI (/ angle 180.0)))) 2.0)
  (pow (* a (cos (/ PI (/ 180.0 angle)))) 2.0)))
double code(double a, double b, double angle) {
	return pow((b * sin((((double) M_PI) * (angle / 180.0)))), 2.0) + pow((a * cos((((double) M_PI) / (180.0 / angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((b * Math.sin((Math.PI * (angle / 180.0)))), 2.0) + Math.pow((a * Math.cos((Math.PI / (180.0 / angle)))), 2.0);
}
def code(a, b, angle):
	return math.pow((b * math.sin((math.pi * (angle / 180.0)))), 2.0) + math.pow((a * math.cos((math.pi / (180.0 / angle)))), 2.0)
function code(a, b, angle)
	return Float64((Float64(b * sin(Float64(pi * Float64(angle / 180.0)))) ^ 2.0) + (Float64(a * cos(Float64(pi / Float64(180.0 / angle)))) ^ 2.0))
end
function tmp = code(a, b, angle)
	tmp = ((b * sin((pi * (angle / 180.0)))) ^ 2.0) + ((a * cos((pi / (180.0 / angle)))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(a \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Step-by-step derivation
    1. clear-num84.1%

      \[\leadsto {\left(a \cdot \cos \left(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. un-div-inv84.2%

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

    \[\leadsto {\left(a \cdot \cos \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  4. Final simplification84.2%

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

Alternative 8: 80.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ {a}^{2} + {\left(b \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow a 2.0)
  (pow (* b (log1p (expm1 (sin (* PI (* angle 0.005555555555555556)))))) 2.0)))
double code(double a, double b, double angle) {
	return pow(a, 2.0) + pow((b * log1p(expm1(sin((((double) M_PI) * (angle * 0.005555555555555556)))))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow(a, 2.0) + Math.pow((b * Math.log1p(Math.expm1(Math.sin((Math.PI * (angle * 0.005555555555555556)))))), 2.0);
}
def code(a, b, angle):
	return math.pow(a, 2.0) + math.pow((b * math.log1p(math.expm1(math.sin((math.pi * (angle * 0.005555555555555556)))))), 2.0)
function code(a, b, angle)
	return Float64((a ^ 2.0) + (Float64(b * log1p(expm1(sin(Float64(pi * Float64(angle * 0.005555555555555556)))))) ^ 2.0))
end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[Log[1 + N[(Exp[N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{a}^{2} + {\left(b \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Taylor expanded in angle around 0 84.0%

    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  3. Step-by-step derivation
    1. log1p-expm1-u84.1%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}\right)}^{2} \]
    2. div-inv84.1%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right)\right)}^{2} \]
    3. metadata-eval84.1%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)\right)\right)}^{2} \]
  4. Applied egg-rr84.1%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}\right)}^{2} \]
  5. Final simplification84.1%

    \[\leadsto {a}^{2} + {\left(b \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)}^{2} \]

Alternative 9: 80.0% accurate, 1.5× speedup?

\[\begin{array}{l} \\ {a}^{2} + {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow a 2.0) (pow (* b (sin (* 0.005555555555555556 (* PI angle)))) 2.0)))
double code(double a, double b, double angle) {
	return pow(a, 2.0) + pow((b * sin((0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow(a, 2.0) + Math.pow((b * Math.sin((0.005555555555555556 * (Math.PI * angle)))), 2.0);
}
def code(a, b, angle):
	return math.pow(a, 2.0) + math.pow((b * math.sin((0.005555555555555556 * (math.pi * angle)))), 2.0)
function code(a, b, angle)
	return Float64((a ^ 2.0) + (Float64(b * sin(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 2.0))
end
function tmp = code(a, b, angle)
	tmp = (a ^ 2.0) + ((b * sin((0.005555555555555556 * (pi * angle)))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{a}^{2} + {\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Taylor expanded in angle around 0 84.0%

    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  3. Taylor expanded in angle around inf 84.1%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} \]
  4. Final simplification84.1%

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

Alternative 10: 74.3% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.75 \cdot 10^{+207}:\\ \;\;\;\;{a}^{2} + \left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= b 1.75e+207)
   (+
    (pow a 2.0)
    (*
     (* angle 0.005555555555555556)
     (* (* PI b) (* angle (* 0.005555555555555556 (* PI b))))))
   (+ (pow a 2.0) (* (pow (* b (* PI angle)) 2.0) 3.08641975308642e-5))))
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1.75e+207) {
		tmp = pow(a, 2.0) + ((angle * 0.005555555555555556) * ((((double) M_PI) * b) * (angle * (0.005555555555555556 * (((double) M_PI) * b)))));
	} else {
		tmp = pow(a, 2.0) + (pow((b * (((double) M_PI) * angle)), 2.0) * 3.08641975308642e-5);
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1.75e+207) {
		tmp = Math.pow(a, 2.0) + ((angle * 0.005555555555555556) * ((Math.PI * b) * (angle * (0.005555555555555556 * (Math.PI * b)))));
	} else {
		tmp = Math.pow(a, 2.0) + (Math.pow((b * (Math.PI * angle)), 2.0) * 3.08641975308642e-5);
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if b <= 1.75e+207:
		tmp = math.pow(a, 2.0) + ((angle * 0.005555555555555556) * ((math.pi * b) * (angle * (0.005555555555555556 * (math.pi * b)))))
	else:
		tmp = math.pow(a, 2.0) + (math.pow((b * (math.pi * angle)), 2.0) * 3.08641975308642e-5)
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (b <= 1.75e+207)
		tmp = Float64((a ^ 2.0) + Float64(Float64(angle * 0.005555555555555556) * Float64(Float64(pi * b) * Float64(angle * Float64(0.005555555555555556 * Float64(pi * b))))));
	else
		tmp = Float64((a ^ 2.0) + Float64((Float64(b * Float64(pi * angle)) ^ 2.0) * 3.08641975308642e-5));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 1.75e+207)
		tmp = (a ^ 2.0) + ((angle * 0.005555555555555556) * ((pi * b) * (angle * (0.005555555555555556 * (pi * b)))));
	else
		tmp = (a ^ 2.0) + (((b * (pi * angle)) ^ 2.0) * 3.08641975308642e-5);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[b, 1.75e+207], N[(N[Power[a, 2.0], $MachinePrecision] + N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(N[(Pi * b), $MachinePrecision] * N[(angle * N[(0.005555555555555556 * N[(Pi * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(N[Power[N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.75 \cdot 10^{+207}:\\
\;\;\;\;{a}^{2} + \left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;{a}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.75000000000000014e207

    1. Initial program 82.4%

      \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. Taylor expanded in angle around 0 82.3%

      \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. Taylor expanded in angle around 0 75.8%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)}}^{2} \]
    4. Step-by-step derivation
      1. *-commutative75.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right)}^{2} \]
    5. Simplified75.8%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)}}^{2} \]
    6. Step-by-step derivation
      1. unpow275.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)} \]
      2. associate-*r*75.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\pi \cdot b\right)\right)} \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right) \]
      3. *-commutative75.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(\color{blue}{\left(angle \cdot 0.005555555555555556\right)} \cdot \left(\pi \cdot b\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right) \]
      4. metadata-eval75.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(\left(angle \cdot \color{blue}{\frac{1}{180}}\right) \cdot \left(\pi \cdot b\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right) \]
      5. div-inv75.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(\color{blue}{\frac{angle}{180}} \cdot \left(\pi \cdot b\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right) \]
      6. associate-*l*77.1%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{\frac{angle}{180} \cdot \left(\left(\pi \cdot b\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)\right)} \]
      7. div-inv77.1%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \left(\left(\pi \cdot b\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)\right) \]
      8. metadata-eval77.1%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot \color{blue}{0.005555555555555556}\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)\right) \]
      9. associate-*r*77.1%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\pi \cdot b\right)\right)}\right) \]
      10. *-commutative77.1%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(\color{blue}{\left(angle \cdot 0.005555555555555556\right)} \cdot \left(\pi \cdot b\right)\right)\right) \]
      11. associate-*l*77.1%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)}\right) \]
    7. Applied egg-rr77.1%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{\left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)\right)} \]

    if 1.75000000000000014e207 < b

    1. Initial program 99.8%

      \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    2. Taylor expanded in angle around 0 99.8%

      \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
    3. Taylor expanded in angle around 0 99.8%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)}}^{2} \]
    4. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right)}^{2} \]
    5. Simplified99.8%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)}}^{2} \]
    6. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\left(angle \cdot \left(\pi \cdot b\right)\right) \cdot 0.005555555555555556\right)}}^{2} \]
      2. unpow-prod-down99.9%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{{\left(angle \cdot \left(\pi \cdot b\right)\right)}^{2} \cdot {0.005555555555555556}^{2}} \]
      3. *-commutative99.9%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\left(\pi \cdot b\right) \cdot angle\right)}}^{2} \cdot {0.005555555555555556}^{2} \]
      4. *-commutative99.9%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\color{blue}{\left(b \cdot \pi\right)} \cdot angle\right)}^{2} \cdot {0.005555555555555556}^{2} \]
      5. associate-*l*99.9%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(b \cdot \left(\pi \cdot angle\right)\right)}}^{2} \cdot {0.005555555555555556}^{2} \]
      6. metadata-eval99.9%

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot \color{blue}{3.08641975308642 \cdot 10^{-5}} \]
    7. Applied egg-rr99.9%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{{\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.75 \cdot 10^{+207}:\\ \;\;\;\;{a}^{2} + \left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(\pi \cdot b\right) \cdot \left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}\\ \end{array} \]

Alternative 11: 74.8% accurate, 2.0× speedup?

\[\begin{array}{l} \\ {a}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\left(angle \cdot \left(\pi \cdot b\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow a 2.0) (* 3.08641975308642e-5 (pow (* angle (* PI b)) 2.0))))
double code(double a, double b, double angle) {
	return pow(a, 2.0) + (3.08641975308642e-5 * pow((angle * (((double) M_PI) * b)), 2.0));
}
public static double code(double a, double b, double angle) {
	return Math.pow(a, 2.0) + (3.08641975308642e-5 * Math.pow((angle * (Math.PI * b)), 2.0));
}
def code(a, b, angle):
	return math.pow(a, 2.0) + (3.08641975308642e-5 * math.pow((angle * (math.pi * b)), 2.0))
function code(a, b, angle)
	return Float64((a ^ 2.0) + Float64(3.08641975308642e-5 * (Float64(angle * Float64(pi * b)) ^ 2.0)))
end
function tmp = code(a, b, angle)
	tmp = (a ^ 2.0) + (3.08641975308642e-5 * ((angle * (pi * b)) ^ 2.0));
end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[(3.08641975308642e-5 * N[Power[N[(angle * N[(Pi * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{a}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\left(angle \cdot \left(\pi \cdot b\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Taylor expanded in angle around 0 84.0%

    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  3. Taylor expanded in angle around 0 78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)}}^{2} \]
  4. Step-by-step derivation
    1. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right)}^{2} \]
  5. Simplified78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)}}^{2} \]
  6. Taylor expanded in angle around 0 66.0%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{3.08641975308642 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot \left({b}^{2} \cdot {\pi}^{2}\right)\right)} \]
  7. Step-by-step derivation
    1. associate-*r*66.1%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \color{blue}{\left(\left({angle}^{2} \cdot {b}^{2}\right) \cdot {\pi}^{2}\right)} \]
    2. associate-*r*66.0%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \color{blue}{\left({angle}^{2} \cdot \left({b}^{2} \cdot {\pi}^{2}\right)\right)} \]
    3. *-commutative66.0%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \color{blue}{\left(\left({b}^{2} \cdot {\pi}^{2}\right) \cdot {angle}^{2}\right)} \]
    4. associate-*l*66.0%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \color{blue}{\left({b}^{2} \cdot \left({\pi}^{2} \cdot {angle}^{2}\right)\right)} \]
    5. unpow266.0%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \left({\pi}^{2} \cdot {angle}^{2}\right)\right) \]
    6. unpow266.0%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \left(\left(b \cdot b\right) \cdot \left(\color{blue}{\left(\pi \cdot \pi\right)} \cdot {angle}^{2}\right)\right) \]
    7. unpow266.0%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \left(\left(b \cdot b\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \color{blue}{\left(angle \cdot angle\right)}\right)\right) \]
    8. unswap-sqr66.0%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \left(\left(b \cdot b\right) \cdot \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)\right)}\right) \]
    9. swap-sqr78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \color{blue}{\left(\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot \left(\pi \cdot angle\right)\right)\right)} \]
    10. unpow278.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot \color{blue}{{\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2}} \]
    11. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\color{blue}{\left(\left(\pi \cdot angle\right) \cdot b\right)}}^{2} \]
    12. associate-*l*78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\color{blue}{\left(\pi \cdot \left(angle \cdot b\right)\right)}}^{2} \]
  8. Simplified78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{3.08641975308642 \cdot 10^{-5} \cdot {\left(\pi \cdot \left(angle \cdot b\right)\right)}^{2}} \]
  9. Taylor expanded in angle around 0 78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\color{blue}{\left(angle \cdot \left(b \cdot \pi\right)\right)}}^{2} \]
  10. Final simplification78.2%

    \[\leadsto {a}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\left(angle \cdot \left(\pi \cdot b\right)\right)}^{2} \]

Alternative 12: 74.8% accurate, 2.0× speedup?

\[\begin{array}{l} \\ {a}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow a 2.0) (* (pow (* b (* PI angle)) 2.0) 3.08641975308642e-5)))
double code(double a, double b, double angle) {
	return pow(a, 2.0) + (pow((b * (((double) M_PI) * angle)), 2.0) * 3.08641975308642e-5);
}
public static double code(double a, double b, double angle) {
	return Math.pow(a, 2.0) + (Math.pow((b * (Math.PI * angle)), 2.0) * 3.08641975308642e-5);
}
def code(a, b, angle):
	return math.pow(a, 2.0) + (math.pow((b * (math.pi * angle)), 2.0) * 3.08641975308642e-5)
function code(a, b, angle)
	return Float64((a ^ 2.0) + Float64((Float64(b * Float64(pi * angle)) ^ 2.0) * 3.08641975308642e-5))
end
function tmp = code(a, b, angle)
	tmp = (a ^ 2.0) + (((b * (pi * angle)) ^ 2.0) * 3.08641975308642e-5);
end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[(N[Power[N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{a}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Taylor expanded in angle around 0 84.0%

    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  3. Taylor expanded in angle around 0 78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)}}^{2} \]
  4. Step-by-step derivation
    1. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right)}^{2} \]
  5. Simplified78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot b\right)\right)\right)}}^{2} \]
  6. Step-by-step derivation
    1. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\left(angle \cdot \left(\pi \cdot b\right)\right) \cdot 0.005555555555555556\right)}}^{2} \]
    2. unpow-prod-down78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{{\left(angle \cdot \left(\pi \cdot b\right)\right)}^{2} \cdot {0.005555555555555556}^{2}} \]
    3. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\left(\pi \cdot b\right) \cdot angle\right)}}^{2} \cdot {0.005555555555555556}^{2} \]
    4. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\color{blue}{\left(b \cdot \pi\right)} \cdot angle\right)}^{2} \cdot {0.005555555555555556}^{2} \]
    5. associate-*l*78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(b \cdot \left(\pi \cdot angle\right)\right)}}^{2} \cdot {0.005555555555555556}^{2} \]
    6. metadata-eval78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot \color{blue}{3.08641975308642 \cdot 10^{-5}} \]
  7. Applied egg-rr78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{{\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}} \]
  8. Final simplification78.2%

    \[\leadsto {a}^{2} + {\left(b \cdot \left(\pi \cdot angle\right)\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5} \]

Alternative 13: 74.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ {a}^{2} + {\left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow a 2.0) (pow (* angle (* 0.005555555555555556 (* PI b))) 2.0)))
double code(double a, double b, double angle) {
	return pow(a, 2.0) + pow((angle * (0.005555555555555556 * (((double) M_PI) * b))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow(a, 2.0) + Math.pow((angle * (0.005555555555555556 * (Math.PI * b))), 2.0);
}
def code(a, b, angle):
	return math.pow(a, 2.0) + math.pow((angle * (0.005555555555555556 * (math.pi * b))), 2.0)
function code(a, b, angle)
	return Float64((a ^ 2.0) + (Float64(angle * Float64(0.005555555555555556 * Float64(pi * b))) ^ 2.0))
end
function tmp = code(a, b, angle)
	tmp = (a ^ 2.0) + ((angle * (0.005555555555555556 * (pi * b))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(angle * N[(0.005555555555555556 * N[(Pi * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{a}^{2} + {\left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Taylor expanded in angle around 0 84.0%

    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  3. Taylor expanded in angle around 0 78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)}}^{2} \]
  4. Step-by-step derivation
    1. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\left(angle \cdot \left(b \cdot \pi\right)\right) \cdot 0.005555555555555556\right)}}^{2} \]
    2. associate-*l*78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(angle \cdot \left(\left(b \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}}^{2} \]
    3. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(angle \cdot \left(\color{blue}{\left(\pi \cdot b\right)} \cdot 0.005555555555555556\right)\right)}^{2} \]
  5. Simplified78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(angle \cdot \left(\left(\pi \cdot b\right) \cdot 0.005555555555555556\right)\right)}}^{2} \]
  6. Final simplification78.2%

    \[\leadsto {a}^{2} + {\left(angle \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot b\right)\right)\right)}^{2} \]

Alternative 14: 74.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ {a}^{2} + {\left(b \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+ (pow a 2.0) (pow (* b (* angle (* PI 0.005555555555555556))) 2.0)))
double code(double a, double b, double angle) {
	return pow(a, 2.0) + pow((b * (angle * (((double) M_PI) * 0.005555555555555556))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow(a, 2.0) + Math.pow((b * (angle * (Math.PI * 0.005555555555555556))), 2.0);
}
def code(a, b, angle):
	return math.pow(a, 2.0) + math.pow((b * (angle * (math.pi * 0.005555555555555556))), 2.0)
function code(a, b, angle)
	return Float64((a ^ 2.0) + (Float64(b * Float64(angle * Float64(pi * 0.005555555555555556))) ^ 2.0))
end
function tmp = code(a, b, angle)
	tmp = (a ^ 2.0) + ((b * (angle * (pi * 0.005555555555555556))) ^ 2.0);
end
code[a_, b_, angle_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{a}^{2} + {\left(b \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 84.1%

    \[{\left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  2. Taylor expanded in angle around 0 84.0%

    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)}^{2} \]
  3. Taylor expanded in angle around 0 78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} \]
  4. Step-by-step derivation
    1. *-commutative78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}\right)}^{2} \]
    2. associate-*l*78.2%

      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}\right)}^{2} \]
  5. Simplified78.2%

    \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}\right)}^{2} \]
  6. Final simplification78.2%

    \[\leadsto {a}^{2} + {\left(b \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2} \]

Reproduce

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