ab-angle->ABCF C

Percentage Accurate: 80.0% → 79.9%
Time: 1.2min
Alternatives: 15
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 80.0% accurate, 1.0× speedup?

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

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

Alternative 1: 79.9% accurate, 0.3× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \sqrt[3]{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\\ t_1 := angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\\ {\left(a \cdot \cos \left(\left({\left(\sqrt[3]{t\_1}\right)}^{2} \cdot e^{0.16666666666666666 \cdot \log t\_1}\right) \cdot \left({\left({t\_0}^{2}\right)}^{0.16666666666666666} \cdot {t\_0}^{0.16666666666666666}\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
(FPCore (a b angle_m)
 :precision binary64
 (let* ((t_0 (cbrt (* PI (* angle_m 0.005555555555555556))))
        (t_1 (* angle_m (* 0.005555555555555556 PI))))
   (+
    (pow
     (*
      a
      (cos
       (*
        (* (pow (cbrt t_1) 2.0) (exp (* 0.16666666666666666 (log t_1))))
        (*
         (pow (pow t_0 2.0) 0.16666666666666666)
         (pow t_0 0.16666666666666666)))))
     2.0)
    (pow (* b (sin (/ PI (/ 180.0 angle_m)))) 2.0))))
angle_m = fabs(angle);
double code(double a, double b, double angle_m) {
	double t_0 = cbrt((((double) M_PI) * (angle_m * 0.005555555555555556)));
	double t_1 = angle_m * (0.005555555555555556 * ((double) M_PI));
	return pow((a * cos(((pow(cbrt(t_1), 2.0) * exp((0.16666666666666666 * log(t_1)))) * (pow(pow(t_0, 2.0), 0.16666666666666666) * pow(t_0, 0.16666666666666666))))), 2.0) + pow((b * sin((((double) M_PI) / (180.0 / angle_m)))), 2.0);
}
angle_m = Math.abs(angle);
public static double code(double a, double b, double angle_m) {
	double t_0 = Math.cbrt((Math.PI * (angle_m * 0.005555555555555556)));
	double t_1 = angle_m * (0.005555555555555556 * Math.PI);
	return Math.pow((a * Math.cos(((Math.pow(Math.cbrt(t_1), 2.0) * Math.exp((0.16666666666666666 * Math.log(t_1)))) * (Math.pow(Math.pow(t_0, 2.0), 0.16666666666666666) * Math.pow(t_0, 0.16666666666666666))))), 2.0) + Math.pow((b * Math.sin((Math.PI / (180.0 / angle_m)))), 2.0);
}
angle_m = abs(angle)
function code(a, b, angle_m)
	t_0 = cbrt(Float64(pi * Float64(angle_m * 0.005555555555555556)))
	t_1 = Float64(angle_m * Float64(0.005555555555555556 * pi))
	return Float64((Float64(a * cos(Float64(Float64((cbrt(t_1) ^ 2.0) * exp(Float64(0.16666666666666666 * log(t_1)))) * Float64(((t_0 ^ 2.0) ^ 0.16666666666666666) * (t_0 ^ 0.16666666666666666))))) ^ 2.0) + (Float64(b * sin(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0))
end
angle_m = N[Abs[angle], $MachinePrecision]
code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[Power[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$1 = N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[Cos[N[(N[(N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Exp[N[(0.16666666666666666 * N[Log[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Power[t$95$0, 2.0], $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[t$95$0, 0.16666666666666666], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Sin[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
angle_m = \left|angle\right|

\\
\begin{array}{l}
t_0 := \sqrt[3]{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\\
t_1 := angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\\
{\left(a \cdot \cos \left(\left({\left(\sqrt[3]{t\_1}\right)}^{2} \cdot e^{0.16666666666666666 \cdot \log t\_1}\right) \cdot \left({\left({t\_0}^{2}\right)}^{0.16666666666666666} \cdot {t\_0}^{0.16666666666666666}\right)\right)\right)}^{2} + {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 82.6%

    \[{\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. Simplified82.6%

      \[\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-eval82.6%

        \[\leadsto {\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 \color{blue}{\frac{1}{180}}\right)\right)\right)}^{2} \]
      2. div-inv82.6%

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

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

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

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

        \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
      2. div-inv82.7%

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

        \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
      4. pow382.6%

        \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
      5. pow-to-exp37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 79.9% accurate, 0.6× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(e^{\log \left(\sqrt[3]{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\right) \cdot 3}\right)\right)}^{2} \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m)
     :precision binary64
     (+
      (pow (* b (sin (/ PI (/ 180.0 angle_m)))) 2.0)
      (pow
       (*
        a
        (cos (exp (* (log (cbrt (* PI (* angle_m 0.005555555555555556)))) 3.0))))
       2.0)))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	return pow((b * sin((((double) M_PI) / (180.0 / angle_m)))), 2.0) + pow((a * cos(exp((log(cbrt((((double) M_PI) * (angle_m * 0.005555555555555556)))) * 3.0)))), 2.0);
    }
    
    angle_m = Math.abs(angle);
    public static double code(double a, double b, double angle_m) {
    	return Math.pow((b * Math.sin((Math.PI / (180.0 / angle_m)))), 2.0) + Math.pow((a * Math.cos(Math.exp((Math.log(Math.cbrt((Math.PI * (angle_m * 0.005555555555555556)))) * 3.0)))), 2.0);
    }
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	return Float64((Float64(b * sin(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0) + (Float64(a * cos(exp(Float64(log(cbrt(Float64(pi * Float64(angle_m * 0.005555555555555556)))) * 3.0)))) ^ 2.0))
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[Exp[N[(N[Log[N[Power[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision] * 3.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(e^{\log \left(\sqrt[3]{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\right) \cdot 3}\right)\right)}^{2}
    \end{array}
    
    Derivation
    1. Initial program 82.6%

      \[{\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. Simplified82.6%

        \[\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-eval82.6%

          \[\leadsto {\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 \color{blue}{\frac{1}{180}}\right)\right)\right)}^{2} \]
        2. div-inv82.6%

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

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

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

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

          \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
        2. div-inv82.7%

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

          \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
        4. pow382.6%

          \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
        5. pow-to-exp37.9%

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

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

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

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

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

      Alternative 3: 80.0% accurate, 1.0× speedup?

      \[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(\pi \cdot \frac{1}{\frac{180}{angle\_m}}\right)\right)}^{2} \end{array} \]
      angle_m = (fabs.f64 angle)
      (FPCore (a b angle_m)
       :precision binary64
       (+
        (pow (* b (sin (/ PI (/ 180.0 angle_m)))) 2.0)
        (pow (* a (cos (* PI (/ 1.0 (/ 180.0 angle_m))))) 2.0)))
      angle_m = fabs(angle);
      double code(double a, double b, double angle_m) {
      	return pow((b * sin((((double) M_PI) / (180.0 / angle_m)))), 2.0) + pow((a * cos((((double) M_PI) * (1.0 / (180.0 / angle_m))))), 2.0);
      }
      
      angle_m = Math.abs(angle);
      public static double code(double a, double b, double angle_m) {
      	return Math.pow((b * Math.sin((Math.PI / (180.0 / angle_m)))), 2.0) + Math.pow((a * Math.cos((Math.PI * (1.0 / (180.0 / angle_m))))), 2.0);
      }
      
      angle_m = math.fabs(angle)
      def code(a, b, angle_m):
      	return math.pow((b * math.sin((math.pi / (180.0 / angle_m)))), 2.0) + math.pow((a * math.cos((math.pi * (1.0 / (180.0 / angle_m))))), 2.0)
      
      angle_m = abs(angle)
      function code(a, b, angle_m)
      	return Float64((Float64(b * sin(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0) + (Float64(a * cos(Float64(pi * Float64(1.0 / Float64(180.0 / angle_m))))) ^ 2.0))
      end
      
      angle_m = abs(angle);
      function tmp = code(a, b, angle_m)
      	tmp = ((b * sin((pi / (180.0 / angle_m)))) ^ 2.0) + ((a * cos((pi * (1.0 / (180.0 / angle_m))))) ^ 2.0);
      end
      
      angle_m = N[Abs[angle], $MachinePrecision]
      code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(Pi * N[(1.0 / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle_m = \left|angle\right|
      
      \\
      {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(\pi \cdot \frac{1}{\frac{180}{angle\_m}}\right)\right)}^{2}
      \end{array}
      
      Derivation
      1. Initial program 82.6%

        \[{\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. Simplified82.6%

          \[\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-eval82.6%

            \[\leadsto {\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 \color{blue}{\frac{1}{180}}\right)\right)\right)}^{2} \]
          2. div-inv82.6%

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

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

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

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

            \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
          2. div-inv82.7%

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

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

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

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

        Alternative 4: 80.0% accurate, 1.0× speedup?

        \[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(\pi \cdot \frac{0.005555555555555556}{\frac{1}{angle\_m}}\right)\right)}^{2} \end{array} \]
        angle_m = (fabs.f64 angle)
        (FPCore (a b angle_m)
         :precision binary64
         (+
          (pow (* b (sin (/ PI (/ 180.0 angle_m)))) 2.0)
          (pow (* a (cos (* PI (/ 0.005555555555555556 (/ 1.0 angle_m))))) 2.0)))
        angle_m = fabs(angle);
        double code(double a, double b, double angle_m) {
        	return pow((b * sin((((double) M_PI) / (180.0 / angle_m)))), 2.0) + pow((a * cos((((double) M_PI) * (0.005555555555555556 / (1.0 / angle_m))))), 2.0);
        }
        
        angle_m = Math.abs(angle);
        public static double code(double a, double b, double angle_m) {
        	return Math.pow((b * Math.sin((Math.PI / (180.0 / angle_m)))), 2.0) + Math.pow((a * Math.cos((Math.PI * (0.005555555555555556 / (1.0 / angle_m))))), 2.0);
        }
        
        angle_m = math.fabs(angle)
        def code(a, b, angle_m):
        	return math.pow((b * math.sin((math.pi / (180.0 / angle_m)))), 2.0) + math.pow((a * math.cos((math.pi * (0.005555555555555556 / (1.0 / angle_m))))), 2.0)
        
        angle_m = abs(angle)
        function code(a, b, angle_m)
        	return Float64((Float64(b * sin(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0) + (Float64(a * cos(Float64(pi * Float64(0.005555555555555556 / Float64(1.0 / angle_m))))) ^ 2.0))
        end
        
        angle_m = abs(angle);
        function tmp = code(a, b, angle_m)
        	tmp = ((b * sin((pi / (180.0 / angle_m)))) ^ 2.0) + ((a * cos((pi * (0.005555555555555556 / (1.0 / angle_m))))) ^ 2.0);
        end
        
        angle_m = N[Abs[angle], $MachinePrecision]
        code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(Pi * N[(0.005555555555555556 / N[(1.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        angle_m = \left|angle\right|
        
        \\
        {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(\pi \cdot \frac{0.005555555555555556}{\frac{1}{angle\_m}}\right)\right)}^{2}
        \end{array}
        
        Derivation
        1. Initial program 82.6%

          \[{\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. Simplified82.6%

            \[\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-eval82.6%

              \[\leadsto {\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 \color{blue}{\frac{1}{180}}\right)\right)\right)}^{2} \]
            2. div-inv82.6%

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

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

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

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

              \[\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(\frac{\pi}{\frac{180}{angle}}\right)\right)}^{2} \]
            2. div-inv82.7%

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

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

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

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

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

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

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

          Alternative 5: 80.0% accurate, 1.0× speedup?

          \[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)}^{2} \end{array} \]
          angle_m = (fabs.f64 angle)
          (FPCore (a b angle_m)
           :precision binary64
           (+
            (pow (* b (sin (/ PI (/ 180.0 angle_m)))) 2.0)
            (pow (* a (cos (* angle_m (* 0.005555555555555556 PI)))) 2.0)))
          angle_m = fabs(angle);
          double code(double a, double b, double angle_m) {
          	return pow((b * sin((((double) M_PI) / (180.0 / angle_m)))), 2.0) + pow((a * cos((angle_m * (0.005555555555555556 * ((double) M_PI))))), 2.0);
          }
          
          angle_m = Math.abs(angle);
          public static double code(double a, double b, double angle_m) {
          	return Math.pow((b * Math.sin((Math.PI / (180.0 / angle_m)))), 2.0) + Math.pow((a * Math.cos((angle_m * (0.005555555555555556 * Math.PI)))), 2.0);
          }
          
          angle_m = math.fabs(angle)
          def code(a, b, angle_m):
          	return math.pow((b * math.sin((math.pi / (180.0 / angle_m)))), 2.0) + math.pow((a * math.cos((angle_m * (0.005555555555555556 * math.pi)))), 2.0)
          
          angle_m = abs(angle)
          function code(a, b, angle_m)
          	return Float64((Float64(b * sin(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0) + (Float64(a * cos(Float64(angle_m * Float64(0.005555555555555556 * pi)))) ^ 2.0))
          end
          
          angle_m = abs(angle);
          function tmp = code(a, b, angle_m)
          	tmp = ((b * sin((pi / (180.0 / angle_m)))) ^ 2.0) + ((a * cos((angle_m * (0.005555555555555556 * pi)))) ^ 2.0);
          end
          
          angle_m = N[Abs[angle], $MachinePrecision]
          code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(a * N[Cos[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          angle_m = \left|angle\right|
          
          \\
          {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {\left(a \cdot \cos \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)}^{2}
          \end{array}
          
          Derivation
          1. Initial program 82.6%

            \[{\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. Simplified82.6%

              \[\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-eval82.6%

                \[\leadsto {\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 \color{blue}{\frac{1}{180}}\right)\right)\right)}^{2} \]
              2. div-inv82.6%

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 79.9% accurate, 1.3× speedup?

            \[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {a}^{2} \end{array} \]
            angle_m = (fabs.f64 angle)
            (FPCore (a b angle_m)
             :precision binary64
             (+ (pow (* b (sin (/ PI (/ 180.0 angle_m)))) 2.0) (pow a 2.0)))
            angle_m = fabs(angle);
            double code(double a, double b, double angle_m) {
            	return pow((b * sin((((double) M_PI) / (180.0 / angle_m)))), 2.0) + pow(a, 2.0);
            }
            
            angle_m = Math.abs(angle);
            public static double code(double a, double b, double angle_m) {
            	return Math.pow((b * Math.sin((Math.PI / (180.0 / angle_m)))), 2.0) + Math.pow(a, 2.0);
            }
            
            angle_m = math.fabs(angle)
            def code(a, b, angle_m):
            	return math.pow((b * math.sin((math.pi / (180.0 / angle_m)))), 2.0) + math.pow(a, 2.0)
            
            angle_m = abs(angle)
            function code(a, b, angle_m)
            	return Float64((Float64(b * sin(Float64(pi / Float64(180.0 / angle_m)))) ^ 2.0) + (a ^ 2.0))
            end
            
            angle_m = abs(angle);
            function tmp = code(a, b, angle_m)
            	tmp = ((b * sin((pi / (180.0 / angle_m)))) ^ 2.0) + (a ^ 2.0);
            end
            
            angle_m = N[Abs[angle], $MachinePrecision]
            code[a_, b_, angle$95$m_] := N[(N[Power[N[(b * N[Sin[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            angle_m = \left|angle\right|
            
            \\
            {\left(b \cdot \sin \left(\frac{\pi}{\frac{180}{angle\_m}}\right)\right)}^{2} + {a}^{2}
            \end{array}
            
            Derivation
            1. Initial program 82.6%

              \[{\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. Simplified82.6%

                \[\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-eval82.6%

                  \[\leadsto {\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 \color{blue}{\frac{1}{180}}\right)\right)\right)}^{2} \]
                2. div-inv82.6%

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

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

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

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

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

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

              Alternative 7: 79.9% accurate, 1.3× speedup?

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

                \[{\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. Simplified82.6%

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

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

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

                Alternative 8: 79.9% accurate, 1.3× speedup?

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

                  \[{\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. Simplified82.6%

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

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

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

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

                  Alternative 9: 73.4% accurate, 1.9× speedup?

                  \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 2.8 \cdot 10^{-234}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + {\left(b \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}\\ \end{array} \end{array} \]
                  angle_m = (fabs.f64 angle)
                  (FPCore (a b angle_m)
                   :precision binary64
                   (if (<= b 2.8e-234)
                     (+
                      (pow a 2.0)
                      (*
                       angle_m
                       (*
                        (* 0.005555555555555556 PI)
                        (* angle_m (* b (* PI (* 0.005555555555555556 b)))))))
                     (+ (pow a 2.0) (pow (* b (* 0.005555555555555556 (* angle_m PI))) 2.0))))
                  angle_m = fabs(angle);
                  double code(double a, double b, double angle_m) {
                  	double tmp;
                  	if (b <= 2.8e-234) {
                  		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (angle_m * (b * (((double) M_PI) * (0.005555555555555556 * b))))));
                  	} else {
                  		tmp = pow(a, 2.0) + pow((b * (0.005555555555555556 * (angle_m * ((double) M_PI)))), 2.0);
                  	}
                  	return tmp;
                  }
                  
                  angle_m = Math.abs(angle);
                  public static double code(double a, double b, double angle_m) {
                  	double tmp;
                  	if (b <= 2.8e-234) {
                  		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (angle_m * (b * (Math.PI * (0.005555555555555556 * b))))));
                  	} else {
                  		tmp = Math.pow(a, 2.0) + Math.pow((b * (0.005555555555555556 * (angle_m * Math.PI))), 2.0);
                  	}
                  	return tmp;
                  }
                  
                  angle_m = math.fabs(angle)
                  def code(a, b, angle_m):
                  	tmp = 0
                  	if b <= 2.8e-234:
                  		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (angle_m * (b * (math.pi * (0.005555555555555556 * b))))))
                  	else:
                  		tmp = math.pow(a, 2.0) + math.pow((b * (0.005555555555555556 * (angle_m * math.pi))), 2.0)
                  	return tmp
                  
                  angle_m = abs(angle)
                  function code(a, b, angle_m)
                  	tmp = 0.0
                  	if (b <= 2.8e-234)
                  		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(angle_m * Float64(b * Float64(pi * Float64(0.005555555555555556 * b)))))));
                  	else
                  		tmp = Float64((a ^ 2.0) + (Float64(b * Float64(0.005555555555555556 * Float64(angle_m * pi))) ^ 2.0));
                  	end
                  	return tmp
                  end
                  
                  angle_m = abs(angle);
                  function tmp_2 = code(a, b, angle_m)
                  	tmp = 0.0;
                  	if (b <= 2.8e-234)
                  		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (angle_m * (b * (pi * (0.005555555555555556 * b))))));
                  	else
                  		tmp = (a ^ 2.0) + ((b * (0.005555555555555556 * (angle_m * pi))) ^ 2.0);
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  angle_m = N[Abs[angle], $MachinePrecision]
                  code[a_, b_, angle$95$m_] := If[LessEqual[b, 2.8e-234], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(angle$95$m * N[(b * N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[Power[N[(b * N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  angle_m = \left|angle\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;b \leq 2.8 \cdot 10^{-234}:\\
                  \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;{a}^{2} + {\left(b \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)}^{2}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if b < 2.7999999999999999e-234

                    1. Initial program 83.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. Simplified83.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 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 2.7999999999999999e-234 < b

                      1. Initial program 81.5%

                        \[{\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 angle around 0 81.3%

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

                          \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)}^{2} \]
                      3. Recombined 2 regimes into one program.
                      4. Final simplification76.6%

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

                      Alternative 10: 73.3% accurate, 1.9× speedup?

                      \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 2.8 \cdot 10^{-234}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\left(angle\_m \cdot \left(\pi \cdot b\right)\right)}^{2}\\ \end{array} \end{array} \]
                      angle_m = (fabs.f64 angle)
                      (FPCore (a b angle_m)
                       :precision binary64
                       (if (<= b 2.8e-234)
                         (+
                          (pow a 2.0)
                          (*
                           angle_m
                           (*
                            (* 0.005555555555555556 PI)
                            (* angle_m (* b (* PI (* 0.005555555555555556 b)))))))
                         (+ (pow a 2.0) (* 3.08641975308642e-5 (pow (* angle_m (* PI b)) 2.0)))))
                      angle_m = fabs(angle);
                      double code(double a, double b, double angle_m) {
                      	double tmp;
                      	if (b <= 2.8e-234) {
                      		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (angle_m * (b * (((double) M_PI) * (0.005555555555555556 * b))))));
                      	} else {
                      		tmp = pow(a, 2.0) + (3.08641975308642e-5 * pow((angle_m * (((double) M_PI) * b)), 2.0));
                      	}
                      	return tmp;
                      }
                      
                      angle_m = Math.abs(angle);
                      public static double code(double a, double b, double angle_m) {
                      	double tmp;
                      	if (b <= 2.8e-234) {
                      		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (angle_m * (b * (Math.PI * (0.005555555555555556 * b))))));
                      	} else {
                      		tmp = Math.pow(a, 2.0) + (3.08641975308642e-5 * Math.pow((angle_m * (Math.PI * b)), 2.0));
                      	}
                      	return tmp;
                      }
                      
                      angle_m = math.fabs(angle)
                      def code(a, b, angle_m):
                      	tmp = 0
                      	if b <= 2.8e-234:
                      		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (angle_m * (b * (math.pi * (0.005555555555555556 * b))))))
                      	else:
                      		tmp = math.pow(a, 2.0) + (3.08641975308642e-5 * math.pow((angle_m * (math.pi * b)), 2.0))
                      	return tmp
                      
                      angle_m = abs(angle)
                      function code(a, b, angle_m)
                      	tmp = 0.0
                      	if (b <= 2.8e-234)
                      		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(angle_m * Float64(b * Float64(pi * Float64(0.005555555555555556 * b)))))));
                      	else
                      		tmp = Float64((a ^ 2.0) + Float64(3.08641975308642e-5 * (Float64(angle_m * Float64(pi * b)) ^ 2.0)));
                      	end
                      	return tmp
                      end
                      
                      angle_m = abs(angle);
                      function tmp_2 = code(a, b, angle_m)
                      	tmp = 0.0;
                      	if (b <= 2.8e-234)
                      		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (angle_m * (b * (pi * (0.005555555555555556 * b))))));
                      	else
                      		tmp = (a ^ 2.0) + (3.08641975308642e-5 * ((angle_m * (pi * b)) ^ 2.0));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      angle_m = N[Abs[angle], $MachinePrecision]
                      code[a_, b_, angle$95$m_] := If[LessEqual[b, 2.8e-234], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(angle$95$m * N[(b * N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(3.08641975308642e-5 * N[Power[N[(angle$95$m * N[(Pi * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      angle_m = \left|angle\right|
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;b \leq 2.8 \cdot 10^{-234}:\\
                      \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;{a}^{2} + 3.08641975308642 \cdot 10^{-5} \cdot {\left(angle\_m \cdot \left(\pi \cdot b\right)\right)}^{2}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if b < 2.7999999999999999e-234

                        1. Initial program 83.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. Simplified83.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 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2.7999999999999999e-234 < b

                          1. Initial program 81.5%

                            \[{\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 angle around 0 81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 11: 73.4% accurate, 3.4× speedup?

                          \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \pi \cdot \left(0.005555555555555556 \cdot b\right)\\ t_1 := angle\_m \cdot t\_0\\ \mathbf{if}\;b \leq 2 \cdot 10^{-235}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + t\_1 \cdot t\_1\\ \end{array} \end{array} \]
                          angle_m = (fabs.f64 angle)
                          (FPCore (a b angle_m)
                           :precision binary64
                           (let* ((t_0 (* PI (* 0.005555555555555556 b))) (t_1 (* angle_m t_0)))
                             (if (<= b 2e-235)
                               (+
                                (pow a 2.0)
                                (* angle_m (* (* 0.005555555555555556 PI) (* angle_m (* b t_0)))))
                               (+ (pow a 2.0) (* t_1 t_1)))))
                          angle_m = fabs(angle);
                          double code(double a, double b, double angle_m) {
                          	double t_0 = ((double) M_PI) * (0.005555555555555556 * b);
                          	double t_1 = angle_m * t_0;
                          	double tmp;
                          	if (b <= 2e-235) {
                          		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (angle_m * (b * t_0))));
                          	} else {
                          		tmp = pow(a, 2.0) + (t_1 * t_1);
                          	}
                          	return tmp;
                          }
                          
                          angle_m = Math.abs(angle);
                          public static double code(double a, double b, double angle_m) {
                          	double t_0 = Math.PI * (0.005555555555555556 * b);
                          	double t_1 = angle_m * t_0;
                          	double tmp;
                          	if (b <= 2e-235) {
                          		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (angle_m * (b * t_0))));
                          	} else {
                          		tmp = Math.pow(a, 2.0) + (t_1 * t_1);
                          	}
                          	return tmp;
                          }
                          
                          angle_m = math.fabs(angle)
                          def code(a, b, angle_m):
                          	t_0 = math.pi * (0.005555555555555556 * b)
                          	t_1 = angle_m * t_0
                          	tmp = 0
                          	if b <= 2e-235:
                          		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (angle_m * (b * t_0))))
                          	else:
                          		tmp = math.pow(a, 2.0) + (t_1 * t_1)
                          	return tmp
                          
                          angle_m = abs(angle)
                          function code(a, b, angle_m)
                          	t_0 = Float64(pi * Float64(0.005555555555555556 * b))
                          	t_1 = Float64(angle_m * t_0)
                          	tmp = 0.0
                          	if (b <= 2e-235)
                          		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(angle_m * Float64(b * t_0)))));
                          	else
                          		tmp = Float64((a ^ 2.0) + Float64(t_1 * t_1));
                          	end
                          	return tmp
                          end
                          
                          angle_m = abs(angle);
                          function tmp_2 = code(a, b, angle_m)
                          	t_0 = pi * (0.005555555555555556 * b);
                          	t_1 = angle_m * t_0;
                          	tmp = 0.0;
                          	if (b <= 2e-235)
                          		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (angle_m * (b * t_0))));
                          	else
                          		tmp = (a ^ 2.0) + (t_1 * t_1);
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          angle_m = N[Abs[angle], $MachinePrecision]
                          code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(angle$95$m * t$95$0), $MachinePrecision]}, If[LessEqual[b, 2e-235], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(angle$95$m * N[(b * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(t$95$1 * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
                          
                          \begin{array}{l}
                          angle_m = \left|angle\right|
                          
                          \\
                          \begin{array}{l}
                          t_0 := \pi \cdot \left(0.005555555555555556 \cdot b\right)\\
                          t_1 := angle\_m \cdot t\_0\\
                          \mathbf{if}\;b \leq 2 \cdot 10^{-235}:\\
                          \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot t\_0\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;{a}^{2} + t\_1 \cdot t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if b < 1.9999999999999999e-235

                            1. Initial program 83.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. Simplified83.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 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.9999999999999999e-235 < b

                              1. Initial program 81.5%

                                \[{\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 angle around 0 81.3%

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{\left(\left(\left(0.005555555555555556 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(\left(\left(0.005555555555555556 \cdot b\right) \cdot \pi\right) \cdot angle\right)} \]
                              3. Recombined 2 regimes into one program.
                              4. Final simplification76.6%

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

                              Alternative 12: 73.1% accurate, 3.4× speedup?

                              \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \pi \cdot \left(0.005555555555555556 \cdot b\right)\\ \mathbf{if}\;b \leq 3.8 \cdot 10^{-222}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + b \cdot \left(angle\_m \cdot \left(t\_0 \cdot \frac{angle\_m}{\frac{180}{\pi}}\right)\right)\\ \end{array} \end{array} \]
                              angle_m = (fabs.f64 angle)
                              (FPCore (a b angle_m)
                               :precision binary64
                               (let* ((t_0 (* PI (* 0.005555555555555556 b))))
                                 (if (<= b 3.8e-222)
                                   (+
                                    (pow a 2.0)
                                    (* angle_m (* (* 0.005555555555555556 PI) (* angle_m (* b t_0)))))
                                   (+ (pow a 2.0) (* b (* angle_m (* t_0 (/ angle_m (/ 180.0 PI)))))))))
                              angle_m = fabs(angle);
                              double code(double a, double b, double angle_m) {
                              	double t_0 = ((double) M_PI) * (0.005555555555555556 * b);
                              	double tmp;
                              	if (b <= 3.8e-222) {
                              		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (angle_m * (b * t_0))));
                              	} else {
                              		tmp = pow(a, 2.0) + (b * (angle_m * (t_0 * (angle_m / (180.0 / ((double) M_PI))))));
                              	}
                              	return tmp;
                              }
                              
                              angle_m = Math.abs(angle);
                              public static double code(double a, double b, double angle_m) {
                              	double t_0 = Math.PI * (0.005555555555555556 * b);
                              	double tmp;
                              	if (b <= 3.8e-222) {
                              		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (angle_m * (b * t_0))));
                              	} else {
                              		tmp = Math.pow(a, 2.0) + (b * (angle_m * (t_0 * (angle_m / (180.0 / Math.PI)))));
                              	}
                              	return tmp;
                              }
                              
                              angle_m = math.fabs(angle)
                              def code(a, b, angle_m):
                              	t_0 = math.pi * (0.005555555555555556 * b)
                              	tmp = 0
                              	if b <= 3.8e-222:
                              		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (angle_m * (b * t_0))))
                              	else:
                              		tmp = math.pow(a, 2.0) + (b * (angle_m * (t_0 * (angle_m / (180.0 / math.pi)))))
                              	return tmp
                              
                              angle_m = abs(angle)
                              function code(a, b, angle_m)
                              	t_0 = Float64(pi * Float64(0.005555555555555556 * b))
                              	tmp = 0.0
                              	if (b <= 3.8e-222)
                              		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(angle_m * Float64(b * t_0)))));
                              	else
                              		tmp = Float64((a ^ 2.0) + Float64(b * Float64(angle_m * Float64(t_0 * Float64(angle_m / Float64(180.0 / pi))))));
                              	end
                              	return tmp
                              end
                              
                              angle_m = abs(angle);
                              function tmp_2 = code(a, b, angle_m)
                              	t_0 = pi * (0.005555555555555556 * b);
                              	tmp = 0.0;
                              	if (b <= 3.8e-222)
                              		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (angle_m * (b * t_0))));
                              	else
                              		tmp = (a ^ 2.0) + (b * (angle_m * (t_0 * (angle_m / (180.0 / pi)))));
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              angle_m = N[Abs[angle], $MachinePrecision]
                              code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 3.8e-222], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(angle$95$m * N[(b * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(b * N[(angle$95$m * N[(t$95$0 * N[(angle$95$m / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              angle_m = \left|angle\right|
                              
                              \\
                              \begin{array}{l}
                              t_0 := \pi \cdot \left(0.005555555555555556 \cdot b\right)\\
                              \mathbf{if}\;b \leq 3.8 \cdot 10^{-222}:\\
                              \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot t\_0\right)\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;{a}^{2} + b \cdot \left(angle\_m \cdot \left(t\_0 \cdot \frac{angle\_m}{\frac{180}{\pi}}\right)\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if b < 3.79999999999999997e-222

                                1. Initial program 82.9%

                                  \[{\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. Simplified82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 3.79999999999999997e-222 < b

                                  1. Initial program 82.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. Simplified82.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 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto {\left(a \cdot 1\right)}^{2} + \color{blue}{b \cdot \left(angle \cdot \left(\frac{angle}{\frac{180}{\pi}} \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Final simplification75.9%

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

                                  Alternative 13: 74.9% accurate, 3.4× speedup?

                                  \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \pi \cdot \left(0.005555555555555556 \cdot b\right)\\ \mathbf{if}\;angle\_m \leq 4.5 \cdot 10^{-73}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(b \cdot \left(angle\_m \cdot t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot t\_0\right)\right)\right)\\ \end{array} \end{array} \]
                                  angle_m = (fabs.f64 angle)
                                  (FPCore (a b angle_m)
                                   :precision binary64
                                   (let* ((t_0 (* PI (* 0.005555555555555556 b))))
                                     (if (<= angle_m 4.5e-73)
                                       (+
                                        (pow a 2.0)
                                        (* angle_m (* (* 0.005555555555555556 PI) (* b (* angle_m t_0)))))
                                       (+
                                        (pow a 2.0)
                                        (* angle_m (* (* 0.005555555555555556 PI) (* angle_m (* b t_0))))))))
                                  angle_m = fabs(angle);
                                  double code(double a, double b, double angle_m) {
                                  	double t_0 = ((double) M_PI) * (0.005555555555555556 * b);
                                  	double tmp;
                                  	if (angle_m <= 4.5e-73) {
                                  		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (b * (angle_m * t_0))));
                                  	} else {
                                  		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (angle_m * (b * t_0))));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  angle_m = Math.abs(angle);
                                  public static double code(double a, double b, double angle_m) {
                                  	double t_0 = Math.PI * (0.005555555555555556 * b);
                                  	double tmp;
                                  	if (angle_m <= 4.5e-73) {
                                  		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (b * (angle_m * t_0))));
                                  	} else {
                                  		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (angle_m * (b * t_0))));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  angle_m = math.fabs(angle)
                                  def code(a, b, angle_m):
                                  	t_0 = math.pi * (0.005555555555555556 * b)
                                  	tmp = 0
                                  	if angle_m <= 4.5e-73:
                                  		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (b * (angle_m * t_0))))
                                  	else:
                                  		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (angle_m * (b * t_0))))
                                  	return tmp
                                  
                                  angle_m = abs(angle)
                                  function code(a, b, angle_m)
                                  	t_0 = Float64(pi * Float64(0.005555555555555556 * b))
                                  	tmp = 0.0
                                  	if (angle_m <= 4.5e-73)
                                  		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(b * Float64(angle_m * t_0)))));
                                  	else
                                  		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(angle_m * Float64(b * t_0)))));
                                  	end
                                  	return tmp
                                  end
                                  
                                  angle_m = abs(angle);
                                  function tmp_2 = code(a, b, angle_m)
                                  	t_0 = pi * (0.005555555555555556 * b);
                                  	tmp = 0.0;
                                  	if (angle_m <= 4.5e-73)
                                  		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (b * (angle_m * t_0))));
                                  	else
                                  		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (angle_m * (b * t_0))));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  angle_m = N[Abs[angle], $MachinePrecision]
                                  code[a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle$95$m, 4.5e-73], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(b * N[(angle$95$m * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(angle$95$m * N[(b * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                  
                                  \begin{array}{l}
                                  angle_m = \left|angle\right|
                                  
                                  \\
                                  \begin{array}{l}
                                  t_0 := \pi \cdot \left(0.005555555555555556 \cdot b\right)\\
                                  \mathbf{if}\;angle\_m \leq 4.5 \cdot 10^{-73}:\\
                                  \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(b \cdot \left(angle\_m \cdot t\_0\right)\right)\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot t\_0\right)\right)\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if angle < 4.5e-73

                                    1. Initial program 88.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. Simplified88.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 88.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 4.5e-73 < angle

                                      1. Initial program 68.9%

                                        \[{\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. Simplified68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 14: 74.2% accurate, 3.4× speedup?

                                      \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.1 \cdot 10^{-141}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(b \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\pi \cdot b\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
                                      angle_m = (fabs.f64 angle)
                                      (FPCore (a b angle_m)
                                       :precision binary64
                                       (if (<= angle_m 2.1e-141)
                                         (+
                                          (pow a 2.0)
                                          (*
                                           angle_m
                                           (*
                                            (* 0.005555555555555556 PI)
                                            (* b (* 0.005555555555555556 (* angle_m (* PI b)))))))
                                         (+
                                          (pow a 2.0)
                                          (*
                                           angle_m
                                           (*
                                            (* 0.005555555555555556 PI)
                                            (* angle_m (* b (* PI (* 0.005555555555555556 b)))))))))
                                      angle_m = fabs(angle);
                                      double code(double a, double b, double angle_m) {
                                      	double tmp;
                                      	if (angle_m <= 2.1e-141) {
                                      		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (b * (0.005555555555555556 * (angle_m * (((double) M_PI) * b))))));
                                      	} else {
                                      		tmp = pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (angle_m * (b * (((double) M_PI) * (0.005555555555555556 * b))))));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      angle_m = Math.abs(angle);
                                      public static double code(double a, double b, double angle_m) {
                                      	double tmp;
                                      	if (angle_m <= 2.1e-141) {
                                      		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (b * (0.005555555555555556 * (angle_m * (Math.PI * b))))));
                                      	} else {
                                      		tmp = Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (angle_m * (b * (Math.PI * (0.005555555555555556 * b))))));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      angle_m = math.fabs(angle)
                                      def code(a, b, angle_m):
                                      	tmp = 0
                                      	if angle_m <= 2.1e-141:
                                      		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (b * (0.005555555555555556 * (angle_m * (math.pi * b))))))
                                      	else:
                                      		tmp = math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (angle_m * (b * (math.pi * (0.005555555555555556 * b))))))
                                      	return tmp
                                      
                                      angle_m = abs(angle)
                                      function code(a, b, angle_m)
                                      	tmp = 0.0
                                      	if (angle_m <= 2.1e-141)
                                      		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(b * Float64(0.005555555555555556 * Float64(angle_m * Float64(pi * b)))))));
                                      	else
                                      		tmp = Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(angle_m * Float64(b * Float64(pi * Float64(0.005555555555555556 * b)))))));
                                      	end
                                      	return tmp
                                      end
                                      
                                      angle_m = abs(angle);
                                      function tmp_2 = code(a, b, angle_m)
                                      	tmp = 0.0;
                                      	if (angle_m <= 2.1e-141)
                                      		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (b * (0.005555555555555556 * (angle_m * (pi * b))))));
                                      	else
                                      		tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (angle_m * (b * (pi * (0.005555555555555556 * b))))));
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      angle_m = N[Abs[angle], $MachinePrecision]
                                      code[a_, b_, angle$95$m_] := If[LessEqual[angle$95$m, 2.1e-141], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(b * N[(0.005555555555555556 * N[(angle$95$m * N[(Pi * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(angle$95$m * N[(b * N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      angle_m = \left|angle\right|
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;angle\_m \leq 2.1 \cdot 10^{-141}:\\
                                      \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(b \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\pi \cdot b\right)\right)\right)\right)\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;{a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right)\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if angle < 2.0999999999999999e-141

                                        1. Initial program 87.6%

                                          \[{\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. Simplified87.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 2.0999999999999999e-141 < angle

                                          1. Initial program 72.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. Simplified72.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 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 15: 70.9% accurate, 3.5× speedup?

                                          \[\begin{array}{l} angle_m = \left|angle\right| \\ {a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right) \end{array} \]
                                          angle_m = (fabs.f64 angle)
                                          (FPCore (a b angle_m)
                                           :precision binary64
                                           (+
                                            (pow a 2.0)
                                            (*
                                             angle_m
                                             (*
                                              (* 0.005555555555555556 PI)
                                              (* angle_m (* b (* PI (* 0.005555555555555556 b))))))))
                                          angle_m = fabs(angle);
                                          double code(double a, double b, double angle_m) {
                                          	return pow(a, 2.0) + (angle_m * ((0.005555555555555556 * ((double) M_PI)) * (angle_m * (b * (((double) M_PI) * (0.005555555555555556 * b))))));
                                          }
                                          
                                          angle_m = Math.abs(angle);
                                          public static double code(double a, double b, double angle_m) {
                                          	return Math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * Math.PI) * (angle_m * (b * (Math.PI * (0.005555555555555556 * b))))));
                                          }
                                          
                                          angle_m = math.fabs(angle)
                                          def code(a, b, angle_m):
                                          	return math.pow(a, 2.0) + (angle_m * ((0.005555555555555556 * math.pi) * (angle_m * (b * (math.pi * (0.005555555555555556 * b))))))
                                          
                                          angle_m = abs(angle)
                                          function code(a, b, angle_m)
                                          	return Float64((a ^ 2.0) + Float64(angle_m * Float64(Float64(0.005555555555555556 * pi) * Float64(angle_m * Float64(b * Float64(pi * Float64(0.005555555555555556 * b)))))))
                                          end
                                          
                                          angle_m = abs(angle);
                                          function tmp = code(a, b, angle_m)
                                          	tmp = (a ^ 2.0) + (angle_m * ((0.005555555555555556 * pi) * (angle_m * (b * (pi * (0.005555555555555556 * b))))));
                                          end
                                          
                                          angle_m = N[Abs[angle], $MachinePrecision]
                                          code[a_, b_, angle$95$m_] := N[(N[Power[a, 2.0], $MachinePrecision] + N[(angle$95$m * N[(N[(0.005555555555555556 * Pi), $MachinePrecision] * N[(angle$95$m * N[(b * N[(Pi * N[(0.005555555555555556 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          angle_m = \left|angle\right|
                                          
                                          \\
                                          {a}^{2} + angle\_m \cdot \left(\left(0.005555555555555556 \cdot \pi\right) \cdot \left(angle\_m \cdot \left(b \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot b\right)\right)\right)\right)\right)
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 82.6%

                                            \[{\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. Simplified82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            Reproduce

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