ab-angle->ABCF A

Percentage Accurate: 79.6% → 79.5%
Time: 16.4s
Alternatives: 14
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 79.6% accurate, 1.0× speedup?

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

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

Alternative 1: 79.5% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
t_0 := a \cdot \left(angle\_m \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\\
\mathbf{if}\;angle\_m \leq 0.94:\\
\;\;\;\;\left(b \cdot b\right) \cdot \left(\left(\left(angle\_m \cdot angle\_m\right) \cdot -3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\pi \cdot \pi\right) + 1\right) + t\_0 \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;b \cdot b + \left(a \cdot a\right) \cdot \left(0.5 + \cos \left(\left(angle\_m \cdot \left(\pi + 1\right) - angle\_m\right) \cdot 0.011111111111111112\right) \cdot -0.5\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 0.93999999999999995

    1. Initial program 86.8%

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

        \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
      2. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      4. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      8. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
    3. Simplified87.0%

      \[\leadsto \color{blue}{{\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{180}{angle \cdot \mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      2. associate-/r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      3. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      4. expm1-log1p-uN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      5. expm1-undefineN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}}\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      10. log1p-undefineN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\log \left(1 + \mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      11. rem-exp-logN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(1 + \mathsf{PI}\left(\right)\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{PI}\left(\right) + 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      14. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      16. /-lowering-/.f6486.9%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
    6. Applied egg-rr86.9%

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

      \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + {a}^{2} \cdot {\left(\frac{1}{180} \cdot \left(1 + \mathsf{PI}\left(\right)\right) - \frac{1}{180}\right)}^{2}\right) + {b}^{2}} \]
    8. Simplified71.0%

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

    if 0.93999999999999995 < angle

    1. Initial program 60.9%

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

        \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
      2. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      4. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      8. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
    3. Simplified60.9%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
    6. Step-by-step derivation
      1. Simplified60.1%

        \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
      2. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{180}{angle \cdot \mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        2. associate-/r*N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        3. clear-numN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        4. expm1-log1p-uN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        5. expm1-undefineN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        6. log1p-undefineN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\log \left(1 + \mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        7. +-commutativeN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\log \left(\mathsf{PI}\left(\right) + 1\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        8. rem-exp-logN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        9. sub-divN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right) + 1}{\frac{180}{angle}} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        10. associate-/r/N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right) + 1}{180} \cdot angle - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        11. associate-*l/N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle}{180} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        12. clear-numN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle}{180} - \frac{angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        13. sub-divN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle - angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        14. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle - angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        15. --lowering--.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        16. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) + 1\right), angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        17. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{PI}\left(\right), 1\right), angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        18. PI-lowering-PI.f6460.1%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
      3. Applied egg-rr60.1%

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

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

        \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(0.5 + \cos \left(\left(angle \cdot \left(\pi + 1\right) - angle\right) \cdot 0.011111111111111112\right) \cdot -0.5\right) + b \cdot b} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification68.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 0.94:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(\left(\left(angle \cdot angle\right) \cdot -3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\pi \cdot \pi\right) + 1\right) + \left(a \cdot \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot b + \left(a \cdot a\right) \cdot \left(0.5 + \cos \left(\left(angle \cdot \left(\pi + 1\right) - angle\right) \cdot 0.011111111111111112\right) \cdot -0.5\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 79.5% accurate, 0.7× speedup?

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

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

        \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
      2. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      4. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      8. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
    3. Simplified81.6%

      \[\leadsto \color{blue}{{\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cube-cbrtN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\left(\frac{angle \cdot \left(\left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)}{180}\right)\right)\right), 2\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\left(\frac{\left(angle \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right) \cdot \sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right), 2\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\left(\left(angle \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right) \cdot \frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right), 2\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\left(angle \cdot \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\sqrt[3]{\mathsf{PI}\left(\right)} \cdot \sqrt[3]{\mathsf{PI}\left(\right)}\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      6. pow2N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left({\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right)}^{2}\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      7. pow1/3N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left({\left({\mathsf{PI}\left(\right)}^{\frac{1}{3}}\right)}^{2}\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      8. pow-powN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left({\mathsf{PI}\left(\right)}^{\left(\frac{1}{3} \cdot 2\right)}\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{pow.f64}\left(\mathsf{PI}\left(\right), \left(\frac{1}{3} \cdot 2\right)\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      10. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \left(\frac{1}{3} \cdot 2\right)\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      11. metadata-evalN/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{2}{3}\right)\right), \left(\frac{\sqrt[3]{\mathsf{PI}\left(\right)}}{180}\right)\right)\right)\right), 2\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{2}{3}\right)\right), \mathsf{/.f64}\left(\left(\sqrt[3]{\mathsf{PI}\left(\right)}\right), 180\right)\right)\right)\right), 2\right)\right) \]
      13. cbrt-lowering-cbrt.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{2}{3}\right)\right), \mathsf{/.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{PI}\left(\right)\right), 180\right)\right)\right)\right), 2\right)\right) \]
      14. PI-lowering-PI.f6481.7%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{pow.f64}\left(\mathsf{PI.f64}\left(\right), \frac{2}{3}\right)\right), \mathsf{/.f64}\left(\mathsf{cbrt.f64}\left(\mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right)\right), 2\right)\right) \]
    6. Applied egg-rr81.7%

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

    Alternative 3: 79.4% accurate, 2.0× speedup?

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

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

        \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
      2. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      4. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      8. PI-lowering-PI.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
      9. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
    3. Simplified81.6%

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
    6. Step-by-step derivation
      1. Simplified81.6%

        \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
      2. Step-by-step derivation
        1. *-rgt-identityN/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({b}^{2}\right)\right) \]
        2. pow2N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left(b \cdot \color{blue}{b}\right)\right) \]
        3. *-lowering-*.f6481.6%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right) \]
      3. Applied egg-rr81.6%

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

      Alternative 4: 79.5% accurate, 2.0× speedup?

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

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

          \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
        2. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
        3. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
        4. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
        5. associate-*l/N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
        8. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
        9. pow-lowering-pow.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
      3. Simplified81.6%

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
      6. Step-by-step derivation
        1. Simplified81.6%

          \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
        2. Step-by-step derivation
          1. *-rgt-identityN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({b}^{2}\right)\right) \]
          2. pow2N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left(b \cdot \color{blue}{b}\right)\right) \]
          3. *-lowering-*.f6481.6%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right) \]
        3. Applied egg-rr81.6%

          \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + \color{blue}{b \cdot b} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
          2. associate-/l*N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\left(\frac{angle}{180}\right), \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
          6. PI-lowering-PI.f6481.6%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
        5. Applied egg-rr81.6%

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

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

        Alternative 5: 79.5% accurate, 3.3× speedup?

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

          1. Initial program 86.8%

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

              \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
            2. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            4. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            5. associate-*l/N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            8. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            9. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
          3. Simplified87.0%

            \[\leadsto \color{blue}{{\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2}} \]
          4. Add Preprocessing
          5. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{180}{angle \cdot \mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            2. associate-/r*N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            3. clear-numN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            4. expm1-log1p-uN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            5. expm1-undefineN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            6. div-subN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            7. clear-numN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            8. --lowering--.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}}\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            9. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            10. log1p-undefineN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\log \left(1 + \mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            11. rem-exp-logN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(1 + \mathsf{PI}\left(\right)\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            12. +-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{PI}\left(\right) + 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            13. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            14. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            15. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            16. /-lowering-/.f6486.9%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
          6. Applied egg-rr86.9%

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

            \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + {a}^{2} \cdot {\left(\frac{1}{180} \cdot \left(1 + \mathsf{PI}\left(\right)\right) - \frac{1}{180}\right)}^{2}\right) + {b}^{2}} \]
          8. Simplified71.0%

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

          if 0.160000000000000003 < angle

          1. Initial program 60.9%

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

              \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
            2. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            4. sin-lowering-sin.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            5. associate-*l/N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            8. PI-lowering-PI.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
            9. pow-lowering-pow.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
          3. Simplified60.9%

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
          6. Step-by-step derivation
            1. Simplified60.1%

              \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
            2. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{180}{angle \cdot \mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              2. associate-/r*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              3. clear-numN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              4. expm1-log1p-uN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              5. expm1-undefineN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              6. log1p-undefineN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\log \left(1 + \mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              7. +-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\log \left(\mathsf{PI}\left(\right) + 1\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              8. rem-exp-logN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              9. sub-divN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right) + 1}{\frac{180}{angle}} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              10. associate-/r/N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right) + 1}{180} \cdot angle - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              11. associate-*l/N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle}{180} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              12. clear-numN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle}{180} - \frac{angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              13. sub-divN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle - angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              14. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle - angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              15. --lowering--.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\left(\mathsf{PI}\left(\right) + 1\right) \cdot angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{PI}\left(\right) + 1\right), angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              17. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{PI}\left(\right), 1\right), angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
              18. PI-lowering-PI.f6460.1%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), angle\right), angle\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
            3. Applied egg-rr60.1%

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

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

              \[\leadsto \color{blue}{{a}^{2} \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right) + {b}^{2}} \]
            6. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto {b}^{2} + \color{blue}{{a}^{2} \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)} \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left({a}^{2} \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)\right)}\right) \]
              3. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{{a}^{2}} \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)\right)\right) \]
              4. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{{a}^{2}} \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)\right)\right) \]
              5. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)}\right)\right) \]
              6. unpow2N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left(a \cdot a\right), \left(\color{blue}{\frac{1}{2}} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\color{blue}{\frac{1}{2}} - \frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)\right)\right) \]
              8. sub-negN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\frac{1}{2} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)\right)}\right)\right)\right) \]
              9. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{2}, \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right)\right)\right)}\right)\right)\right) \]
              10. *-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(\mathsf{neg}\left(\cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right) \cdot \frac{1}{2}\right)\right)\right)\right)\right) \]
              11. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{2}, \left(\cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{+.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\cos \left(\frac{1}{90} \cdot \left(angle \cdot \left(1 + \mathsf{PI}\left(\right)\right) - angle\right)\right), \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}\right)\right)\right)\right) \]
            7. Simplified60.2%

              \[\leadsto \color{blue}{b \cdot b + \left(a \cdot a\right) \cdot \left(0.5 + \cos \left(0.011111111111111112 \cdot \left(angle \cdot \left(-1 + \left(1 + \pi\right)\right)\right)\right) \cdot -0.5\right)} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification68.8%

            \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 0.16:\\ \;\;\;\;\left(b \cdot b\right) \cdot \left(\left(\left(angle \cdot angle\right) \cdot -3.08641975308642 \cdot 10^{-5}\right) \cdot \left(\pi \cdot \pi\right) + 1\right) + \left(a \cdot \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot b + \left(a \cdot a\right) \cdot \left(0.5 + -0.5 \cdot \cos \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi + 1\right) + -1\right)\right)\right)\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 6: 79.5% accurate, 3.4× speedup?

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

            1. Initial program 86.8%

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

                \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
              2. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              4. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              5. associate-*l/N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              9. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
            3. Simplified87.0%

              \[\leadsto \color{blue}{{\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2}} \]
            4. Add Preprocessing
            5. Step-by-step derivation
              1. clear-numN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{180}{angle \cdot \mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              2. associate-/r*N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              3. clear-numN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              4. expm1-log1p-uN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              5. expm1-undefineN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              6. div-subN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              7. clear-numN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              8. --lowering--.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}}\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              9. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              10. log1p-undefineN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\log \left(1 + \mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              11. rem-exp-logN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(1 + \mathsf{PI}\left(\right)\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              12. +-commutativeN/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{PI}\left(\right) + 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              13. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              14. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              15. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              16. /-lowering-/.f6486.9%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
            6. Applied egg-rr86.9%

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

              \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + {a}^{2} \cdot {\left(\frac{1}{180} \cdot \left(1 + \mathsf{PI}\left(\right)\right) - \frac{1}{180}\right)}^{2}\right) + {b}^{2}} \]
            8. Simplified71.0%

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

            if 0.204999999999999988 < angle

            1. Initial program 60.9%

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

                \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
              2. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              4. sin-lowering-sin.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              5. associate-*l/N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              6. /-lowering-/.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              7. *-lowering-*.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              8. PI-lowering-PI.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
              9. pow-lowering-pow.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
            3. Simplified60.9%

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
            6. Step-by-step derivation
              1. Simplified60.1%

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
              2. Step-by-step derivation
                1. *-rgt-identityN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({b}^{2}\right)\right) \]
                2. pow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left(b \cdot \color{blue}{b}\right)\right) \]
                3. *-lowering-*.f6460.1%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right) \]
              3. Applied egg-rr60.1%

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + \color{blue}{b \cdot b} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

                  \[\leadsto b \cdot b + \color{blue}{{\left(a \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2}} \]
                2. pow2N/A

                  \[\leadsto {b}^{2} + {\color{blue}{\left(a \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}}^{2} \]
                3. *-rgt-identityN/A

                  \[\leadsto {\left(b \cdot 1\right)}^{2} + {\left(\color{blue}{a} \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2} \]
                4. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\left({\left(b \cdot 1\right)}^{2}\right), \color{blue}{\left({\left(a \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2}\right)}\right) \]
                5. *-rgt-identityN/A

                  \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \left({\left(\color{blue}{a} \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2}\right)\right) \]
                6. pow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left({\color{blue}{\left(a \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}}^{2}\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({\color{blue}{\left(a \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}}^{2}\right)\right) \]
                8. unpow-prod-downN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2} \cdot \color{blue}{{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}^{2}}\right)\right) \]
                9. pow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(a \cdot a\right) \cdot {\color{blue}{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}}^{2}\right)\right) \]
                10. associate-*l*N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{\left(a \cdot {\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}^{2}\right)}\right)\right) \]
                11. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{\left(a \cdot {\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}^{2}\right)}\right)\right) \]
                12. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \color{blue}{\left({\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}^{2}\right)}\right)\right)\right) \]
                13. unpow2N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \left(\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right) \cdot \color{blue}{\sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right) \]
                14. sqr-sin-aN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \left(\frac{1}{2} - \color{blue}{\frac{1}{2} \cdot \cos \left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right) \]
                15. --lowering--.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \color{blue}{\left(\frac{1}{2} \cdot \cos \left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}\right)\right)\right)\right) \]
                16. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \color{blue}{\cos \left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)}\right)\right)\right)\right)\right) \]
                17. cos-lowering-cos.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\left(2 \cdot \frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right) \]
                18. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right)\right)\right)\right)\right)\right) \]
                19. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{1}{\frac{180}{angle \cdot \mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right)\right)\right)\right) \]
                20. associate-/r*N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right)\right)\right)\right) \]
              5. Applied egg-rr59.9%

                \[\leadsto \color{blue}{b \cdot b + a \cdot \left(a \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot \frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]
            7. Recombined 2 regimes into one program.
            8. Final simplification68.7%

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

            Alternative 7: 76.8% accurate, 11.6× speedup?

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

              1. Initial program 86.8%

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

                  \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                2. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                4. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                5. associate-*l/N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                6. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                8. PI-lowering-PI.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                9. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
              3. Simplified87.0%

                \[\leadsto \color{blue}{{\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2}} \]
              4. Add Preprocessing
              5. Step-by-step derivation
                1. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{180}{angle \cdot \mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                2. associate-/r*N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1}{\frac{\frac{180}{angle}}{\mathsf{PI}\left(\right)}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                3. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                4. expm1-log1p-uN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)\right)}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                5. expm1-undefineN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)} - 1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                6. div-subN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{1}{\frac{180}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                7. clear-numN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}} - \frac{angle}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                8. --lowering--.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}}\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                9. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                10. log1p-undefineN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(e^{\log \left(1 + \mathsf{PI}\left(\right)\right)}\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                11. rem-exp-logN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(1 + \mathsf{PI}\left(\right)\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                12. +-commutativeN/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\left(\mathsf{PI}\left(\right) + 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                13. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                14. PI-lowering-PI.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \left(\frac{180}{angle}\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                15. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \left(\frac{angle}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
                16. /-lowering-/.f6486.9%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(180, angle\right)\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
              6. Applied egg-rr86.9%

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

                \[\leadsto \color{blue}{{angle}^{2} \cdot \left(\frac{-1}{32400} \cdot \left({b}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + {a}^{2} \cdot {\left(\frac{1}{180} \cdot \left(1 + \mathsf{PI}\left(\right)\right) - \frac{1}{180}\right)}^{2}\right) + {b}^{2}} \]
              8. Simplified71.0%

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

              if 53 < angle

              1. Initial program 60.9%

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

                  \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                2. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                3. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                4. sin-lowering-sin.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                5. associate-*l/N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                6. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                7. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                8. PI-lowering-PI.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                9. pow-lowering-pow.f64N/A

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
              3. Simplified60.9%

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
              6. Step-by-step derivation
                1. Simplified60.1%

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

                  \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                  2. associate-*r*N/A

                    \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                  3. associate-*l*N/A

                    \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                  4. +-commutativeN/A

                    \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                  5. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                  6. unpow2N/A

                    \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                  8. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                  9. associate-*l*N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                4. Simplified52.1%

                  \[\leadsto \color{blue}{b \cdot b + \left(\left(\left(a \cdot a\right) \cdot \pi\right) \cdot \pi\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right)} \]
                5. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right) \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                  2. associate-*r*N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left(\frac{1}{32400} \cdot angle\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                  3. associate-*l*N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\frac{1}{32400} \cdot angle\right) \cdot \color{blue}{\left(angle \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
                  4. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left(\frac{1}{32400} \cdot angle\right), \color{blue}{\left(angle \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left(angle \cdot \frac{1}{32400}\right), \left(\color{blue}{angle} \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \left(\color{blue}{angle} \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \color{blue}{\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                  8. associate-*l*N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \left(\left(a \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                  9. associate-*l*N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \left(a \cdot \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right) \]
                  11. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(a \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
                  12. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                  13. PI-lowering-PI.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                  14. PI-lowering-PI.f6456.0%

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right) \]
                6. Applied egg-rr56.0%

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

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

              Alternative 8: 67.0% accurate, 18.9× speedup?

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

                1. Initial program 79.5%

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

                  \[\leadsto \color{blue}{{b}^{2}} \]
                4. Step-by-step derivation
                  1. unpow2N/A

                    \[\leadsto b \cdot \color{blue}{b} \]
                  2. *-lowering-*.f6460.5%

                    \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{b}\right) \]
                5. Simplified60.5%

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

                if 1.02000000000000007e-82 < a

                1. Initial program 86.4%

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

                    \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                  2. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                  4. sin-lowering-sin.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                  5. associate-*l/N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                  6. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                  8. PI-lowering-PI.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                  9. pow-lowering-pow.f64N/A

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                3. Simplified86.5%

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified86.2%

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

                    \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                    2. associate-*r*N/A

                      \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                    3. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                    4. +-commutativeN/A

                      \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                    5. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                    6. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                    8. *-commutativeN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                    9. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                  4. Simplified69.5%

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

                    \[\leadsto \color{blue}{{b}^{2} \cdot \left(1 + \frac{1}{32400} \cdot \frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}}\right)} \]
                  6. Step-by-step derivation
                    1. distribute-rgt-inN/A

                      \[\leadsto 1 \cdot {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}}\right) \cdot {b}^{2}} \]
                    2. *-lft-identityN/A

                      \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}}\right)} \cdot {b}^{2} \]
                    3. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}}\right) \cdot {b}^{2}\right)}\right) \]
                    4. unpow2N/A

                      \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}}\right)} \cdot {b}^{2}\right)\right) \]
                    5. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}}\right)} \cdot {b}^{2}\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\frac{1}{32400} \cdot \color{blue}{\left(\frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}} \cdot {b}^{2}\right)}\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\frac{1}{32400}, \color{blue}{\left(\frac{{a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}{{b}^{2}} \cdot {b}^{2}\right)}\right)\right) \]
                    8. associate-*l/N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(\frac{\left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {b}^{2}}{\color{blue}{{b}^{2}}}\right)\right)\right) \]
                    9. associate-/l*N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(\left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{\frac{{b}^{2}}{{b}^{2}}}\right)\right)\right) \]
                    10. *-inversesN/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(\left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot 1\right)\right)\right) \]
                    11. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right), \color{blue}{1}\right)\right)\right) \]
                  7. Simplified83.0%

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

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

                Alternative 9: 71.8% accurate, 18.9× speedup?

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

                  1. Initial program 79.2%

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

                      \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                    2. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                    3. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                    4. sin-lowering-sin.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                    5. associate-*l/N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                    6. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                    8. PI-lowering-PI.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                    9. pow-lowering-pow.f64N/A

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                  3. Simplified79.4%

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified79.4%

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

                      \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                      2. associate-*r*N/A

                        \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                      3. associate-*l*N/A

                        \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                      4. +-commutativeN/A

                        \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                      5. +-lowering-+.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                      6. unpow2N/A

                        \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                      8. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                      9. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                      10. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                    4. Simplified65.1%

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(\frac{1}{32400} \cdot angle\right) \cdot \color{blue}{angle}\right)\right)\right) \]
                      2. associate-*r*N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{1}{32400} \cdot angle\right)\right) \cdot \color{blue}{angle}\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left(\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{1}{32400} \cdot angle\right)\right), \color{blue}{angle}\right)\right) \]
                      4. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      5. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(a \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \mathsf{PI}\left(\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot \left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      8. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(a \cdot \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      9. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      10. PI-lowering-PI.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      11. PI-lowering-PI.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI.f64}\left(\right)\right)\right), \left(\frac{1}{32400} \cdot angle\right)\right), angle\right)\right) \]
                      12. *-commutativeN/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI.f64}\left(\right)\right)\right), \left(angle \cdot \frac{1}{32400}\right)\right), angle\right)\right) \]
                      13. *-lowering-*.f6471.3%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{*.f64}\left(angle, \frac{1}{32400}\right)\right), angle\right)\right) \]
                    6. Applied egg-rr71.3%

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

                    if 4.20000000000000033e153 < a

                    1. Initial program 99.7%

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

                        \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                      2. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                      3. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                      4. sin-lowering-sin.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                      5. associate-*l/N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                      6. /-lowering-/.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                      7. *-lowering-*.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                      8. PI-lowering-PI.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                      9. pow-lowering-pow.f64N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                    3. Simplified99.7%

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                    6. Step-by-step derivation
                      1. Simplified99.7%

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

                        \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                      3. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                        2. associate-*r*N/A

                          \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                        3. associate-*l*N/A

                          \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                        4. +-commutativeN/A

                          \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                        5. +-lowering-+.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                        6. unpow2N/A

                          \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                        7. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                        8. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                        9. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                        10. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                      4. Simplified68.9%

                        \[\leadsto \color{blue}{b \cdot b + \left(\left(\left(a \cdot a\right) \cdot \pi\right) \cdot \pi\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right)} \]
                      5. Step-by-step derivation
                        1. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)}\right)\right) \]
                        2. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(a \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right) \]
                        3. associate-*l*N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)}\right)\right) \]
                        4. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)}\right)\right) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(a \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)}\right)\right)\right) \]
                        6. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI}\left(\right)\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                        7. PI-lowering-PI.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                        8. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)}\right)\right)\right)\right) \]
                        9. PI-lowering-PI.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                        10. associate-*r*N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\left(\frac{1}{32400} \cdot angle\right) \cdot \color{blue}{angle}\right)\right)\right)\right)\right) \]
                        11. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(angle \cdot \color{blue}{\left(\frac{1}{32400} \cdot angle\right)}\right)\right)\right)\right)\right) \]
                        12. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \color{blue}{\left(\frac{1}{32400} \cdot angle\right)}\right)\right)\right)\right)\right) \]
                        13. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \left(angle \cdot \color{blue}{\frac{1}{32400}}\right)\right)\right)\right)\right)\right) \]
                        14. *-lowering-*.f6489.6%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{32400}}\right)\right)\right)\right)\right)\right) \]
                      6. Applied egg-rr89.6%

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

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

                    Alternative 10: 71.8% accurate, 18.9× speedup?

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

                      1. Initial program 79.2%

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

                          \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                        2. pow-lowering-pow.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                        3. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                        4. sin-lowering-sin.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                        5. associate-*l/N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                        6. /-lowering-/.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                        7. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                        8. PI-lowering-PI.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                        9. pow-lowering-pow.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                      3. Simplified79.4%

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                      6. Step-by-step derivation
                        1. Simplified79.4%

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

                          \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                          2. associate-*r*N/A

                            \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                          3. associate-*l*N/A

                            \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                          4. +-commutativeN/A

                            \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                          5. +-lowering-+.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                          6. unpow2N/A

                            \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                          7. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                          8. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                          9. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                          10. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                        4. Simplified65.1%

                          \[\leadsto \color{blue}{b \cdot b + \left(\left(\left(a \cdot a\right) \cdot \pi\right) \cdot \pi\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right)} \]
                        5. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right) \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                          2. associate-*r*N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left(\frac{1}{32400} \cdot angle\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                          3. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\frac{1}{32400} \cdot angle\right) \cdot \color{blue}{\left(angle \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left(\frac{1}{32400} \cdot angle\right), \color{blue}{\left(angle \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)}\right)\right) \]
                          5. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left(angle \cdot \frac{1}{32400}\right), \left(\color{blue}{angle} \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                          6. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \left(\color{blue}{angle} \cdot \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                          7. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \color{blue}{\left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                          8. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \left(\left(a \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                          9. associate-*l*N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \left(a \cdot \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right) \]
                          10. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right) \]
                          11. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(a \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \]
                          12. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                          13. PI-lowering-PI.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right) \]
                          14. PI-lowering-PI.f6471.3%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \frac{1}{32400}\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right) \]
                        6. Applied egg-rr71.3%

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

                        if 1.94999999999999988e151 < a

                        1. Initial program 99.7%

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

                            \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                          2. pow-lowering-pow.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                          3. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                          4. sin-lowering-sin.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                          5. associate-*l/N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                          6. /-lowering-/.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                          7. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                          8. PI-lowering-PI.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                          9. pow-lowering-pow.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                        3. Simplified99.7%

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

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                        6. Step-by-step derivation
                          1. Simplified99.7%

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

                            \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                          3. Step-by-step derivation
                            1. *-commutativeN/A

                              \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                            2. associate-*r*N/A

                              \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                            3. associate-*l*N/A

                              \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                            4. +-commutativeN/A

                              \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                            5. +-lowering-+.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                            6. unpow2N/A

                              \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                            7. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                            8. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                            9. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                            10. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                          4. Simplified68.9%

                            \[\leadsto \color{blue}{b \cdot b + \left(\left(\left(a \cdot a\right) \cdot \pi\right) \cdot \pi\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right)} \]
                          5. Step-by-step derivation
                            1. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)}\right)\right) \]
                            2. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(a \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right) \]
                            3. associate-*l*N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)}\right)\right) \]
                            4. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)}\right)\right) \]
                            5. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(a \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)}\right)\right)\right) \]
                            6. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI}\left(\right)\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                            7. PI-lowering-PI.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                            8. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)}\right)\right)\right)\right) \]
                            9. PI-lowering-PI.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                            10. associate-*r*N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\left(\frac{1}{32400} \cdot angle\right) \cdot \color{blue}{angle}\right)\right)\right)\right)\right) \]
                            11. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(angle \cdot \color{blue}{\left(\frac{1}{32400} \cdot angle\right)}\right)\right)\right)\right)\right) \]
                            12. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \color{blue}{\left(\frac{1}{32400} \cdot angle\right)}\right)\right)\right)\right)\right) \]
                            13. *-commutativeN/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \left(angle \cdot \color{blue}{\frac{1}{32400}}\right)\right)\right)\right)\right)\right) \]
                            14. *-lowering-*.f6489.6%

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{32400}}\right)\right)\right)\right)\right)\right) \]
                          6. Applied egg-rr89.6%

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

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

                        Alternative 11: 54.3% accurate, 18.9× speedup?

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

                          1. Initial program 87.3%

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

                              \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                            2. pow-lowering-pow.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                            3. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                            4. sin-lowering-sin.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                            5. associate-*l/N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                            6. /-lowering-/.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                            7. *-lowering-*.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                            8. PI-lowering-PI.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                            9. pow-lowering-pow.f64N/A

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                          3. Simplified87.5%

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                          6. Step-by-step derivation
                            1. Simplified88.0%

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

                              \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                            3. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                              2. associate-*r*N/A

                                \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                              3. associate-*l*N/A

                                \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                              4. +-commutativeN/A

                                \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                              5. +-lowering-+.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                              6. unpow2N/A

                                \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                              7. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                              8. *-commutativeN/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                              9. associate-*l*N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                              10. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                            4. Simplified68.0%

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

                              \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                            6. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{\frac{1}{32400}} \]
                              2. associate-*r*N/A

                                \[\leadsto {a}^{2} \cdot \color{blue}{\left(\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right)} \]
                              3. *-commutativeN/A

                                \[\leadsto {a}^{2} \cdot \left(\frac{1}{32400} \cdot \color{blue}{\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
                              5. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\left(a \cdot a\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                              7. associate-*r*N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\left(\frac{1}{32400} \cdot {angle}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right)\right) \]
                              8. *-commutativeN/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\left({angle}^{2} \cdot \frac{1}{32400}\right) \cdot {\color{blue}{\mathsf{PI}\left(\right)}}^{2}\right)\right) \]
                              9. associate-*l*N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left({angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                              10. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\left({angle}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                              11. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                              12. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                              13. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right) \]
                              14. unpow2N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                              15. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                              16. PI-lowering-PI.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                              17. PI-lowering-PI.f6442.7%

                                \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
                            7. Simplified42.7%

                              \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(\left(angle \cdot angle\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right)\right)\right)} \]
                            8. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto \left(\left(angle \cdot angle\right) \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                              2. associate-*l*N/A

                                \[\leadsto \left(angle \cdot \left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \cdot \left(\color{blue}{a} \cdot a\right) \]
                              3. associate-*l*N/A

                                \[\leadsto angle \cdot \color{blue}{\left(\left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(a \cdot a\right)\right)} \]
                              4. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(angle, \color{blue}{\left(\left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(a \cdot a\right)\right)}\right) \]
                              5. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(a \cdot a\right)}\right)\right) \]
                              6. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(\color{blue}{a} \cdot a\right)\right)\right) \]
                              7. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                              8. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                              9. PI-lowering-PI.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                              10. PI-lowering-PI.f64N/A

                                \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                              11. *-lowering-*.f6447.4%

                                \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
                            9. Applied egg-rr47.4%

                              \[\leadsto \color{blue}{angle \cdot \left(\left(angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(a \cdot a\right)\right)} \]

                            if 1.7500000000000001e-169 < b

                            1. Initial program 71.9%

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

                                \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                              2. pow-lowering-pow.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                              3. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                              4. sin-lowering-sin.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                              5. associate-*l/N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                              6. /-lowering-/.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                              7. *-lowering-*.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                              8. PI-lowering-PI.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                              9. pow-lowering-pow.f64N/A

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                            3. Simplified72.0%

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

                              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                            6. Step-by-step derivation
                              1. Simplified71.2%

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

                                \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                              3. Step-by-step derivation
                                1. *-commutativeN/A

                                  \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                                2. associate-*r*N/A

                                  \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                                3. associate-*l*N/A

                                  \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                                4. +-commutativeN/A

                                  \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                                5. +-lowering-+.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                                6. unpow2N/A

                                  \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                                8. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                                9. associate-*l*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                                10. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                              4. Simplified61.4%

                                \[\leadsto \color{blue}{b \cdot b + \left(\left(\left(a \cdot a\right) \cdot \pi\right) \cdot \pi\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right)} \]
                              5. Step-by-step derivation
                                1. associate-*l*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left(a \cdot a\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)}\right)\right) \]
                                2. associate-*l*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(a \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right) \]
                                3. associate-*l*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)}\right)\right) \]
                                4. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \color{blue}{\left(\left(a \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)}\right)\right) \]
                                5. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(a \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)}\right)\right)\right) \]
                                6. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI}\left(\right)\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                                7. PI-lowering-PI.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                                8. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(\frac{1}{32400} \cdot \left(angle \cdot angle\right)\right)}\right)\right)\right)\right) \]
                                9. PI-lowering-PI.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left(angle \cdot angle\right)\right)\right)\right)\right)\right) \]
                                10. associate-*r*N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\left(\frac{1}{32400} \cdot angle\right) \cdot \color{blue}{angle}\right)\right)\right)\right)\right) \]
                                11. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(angle \cdot \color{blue}{\left(\frac{1}{32400} \cdot angle\right)}\right)\right)\right)\right)\right) \]
                                12. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \color{blue}{\left(\frac{1}{32400} \cdot angle\right)}\right)\right)\right)\right)\right) \]
                                13. *-commutativeN/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \left(angle \cdot \color{blue}{\frac{1}{32400}}\right)\right)\right)\right)\right)\right) \]
                                14. *-lowering-*.f6466.3%

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{32400}}\right)\right)\right)\right)\right)\right) \]
                              6. Applied egg-rr66.3%

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

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

                            Alternative 12: 62.3% accurate, 23.1× speedup?

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

                              1. Initial program 79.7%

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

                                \[\leadsto \color{blue}{{b}^{2}} \]
                              4. Step-by-step derivation
                                1. unpow2N/A

                                  \[\leadsto b \cdot \color{blue}{b} \]
                                2. *-lowering-*.f6461.3%

                                  \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{b}\right) \]
                              5. Simplified61.3%

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

                              if 9.19999999999999958e86 < a

                              1. Initial program 90.2%

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

                                  \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                                2. pow-lowering-pow.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                                3. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                4. sin-lowering-sin.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                5. associate-*l/N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                6. /-lowering-/.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                7. *-lowering-*.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                8. PI-lowering-PI.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                9. pow-lowering-pow.f64N/A

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                              3. Simplified90.2%

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

                                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                              6. Step-by-step derivation
                                1. Simplified90.2%

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

                                  \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                                3. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                                  2. associate-*r*N/A

                                    \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                                  3. associate-*l*N/A

                                    \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                                  4. +-commutativeN/A

                                    \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                                  5. +-lowering-+.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                                  6. unpow2N/A

                                    \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                                  7. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                                  8. *-commutativeN/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                                  9. associate-*l*N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                                  10. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                                4. Simplified64.3%

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

                                  \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                                6. Step-by-step derivation
                                  1. *-commutativeN/A

                                    \[\leadsto \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{\frac{1}{32400}} \]
                                  2. associate-*r*N/A

                                    \[\leadsto {a}^{2} \cdot \color{blue}{\left(\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right)} \]
                                  3. *-commutativeN/A

                                    \[\leadsto {a}^{2} \cdot \left(\frac{1}{32400} \cdot \color{blue}{\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
                                  4. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
                                  5. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(a \cdot a\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                  6. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                  7. associate-*r*N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\left(\frac{1}{32400} \cdot {angle}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right)\right) \]
                                  8. *-commutativeN/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\left({angle}^{2} \cdot \frac{1}{32400}\right) \cdot {\color{blue}{\mathsf{PI}\left(\right)}}^{2}\right)\right) \]
                                  9. associate-*l*N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left({angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                                  10. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\left({angle}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                                  11. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                  12. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                  13. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right) \]
                                  14. unpow2N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                                  15. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                                  16. PI-lowering-PI.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                                  17. PI-lowering-PI.f6455.5%

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
                                7. Simplified55.5%

                                  \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(\left(angle \cdot angle\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right)\right)\right)} \]
                                8. Step-by-step derivation
                                  1. associate-*l*N/A

                                    \[\leadsto a \cdot \color{blue}{\left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
                                  2. *-commutativeN/A

                                    \[\leadsto \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \cdot \color{blue}{a} \]
                                  3. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), \color{blue}{a}\right) \]
                                  4. associate-*l*N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(a \cdot \left(angle \cdot \left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)\right), a\right) \]
                                  5. associate-*r*N/A

                                    \[\leadsto \mathsf{*.f64}\left(\left(\left(a \cdot angle\right) \cdot \left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), a\right) \]
                                  6. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(a \cdot angle\right), \left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), a\right) \]
                                  7. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, angle\right), \left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), a\right) \]
                                  8. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, angle\right), \mathsf{*.f64}\left(angle, \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), a\right) \]
                                  9. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, angle\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), a\right) \]
                                  10. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, angle\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), a\right) \]
                                  11. PI-lowering-PI.f64N/A

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, angle\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right), a\right) \]
                                  12. PI-lowering-PI.f6469.1%

                                    \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, angle\right), \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right), a\right) \]
                                9. Applied egg-rr69.1%

                                  \[\leadsto \color{blue}{\left(\left(a \cdot angle\right) \cdot \left(angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right)\right)\right)\right) \cdot a} \]
                              7. Recombined 2 regimes into one program.
                              8. Final simplification62.6%

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

                              Alternative 13: 49.8% accurate, 23.1× speedup?

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

                                1. Initial program 86.3%

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

                                    \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)}\right) \]
                                  2. pow-lowering-pow.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\color{blue}{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}}^{2}\right)\right) \]
                                  3. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), 2\right), \left({\left(\color{blue}{b} \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                  4. sin-lowering-sin.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                  5. associate-*l/N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                  6. /-lowering-/.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\left(angle \cdot \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                  7. *-lowering-*.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                  8. PI-lowering-PI.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \left({\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{2}\right)\right) \]
                                  9. pow-lowering-pow.f64N/A

                                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                                3. Simplified86.4%

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

                                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                                6. Step-by-step derivation
                                  1. Simplified86.9%

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

                                    \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) + {b}^{2}} \]
                                  3. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \frac{1}{32400} \cdot \left({a}^{2} \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot {angle}^{2}\right)\right) + {b}^{2} \]
                                    2. associate-*r*N/A

                                      \[\leadsto \frac{1}{32400} \cdot \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot {angle}^{2}\right) + {b}^{2} \]
                                    3. associate-*l*N/A

                                      \[\leadsto \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2} + {\color{blue}{b}}^{2} \]
                                    4. +-commutativeN/A

                                      \[\leadsto {b}^{2} + \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}} \]
                                    5. +-lowering-+.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(\left({b}^{2}\right), \color{blue}{\left(\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot {angle}^{2}\right)}\right) \]
                                    6. unpow2N/A

                                      \[\leadsto \mathsf{+.f64}\left(\left(b \cdot b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                                    7. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \cdot {angle}^{2}\right)\right) \]
                                    8. *-commutativeN/A

                                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right) \cdot {\color{blue}{angle}}^{2}\right)\right) \]
                                    9. associate-*l*N/A

                                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                                    10. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {angle}^{2}\right)}\right)\right) \]
                                  4. Simplified66.9%

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

                                    \[\leadsto \color{blue}{\frac{1}{32400} \cdot \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                                  6. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{\frac{1}{32400}} \]
                                    2. associate-*r*N/A

                                      \[\leadsto {a}^{2} \cdot \color{blue}{\left(\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right)} \]
                                    3. *-commutativeN/A

                                      \[\leadsto {a}^{2} \cdot \left(\frac{1}{32400} \cdot \color{blue}{\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right) \]
                                    4. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\left({a}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
                                    5. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\left(a \cdot a\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                    6. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                    7. associate-*r*N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\left(\frac{1}{32400} \cdot {angle}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right)\right) \]
                                    8. *-commutativeN/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\left({angle}^{2} \cdot \frac{1}{32400}\right) \cdot {\color{blue}{\mathsf{PI}\left(\right)}}^{2}\right)\right) \]
                                    9. associate-*l*N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left({angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                                    10. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\left({angle}^{2}\right), \color{blue}{\left(\frac{1}{32400} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                                    11. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                    12. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
                                    13. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \color{blue}{\left({\mathsf{PI}\left(\right)}^{2}\right)}\right)\right)\right) \]
                                    14. unpow2N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                                    15. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                                    16. PI-lowering-PI.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right) \]
                                    17. PI-lowering-PI.f6442.5%

                                      \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right) \]
                                  7. Simplified42.5%

                                    \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(\left(angle \cdot angle\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right)\right)\right)} \]
                                  8. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto \left(\left(angle \cdot angle\right) \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                                    2. associate-*l*N/A

                                      \[\leadsto \left(angle \cdot \left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \cdot \left(\color{blue}{a} \cdot a\right) \]
                                    3. associate-*l*N/A

                                      \[\leadsto angle \cdot \color{blue}{\left(\left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(a \cdot a\right)\right)} \]
                                    4. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(angle, \color{blue}{\left(\left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(a \cdot a\right)\right)}\right) \]
                                    5. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\left(angle \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \color{blue}{\left(a \cdot a\right)}\right)\right) \]
                                    6. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(\color{blue}{a} \cdot a\right)\right)\right) \]
                                    7. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                                    8. *-lowering-*.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                                    9. PI-lowering-PI.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                                    10. PI-lowering-PI.f64N/A

                                      \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \left(a \cdot a\right)\right)\right) \]
                                    11. *-lowering-*.f6447.1%

                                      \[\leadsto \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right) \]
                                  9. Applied egg-rr47.1%

                                    \[\leadsto \color{blue}{angle \cdot \left(\left(angle \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(a \cdot a\right)\right)} \]

                                  if 1.64999999999999994e-147 < b

                                  1. Initial program 72.7%

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

                                    \[\leadsto \color{blue}{{b}^{2}} \]
                                  4. Step-by-step derivation
                                    1. unpow2N/A

                                      \[\leadsto b \cdot \color{blue}{b} \]
                                    2. *-lowering-*.f6458.4%

                                      \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{b}\right) \]
                                  5. Simplified58.4%

                                    \[\leadsto \color{blue}{b \cdot b} \]
                                7. Recombined 2 regimes into one program.
                                8. Final simplification51.1%

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

                                Alternative 14: 56.7% accurate, 139.0× speedup?

                                \[\begin{array}{l} angle_m = \left|angle\right| \\ b \cdot b \end{array} \]
                                angle_m = (fabs.f64 angle)
                                (FPCore (a b angle_m) :precision binary64 (* b b))
                                angle_m = fabs(angle);
                                double code(double a, double b, double angle_m) {
                                	return b * b;
                                }
                                
                                angle_m = abs(angle)
                                real(8) function code(a, b, angle_m)
                                    real(8), intent (in) :: a
                                    real(8), intent (in) :: b
                                    real(8), intent (in) :: angle_m
                                    code = b * b
                                end function
                                
                                angle_m = Math.abs(angle);
                                public static double code(double a, double b, double angle_m) {
                                	return b * b;
                                }
                                
                                angle_m = math.fabs(angle)
                                def code(a, b, angle_m):
                                	return b * b
                                
                                angle_m = abs(angle)
                                function code(a, b, angle_m)
                                	return Float64(b * b)
                                end
                                
                                angle_m = abs(angle);
                                function tmp = code(a, b, angle_m)
                                	tmp = b * b;
                                end
                                
                                angle_m = N[Abs[angle], $MachinePrecision]
                                code[a_, b_, angle$95$m_] := N[(b * b), $MachinePrecision]
                                
                                \begin{array}{l}
                                angle_m = \left|angle\right|
                                
                                \\
                                b \cdot b
                                \end{array}
                                
                                Derivation
                                1. Initial program 81.5%

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

                                  \[\leadsto \color{blue}{{b}^{2}} \]
                                4. Step-by-step derivation
                                  1. unpow2N/A

                                    \[\leadsto b \cdot \color{blue}{b} \]
                                  2. *-lowering-*.f6455.8%

                                    \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{b}\right) \]
                                5. Simplified55.8%

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

                                Reproduce

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