ab-angle->ABCF C

Percentage Accurate: 79.3% → 79.2%
Time: 13.9s
Alternatives: 9
Speedup: 1.3×

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 9 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: 79.3% 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.2% accurate, 0.6× speedup?

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

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

    \[{\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. Simplified81.0%

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

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

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

        \[\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 \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      4. pow381.0%

        \[\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 \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      5. div-inv80.9%

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

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

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

        \[\leadsto {\left(a \cdot \cos \left({\left(\sqrt[3]{\color{blue}{0.005555555555555556 \cdot \left(\pi \cdot angle\right)}}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
    4. Applied egg-rr81.0%

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

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

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

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

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

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

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

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

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

    Alternative 2: 79.1% accurate, 0.7× speedup?

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

      \[{\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. Simplified81.0%

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

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

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

          \[\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 \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        4. pow381.0%

          \[\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 \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        5. div-inv80.9%

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

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

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

          \[\leadsto {\left(a \cdot \cos \left({\left(\sqrt[3]{\color{blue}{0.005555555555555556 \cdot \left(\pi \cdot angle\right)}}\right)}^{3}\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
      4. Applied egg-rr81.0%

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

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

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

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

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

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

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

      Alternative 3: 79.1% accurate, 0.7× speedup?

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

        \[{\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. Simplified81.0%

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

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

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

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

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

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

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

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

            \[\leadsto {\left(a \cdot {\left(\sqrt[3]{\cos \color{blue}{\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}}\right)}^{3}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
        4. Applied egg-rr81.1%

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

          \[\leadsto {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(a \cdot {\left(\sqrt[3]{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}^{3}\right)}^{2} \]
        6. Add Preprocessing

        Alternative 4: 79.1% accurate, 1.0× speedup?

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

          \[{\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. Simplified81.0%

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

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

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

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

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

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

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

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

          Alternative 5: 79.3% accurate, 1.0× speedup?

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

            \[{\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. Simplified81.0%

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

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

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

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

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

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

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

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

                \[\leadsto {\left(a \cdot {\left(\sqrt[3]{\cos \color{blue}{\left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}}\right)}^{3}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
            4. Applied egg-rr81.1%

              \[\leadsto {\left(a \cdot \color{blue}{{\left(\sqrt[3]{\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}^{3}}\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
            5. Applied egg-rr81.0%

              \[\leadsto \color{blue}{1 \cdot {\left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right), a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}^{2}} \]
            6. Step-by-step derivation
              1. *-lft-identity81.0%

                \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right), a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}^{2}} \]
            7. Simplified81.0%

              \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(b \cdot \sin \left(angle \cdot \frac{\pi}{180}\right), a \cdot \cos \left(angle \cdot \frac{\pi}{180}\right)\right)\right)}^{2}} \]
            8. Add Preprocessing

            Alternative 6: 79.1% accurate, 1.0× speedup?

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

              \[{\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. Simplified81.0%

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

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

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

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

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

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

                  \[\leadsto \left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(a \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) + \color{blue}{\left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                7. unpow281.0%

                  \[\leadsto \color{blue}{{\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) \cdot \left(b \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                8. unpow281.0%

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

                \[\leadsto \color{blue}{{\left(\mathsf{hypot}\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)}^{2}} \]
              5. Add Preprocessing

              Alternative 7: 79.3% accurate, 1.3× speedup?

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

                \[{\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. Simplified81.0%

                  \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                2. Add Preprocessing
                3. Taylor expanded in angle around 0 80.9%

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

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

                Alternative 8: 53.5% accurate, 2.0× speedup?

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

                  1. Initial program 81.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. Step-by-step derivation
                    1. Simplified81.4%

                      \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                    2. Add Preprocessing
                    3. Taylor expanded in a around 0 37.4%

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

                        \[\leadsto {b}^{2} \cdot {\sin \left(0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)}^{2} \]
                      2. unpow237.4%

                        \[\leadsto {b}^{2} \cdot \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                      3. unpow237.4%

                        \[\leadsto \color{blue}{\left(b \cdot b\right)} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \]
                      4. swap-sqr41.3%

                        \[\leadsto \color{blue}{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                      5. unpow241.3%

                        \[\leadsto \color{blue}{{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}} \]
                      6. *-commutative41.3%

                        \[\leadsto {\left(b \cdot \sin \left(0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right)\right)}^{2} \]
                    5. Simplified41.3%

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

                    if 1.74999999999999996e-121 < a

                    1. Initial program 80.3%

                      \[{\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. Simplified80.2%

                        \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                      2. Add Preprocessing
                      3. Taylor expanded in angle around 0 71.8%

                        \[\leadsto \color{blue}{{a}^{2}} \]
                      4. Step-by-step derivation
                        1. unpow271.8%

                          \[\leadsto \color{blue}{a \cdot a} \]
                      5. Applied egg-rr71.8%

                        \[\leadsto \color{blue}{a \cdot a} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification52.3%

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

                    Alternative 9: 56.9% accurate, 139.0× speedup?

                    \[\begin{array}{l} \\ a \cdot a \end{array} \]
                    (FPCore (a b angle) :precision binary64 (* a a))
                    double code(double a, double b, double angle) {
                    	return a * a;
                    }
                    
                    real(8) function code(a, b, angle)
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b
                        real(8), intent (in) :: angle
                        code = a * a
                    end function
                    
                    public static double code(double a, double b, double angle) {
                    	return a * a;
                    }
                    
                    def code(a, b, angle):
                    	return a * a
                    
                    function code(a, b, angle)
                    	return Float64(a * a)
                    end
                    
                    function tmp = code(a, b, angle)
                    	tmp = a * a;
                    end
                    
                    code[a_, b_, angle_] := N[(a * a), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    a \cdot a
                    \end{array}
                    
                    Derivation
                    1. Initial program 81.0%

                      \[{\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. Simplified81.0%

                        \[\leadsto \color{blue}{{\left(a \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \]
                      2. Add Preprocessing
                      3. Taylor expanded in angle around 0 62.1%

                        \[\leadsto \color{blue}{{a}^{2}} \]
                      4. Step-by-step derivation
                        1. unpow262.1%

                          \[\leadsto \color{blue}{a \cdot a} \]
                      5. Applied egg-rr62.1%

                        \[\leadsto \color{blue}{a \cdot a} \]
                      6. Add Preprocessing

                      Reproduce

                      ?
                      herbie shell --seed 2024144 
                      (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)))