ab-angle->ABCF C

Percentage Accurate: 79.2% → 79.2%
Time: 15.3s
Alternatives: 9
Speedup: N/A×

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.2% 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.7× speedup?

\[\begin{array}{l} \\ {\left(a \cdot {\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(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow (* a (pow (cbrt (cos (* 0.005555555555555556 (* PI angle)))) 3.0)) 2.0)
  (pow (* b (sin (* PI (* 0.005555555555555556 angle)))) 2.0)))
double code(double a, double b, double angle) {
	return pow((a * pow(cbrt(cos((0.005555555555555556 * (((double) M_PI) * angle)))), 3.0)), 2.0) + pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle)))), 2.0);
}
public static double code(double a, double b, double angle) {
	return Math.pow((a * Math.pow(Math.cbrt(Math.cos((0.005555555555555556 * (Math.PI * angle)))), 3.0)), 2.0) + Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle)))), 2.0);
}
function code(a, b, angle)
	return Float64((Float64(a * (cbrt(cos(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 3.0)) ^ 2.0) + (Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle)))) ^ 2.0))
end
code[a_, b_, angle_] := N[(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] + N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(a \cdot {\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(0.005555555555555556 \cdot angle\right)\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 79.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. Simplified79.3%

      \[\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-eval79.3%

        \[\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-inv79.4%

        \[\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-cbrt79.4%

        \[\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. pow379.4%

        \[\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-inv79.3%

        \[\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-eval79.3%

        \[\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*79.4%

        \[\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. *-commutative79.4%

        \[\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-rr79.4%

      \[\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 simplification79.4%

      \[\leadsto {\left(a \cdot {\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(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} \]
    6. Add Preprocessing

    Alternative 2: 79.2% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ {\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + a \cdot \left(a \cdot {\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{2}\right) \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (+
      (pow (* b (sin (* PI (* 0.005555555555555556 angle)))) 2.0)
      (* a (* a (pow (cos (* 0.005555555555555556 (* PI angle))) 2.0)))))
    double code(double a, double b, double angle) {
    	return pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle)))), 2.0) + (a * (a * pow(cos((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 * (0.005555555555555556 * angle)))), 2.0) + (a * (a * Math.pow(Math.cos((0.005555555555555556 * (Math.PI * angle))), 2.0)));
    }
    
    def code(a, b, angle):
    	return math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle)))), 2.0) + (a * (a * math.pow(math.cos((0.005555555555555556 * (math.pi * angle))), 2.0)))
    
    function code(a, b, angle)
    	return Float64((Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle)))) ^ 2.0) + Float64(a * Float64(a * (cos(Float64(0.005555555555555556 * Float64(pi * angle))) ^ 2.0))))
    end
    
    function tmp = code(a, b, angle)
    	tmp = ((b * sin((pi * (0.005555555555555556 * angle)))) ^ 2.0) + (a * (a * (cos((0.005555555555555556 * (pi * angle))) ^ 2.0)));
    end
    
    code[a_, b_, angle_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(a * N[(a * N[Power[N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    {\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + a \cdot \left(a \cdot {\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}^{2}\right)
    \end{array}
    
    Derivation
    1. Initial program 79.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. Simplified79.3%

        \[\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-eval79.3%

          \[\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-inv79.4%

          \[\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-cbrt79.4%

          \[\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. pow379.4%

          \[\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-inv79.3%

          \[\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-eval79.3%

          \[\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*79.4%

          \[\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. *-commutative79.4%

          \[\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-rr79.4%

        \[\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. Step-by-step derivation
        1. unpow279.4%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left({\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}^{3} \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} \]
        8. unpow379.1%

          \[\leadsto \left(\color{blue}{\left(\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sqrt[3]{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} \]
        9. add-cube-cbrt79.4%

          \[\leadsto \left(\color{blue}{\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} \]
      6. Applied egg-rr79.4%

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

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

      Alternative 3: 79.2% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ {\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + a \cdot \left(a \cdot \frac{1 + \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)}{2}\right) \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (+
        (pow (* b (sin (* PI (* 0.005555555555555556 angle)))) 2.0)
        (* a (* a (/ (+ 1.0 (cos (* (* PI angle) 0.011111111111111112))) 2.0)))))
      double code(double a, double b, double angle) {
      	return pow((b * sin((((double) M_PI) * (0.005555555555555556 * angle)))), 2.0) + (a * (a * ((1.0 + cos(((((double) M_PI) * angle) * 0.011111111111111112))) / 2.0)));
      }
      
      public static double code(double a, double b, double angle) {
      	return Math.pow((b * Math.sin((Math.PI * (0.005555555555555556 * angle)))), 2.0) + (a * (a * ((1.0 + Math.cos(((Math.PI * angle) * 0.011111111111111112))) / 2.0)));
      }
      
      def code(a, b, angle):
      	return math.pow((b * math.sin((math.pi * (0.005555555555555556 * angle)))), 2.0) + (a * (a * ((1.0 + math.cos(((math.pi * angle) * 0.011111111111111112))) / 2.0)))
      
      function code(a, b, angle)
      	return Float64((Float64(b * sin(Float64(pi * Float64(0.005555555555555556 * angle)))) ^ 2.0) + Float64(a * Float64(a * Float64(Float64(1.0 + cos(Float64(Float64(pi * angle) * 0.011111111111111112))) / 2.0))))
      end
      
      function tmp = code(a, b, angle)
      	tmp = ((b * sin((pi * (0.005555555555555556 * angle)))) ^ 2.0) + (a * (a * ((1.0 + cos(((pi * angle) * 0.011111111111111112))) / 2.0)));
      end
      
      code[a_, b_, angle_] := N[(N[Power[N[(b * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(a * N[(a * N[(N[(1.0 + N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      {\left(b \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}^{2} + a \cdot \left(a \cdot \frac{1 + \cos \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)}{2}\right)
      \end{array}
      
      Derivation
      1. Initial program 79.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. Simplified79.3%

          \[\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-eval79.3%

            \[\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-inv79.4%

            \[\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-cbrt79.4%

            \[\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. pow379.4%

            \[\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-inv79.3%

            \[\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-eval79.3%

            \[\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*79.4%

            \[\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. *-commutative79.4%

            \[\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-rr79.4%

          \[\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. Step-by-step derivation
          1. unpow279.4%

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left({\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}^{3} \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} \]
          8. unpow379.1%

            \[\leadsto \left(\color{blue}{\left(\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sqrt[3]{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} \]
          9. add-cube-cbrt79.4%

            \[\leadsto \left(\color{blue}{\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} \]
        6. Applied egg-rr79.4%

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

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

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

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

            \[\leadsto \left(a \cdot \color{blue}{\left(0.5 + 0.5 \cdot \cos \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}\right) \cdot a + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
          5. add-exp-log42.2%

            \[\leadsto \left(a \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \color{blue}{e^{\log \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right)\right) \cdot a + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
          6. *-un-lft-identity42.2%

            \[\leadsto \left(a \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot e^{\color{blue}{1 \cdot \log \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right)\right) \cdot a + {\left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2} \]
          7. pow-exp42.2%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 62.3% accurate, 2.0× speedup?

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

          1. Initial program 77.2%

            \[{\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. Simplified77.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 a around inf 56.1%

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

                \[\leadsto {a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)}^{2} \]
              2. unpow256.1%

                \[\leadsto {a}^{2} \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
              3. unpow256.1%

                \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \]
              4. swap-sqr56.1%

                \[\leadsto \color{blue}{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
              5. unpow256.1%

                \[\leadsto \color{blue}{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}} \]
              6. *-commutative56.1%

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

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

            if 1.29999999999999994e154 < b

            1. Initial program 99.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. Simplified99.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. Step-by-step derivation
                1. metadata-eval99.2%

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

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

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

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

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

                  \[\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*99.2%

                  \[\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. *-commutative99.2%

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

                \[\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. Step-by-step derivation
                1. unpow299.2%

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left({\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}^{3} \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} \]
                8. unpow399.2%

                  \[\leadsto \left(\color{blue}{\left(\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sqrt[3]{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} \]
                9. add-cube-cbrt99.2%

                  \[\leadsto \left(\color{blue}{\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} \]
              6. Applied egg-rr99.2%

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

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

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

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

                  \[\leadsto \left(b \cdot b\right) \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)} \]
                4. swap-sqr95.5%

                  \[\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. unpow295.5%

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

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

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

                \[\leadsto \color{blue}{{\left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)}^{2}} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification60.0%

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

            Alternative 5: 62.3% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\ \mathbf{if}\;b \leq 1.5 \cdot 10^{+154}:\\ \;\;\;\;{\left(a \cdot \cos t\_0\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(b \cdot \sin t\_0\right)}^{2}\\ \end{array} \end{array} \]
            (FPCore (a b angle)
             :precision binary64
             (let* ((t_0 (* 0.005555555555555556 (* PI angle))))
               (if (<= b 1.5e+154) (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 = 0.005555555555555556 * (((double) M_PI) * angle);
            	double tmp;
            	if (b <= 1.5e+154) {
            		tmp = pow((a * cos(t_0)), 2.0);
            	} else {
            		tmp = pow((b * sin(t_0)), 2.0);
            	}
            	return tmp;
            }
            
            public static double code(double a, double b, double angle) {
            	double t_0 = 0.005555555555555556 * (Math.PI * angle);
            	double tmp;
            	if (b <= 1.5e+154) {
            		tmp = Math.pow((a * Math.cos(t_0)), 2.0);
            	} else {
            		tmp = Math.pow((b * Math.sin(t_0)), 2.0);
            	}
            	return tmp;
            }
            
            def code(a, b, angle):
            	t_0 = 0.005555555555555556 * (math.pi * angle)
            	tmp = 0
            	if b <= 1.5e+154:
            		tmp = math.pow((a * math.cos(t_0)), 2.0)
            	else:
            		tmp = math.pow((b * math.sin(t_0)), 2.0)
            	return tmp
            
            function code(a, b, angle)
            	t_0 = Float64(0.005555555555555556 * Float64(pi * angle))
            	tmp = 0.0
            	if (b <= 1.5e+154)
            		tmp = Float64(a * cos(t_0)) ^ 2.0;
            	else
            		tmp = Float64(b * sin(t_0)) ^ 2.0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, b, angle)
            	t_0 = 0.005555555555555556 * (pi * angle);
            	tmp = 0.0;
            	if (b <= 1.5e+154)
            		tmp = (a * cos(t_0)) ^ 2.0;
            	else
            		tmp = (b * sin(t_0)) ^ 2.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 1.5e+154], 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]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\
            \mathbf{if}\;b \leq 1.5 \cdot 10^{+154}:\\
            \;\;\;\;{\left(a \cdot \cos t\_0\right)}^{2}\\
            
            \mathbf{else}:\\
            \;\;\;\;{\left(b \cdot \sin t\_0\right)}^{2}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if b < 1.50000000000000013e154

              1. Initial program 77.2%

                \[{\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. Simplified77.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 a around inf 56.1%

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

                    \[\leadsto {a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)}^{2} \]
                  2. unpow256.1%

                    \[\leadsto {a}^{2} \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                  3. unpow256.1%

                    \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \]
                  4. swap-sqr56.1%

                    \[\leadsto \color{blue}{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                  5. unpow256.1%

                    \[\leadsto \color{blue}{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}} \]
                  6. *-commutative56.1%

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

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

                if 1.50000000000000013e154 < b

                1. Initial program 99.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. Simplified99.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 a around 0 56.9%

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

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

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

                      \[\leadsto \left(b \cdot b\right) \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)} \]
                    4. swap-sqr95.5%

                      \[\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. unpow295.5%

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

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

                    \[\leadsto \color{blue}{{\left(b \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}^{2}} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification60.0%

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

                Alternative 6: 56.9% accurate, 2.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.6 \cdot 10^{+172}:\\ \;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{a}^{6}}\\ \end{array} \end{array} \]
                (FPCore (a b angle)
                 :precision binary64
                 (if (<= b 2.6e+172)
                   (pow (* a (cos (* 0.005555555555555556 (* PI angle)))) 2.0)
                   (cbrt (pow a 6.0))))
                double code(double a, double b, double angle) {
                	double tmp;
                	if (b <= 2.6e+172) {
                		tmp = pow((a * cos((0.005555555555555556 * (((double) M_PI) * angle)))), 2.0);
                	} else {
                		tmp = cbrt(pow(a, 6.0));
                	}
                	return tmp;
                }
                
                public static double code(double a, double b, double angle) {
                	double tmp;
                	if (b <= 2.6e+172) {
                		tmp = Math.pow((a * Math.cos((0.005555555555555556 * (Math.PI * angle)))), 2.0);
                	} else {
                		tmp = Math.cbrt(Math.pow(a, 6.0));
                	}
                	return tmp;
                }
                
                function code(a, b, angle)
                	tmp = 0.0
                	if (b <= 2.6e+172)
                		tmp = Float64(a * cos(Float64(0.005555555555555556 * Float64(pi * angle)))) ^ 2.0;
                	else
                		tmp = cbrt((a ^ 6.0));
                	end
                	return tmp
                end
                
                code[a_, b_, angle_] := If[LessEqual[b, 2.6e+172], N[Power[N[(a * N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b \leq 2.6 \cdot 10^{+172}:\\
                \;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}\\
                
                \mathbf{else}:\\
                \;\;\;\;\sqrt[3]{{a}^{6}}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if b < 2.6e172

                  1. Initial program 77.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. Simplified77.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 inf 55.7%

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

                        \[\leadsto {a}^{2} \cdot {\cos \left(0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)}^{2} \]
                      2. unpow255.7%

                        \[\leadsto {a}^{2} \cdot \color{blue}{\left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                      3. unpow255.7%

                        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(\cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \]
                      4. swap-sqr55.7%

                        \[\leadsto \color{blue}{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
                      5. unpow255.7%

                        \[\leadsto \color{blue}{{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}} \]
                      6. *-commutative55.7%

                        \[\leadsto {\left(a \cdot \cos \left(0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right)\right)}^{2} \]
                    5. Simplified55.7%

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

                    if 2.6e172 < b

                    1. Initial program 99.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. Simplified99.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 20.4%

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

                          \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
                        2. sqrt-unprod24.6%

                          \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
                        3. pow-prod-up24.6%

                          \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
                        4. metadata-eval24.6%

                          \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
                      5. Applied egg-rr24.6%

                        \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
                      6. Step-by-step derivation
                        1. add-cbrt-cube28.4%

                          \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}}} \]
                        2. pow1/328.4%

                          \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
                        3. add-sqr-sqrt28.4%

                          \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
                        4. sqrt-pow128.4%

                          \[\leadsto {\left({a}^{4} \cdot \color{blue}{{a}^{\left(\frac{4}{2}\right)}}\right)}^{0.3333333333333333} \]
                        5. metadata-eval28.4%

                          \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
                        6. pow-prod-up28.4%

                          \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
                        7. metadata-eval28.4%

                          \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
                      7. Applied egg-rr28.4%

                        \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
                      8. Step-by-step derivation
                        1. unpow1/328.4%

                          \[\leadsto \color{blue}{\sqrt[3]{{a}^{6}}} \]
                      9. Simplified28.4%

                        \[\leadsto \color{blue}{\sqrt[3]{{a}^{6}}} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification53.3%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.6 \cdot 10^{+172}:\\ \;\;\;\;{\left(a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{a}^{6}}\\ \end{array} \]
                    5. Add Preprocessing

                    Alternative 7: 79.2% accurate, 2.0× speedup?

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

                        \[\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-eval79.3%

                          \[\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-inv79.4%

                          \[\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-cbrt79.4%

                          \[\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. pow379.4%

                          \[\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-inv79.3%

                          \[\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-eval79.3%

                          \[\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*79.4%

                          \[\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. *-commutative79.4%

                          \[\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-rr79.4%

                        \[\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. Step-by-step derivation
                        1. unpow279.4%

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left({\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right)}^{3} \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} \]
                        8. unpow379.1%

                          \[\leadsto \left(\color{blue}{\left(\left(\sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \sqrt[3]{a \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)}\right) \cdot \sqrt[3]{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} \]
                        9. add-cube-cbrt79.4%

                          \[\leadsto \left(\color{blue}{\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} \]
                      6. Applied egg-rr79.4%

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

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

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

                      Alternative 8: 57.0% accurate, 2.0× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 1.38 \cdot 10^{+172}:\\ \;\;\;\;a \cdot a\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{a}^{6}}\\ \end{array} \end{array} \]
                      (FPCore (a b angle)
                       :precision binary64
                       (if (<= b 1.38e+172) (* a a) (cbrt (pow a 6.0))))
                      double code(double a, double b, double angle) {
                      	double tmp;
                      	if (b <= 1.38e+172) {
                      		tmp = a * a;
                      	} else {
                      		tmp = cbrt(pow(a, 6.0));
                      	}
                      	return tmp;
                      }
                      
                      public static double code(double a, double b, double angle) {
                      	double tmp;
                      	if (b <= 1.38e+172) {
                      		tmp = a * a;
                      	} else {
                      		tmp = Math.cbrt(Math.pow(a, 6.0));
                      	}
                      	return tmp;
                      }
                      
                      function code(a, b, angle)
                      	tmp = 0.0
                      	if (b <= 1.38e+172)
                      		tmp = Float64(a * a);
                      	else
                      		tmp = cbrt((a ^ 6.0));
                      	end
                      	return tmp
                      end
                      
                      code[a_, b_, angle_] := If[LessEqual[b, 1.38e+172], N[(a * a), $MachinePrecision], N[Power[N[Power[a, 6.0], $MachinePrecision], 1/3], $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;b \leq 1.38 \cdot 10^{+172}:\\
                      \;\;\;\;a \cdot a\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\sqrt[3]{{a}^{6}}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if b < 1.38000000000000002e172

                        1. Initial program 77.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. Simplified77.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 angle around 0 55.1%

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

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

                            \[\leadsto \color{blue}{a \cdot a} \]

                          if 1.38000000000000002e172 < b

                          1. Initial program 99.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. Simplified99.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 20.4%

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

                                \[\leadsto \color{blue}{\sqrt{{a}^{2}} \cdot \sqrt{{a}^{2}}} \]
                              2. sqrt-unprod24.6%

                                \[\leadsto \color{blue}{\sqrt{{a}^{2} \cdot {a}^{2}}} \]
                              3. pow-prod-up24.6%

                                \[\leadsto \sqrt{\color{blue}{{a}^{\left(2 + 2\right)}}} \]
                              4. metadata-eval24.6%

                                \[\leadsto \sqrt{{a}^{\color{blue}{4}}} \]
                            5. Applied egg-rr24.6%

                              \[\leadsto \color{blue}{\sqrt{{a}^{4}}} \]
                            6. Step-by-step derivation
                              1. add-cbrt-cube28.4%

                                \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}}} \]
                              2. pow1/328.4%

                                \[\leadsto \color{blue}{{\left(\left(\sqrt{{a}^{4}} \cdot \sqrt{{a}^{4}}\right) \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333}} \]
                              3. add-sqr-sqrt28.4%

                                \[\leadsto {\left(\color{blue}{{a}^{4}} \cdot \sqrt{{a}^{4}}\right)}^{0.3333333333333333} \]
                              4. sqrt-pow128.4%

                                \[\leadsto {\left({a}^{4} \cdot \color{blue}{{a}^{\left(\frac{4}{2}\right)}}\right)}^{0.3333333333333333} \]
                              5. metadata-eval28.4%

                                \[\leadsto {\left({a}^{4} \cdot {a}^{\color{blue}{2}}\right)}^{0.3333333333333333} \]
                              6. pow-prod-up28.4%

                                \[\leadsto {\color{blue}{\left({a}^{\left(4 + 2\right)}\right)}}^{0.3333333333333333} \]
                              7. metadata-eval28.4%

                                \[\leadsto {\left({a}^{\color{blue}{6}}\right)}^{0.3333333333333333} \]
                            7. Applied egg-rr28.4%

                              \[\leadsto \color{blue}{{\left({a}^{6}\right)}^{0.3333333333333333}} \]
                            8. Step-by-step derivation
                              1. unpow1/328.4%

                                \[\leadsto \color{blue}{\sqrt[3]{{a}^{6}}} \]
                            9. Simplified28.4%

                              \[\leadsto \color{blue}{\sqrt[3]{{a}^{6}}} \]
                          3. Recombined 2 regimes into one program.
                          4. Add Preprocessing

                          Alternative 9: 56.6% 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 79.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. Simplified79.3%

                              \[\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 52.0%

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

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

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

                            Reproduce

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