ab-angle->ABCF A

Percentage Accurate: 79.9% → 79.7%
Time: 15.6s
Alternatives: 12
Speedup: 2.0×

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 12 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.9% 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.7% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{-11}:\\
\;\;\;\;b \cdot b + {\left(angle\_m \cdot \left(a \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 1.99999999999999988e-11

    1. Initial program 85.1%

      \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
    4. Step-by-step derivation
      1. Simplified85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), a\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(\mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), \left(\frac{180}{angle}\right)\right)\right), a\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        16. PI-lowering-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(angle \cdot \left(\frac{1}{180} \cdot \left(a \cdot \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(angle, \left(\frac{1}{180} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
        6. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \frac{1}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
        12. PI-lowering-PI.f6482.2%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
      8. Simplified82.2%

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

      if 1.99999999999999988e-11 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 63.0%

        \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
      4. Step-by-step derivation
        1. Simplified63.2%

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

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

            \[\leadsto \mathsf{+.f64}\left(\left({\left(a \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180}\right)\right)}^{2}\right), \color{blue}{\left({\left(b \cdot 1\right)}^{2}\right)}\right) \]
        3. Applied egg-rr63.6%

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

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

      Alternative 2: 79.9% accurate, 2.0× speedup?

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

        \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
      4. Step-by-step derivation
        1. Simplified79.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), a\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(\mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), \left(\frac{180}{angle}\right)\right)\right), a\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
          16. PI-lowering-PI.f64N/A

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

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

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

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

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

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

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

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

        Alternative 3: 79.9% 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 79.1%

          \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
        4. Step-by-step derivation
          1. Simplified79.8%

            \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\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, 180\right), \mathsf{PI.f64}\left(\right)\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, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right), \left(b \cdot \color{blue}{b}\right)\right) \]
            3. *-lowering-*.f6479.8%

              \[\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, \color{blue}{b}\right)\right) \]
          3. Applied egg-rr79.8%

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

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

          Alternative 4: 79.7% accurate, 3.3× speedup?

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

            1. Initial program 85.1%

              \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
            4. Step-by-step derivation
              1. Simplified85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), a\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(\mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), \left(\frac{180}{angle}\right)\right)\right), a\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                16. PI-lowering-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(angle \cdot \left(\frac{1}{180} \cdot \left(a \cdot \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(angle, \left(\frac{1}{180} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
                6. *-commutativeN/A

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \frac{1}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
                12. PI-lowering-PI.f6482.2%

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
              8. Simplified82.2%

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

              if 1.99999999999999988e-11 < (/.f64 angle #s(literal 180 binary64))

              1. Initial program 63.0%

                \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
              4. Step-by-step derivation
                1. Simplified63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), a\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(\mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), \left(\frac{180}{angle}\right)\right)\right), a\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                  16. PI-lowering-PI.f64N/A

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(\left({\left(\sin \left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right) \cdot a\right)}^{2}\right), \color{blue}{\left({\left(b \cdot 1\right)}^{2}\right)}\right) \]
                5. Applied egg-rr63.2%

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

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

              Alternative 5: 68.3% accurate, 3.6× speedup?

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

                1. Initial program 79.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. 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-*.f6459.3%

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

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

                if 3.40000000000000013e-102 < a

                1. Initial program 77.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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                4. Step-by-step derivation
                  1. Simplified78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), a\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(\mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), \left(\frac{180}{angle}\right)\right)\right), a\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                    16. PI-lowering-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\left(angle \cdot \left(\frac{1}{180} \cdot \left(a \cdot \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(angle, \left(\frac{1}{180} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
                    6. *-commutativeN/A

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \frac{1}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
                    12. PI-lowering-PI.f6474.2%

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, b\right)\right) \]
                  8. Simplified74.2%

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

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

                Alternative 6: 68.3% accurate, 9.5× speedup?

                \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} t_0 := \left(-0.005555555555555556 + \frac{0.005555555555555556 \cdot \left(\pi \cdot \pi\right) + -0.005555555555555556}{\pi + -1}\right) \cdot \left(angle\_m \cdot a\right)\\ \mathbf{if}\;a \leq 4 \cdot 10^{-102}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot b + t\_0 \cdot t\_0\\ \end{array} \end{array} \]
                angle_m = (fabs.f64 angle)
                (FPCore (a b angle_m)
                 :precision binary64
                 (let* ((t_0
                         (*
                          (+
                           -0.005555555555555556
                           (/
                            (+ (* 0.005555555555555556 (* PI PI)) -0.005555555555555556)
                            (+ PI -1.0)))
                          (* angle_m a))))
                   (if (<= a 4e-102) (* b b) (+ (* b b) (* t_0 t_0)))))
                angle_m = fabs(angle);
                double code(double a, double b, double angle_m) {
                	double t_0 = (-0.005555555555555556 + (((0.005555555555555556 * (((double) M_PI) * ((double) M_PI))) + -0.005555555555555556) / (((double) M_PI) + -1.0))) * (angle_m * a);
                	double tmp;
                	if (a <= 4e-102) {
                		tmp = b * b;
                	} else {
                		tmp = (b * b) + (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 = (-0.005555555555555556 + (((0.005555555555555556 * (Math.PI * Math.PI)) + -0.005555555555555556) / (Math.PI + -1.0))) * (angle_m * a);
                	double tmp;
                	if (a <= 4e-102) {
                		tmp = b * b;
                	} else {
                		tmp = (b * b) + (t_0 * t_0);
                	}
                	return tmp;
                }
                
                angle_m = math.fabs(angle)
                def code(a, b, angle_m):
                	t_0 = (-0.005555555555555556 + (((0.005555555555555556 * (math.pi * math.pi)) + -0.005555555555555556) / (math.pi + -1.0))) * (angle_m * a)
                	tmp = 0
                	if a <= 4e-102:
                		tmp = b * b
                	else:
                		tmp = (b * b) + (t_0 * t_0)
                	return tmp
                
                angle_m = abs(angle)
                function code(a, b, angle_m)
                	t_0 = Float64(Float64(-0.005555555555555556 + Float64(Float64(Float64(0.005555555555555556 * Float64(pi * pi)) + -0.005555555555555556) / Float64(pi + -1.0))) * Float64(angle_m * a))
                	tmp = 0.0
                	if (a <= 4e-102)
                		tmp = Float64(b * b);
                	else
                		tmp = Float64(Float64(b * b) + Float64(t_0 * t_0));
                	end
                	return tmp
                end
                
                angle_m = abs(angle);
                function tmp_2 = code(a, b, angle_m)
                	t_0 = (-0.005555555555555556 + (((0.005555555555555556 * (pi * pi)) + -0.005555555555555556) / (pi + -1.0))) * (angle_m * a);
                	tmp = 0.0;
                	if (a <= 4e-102)
                		tmp = b * b;
                	else
                		tmp = (b * b) + (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[(N[(-0.005555555555555556 + N[(N[(N[(0.005555555555555556 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + -0.005555555555555556), $MachinePrecision] / N[(Pi + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle$95$m * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 4e-102], N[(b * b), $MachinePrecision], N[(N[(b * b), $MachinePrecision] + N[(t$95$0 * t$95$0), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                angle_m = \left|angle\right|
                
                \\
                \begin{array}{l}
                t_0 := \left(-0.005555555555555556 + \frac{0.005555555555555556 \cdot \left(\pi \cdot \pi\right) + -0.005555555555555556}{\pi + -1}\right) \cdot \left(angle\_m \cdot a\right)\\
                \mathbf{if}\;a \leq 4 \cdot 10^{-102}:\\
                \;\;\;\;b \cdot b\\
                
                \mathbf{else}:\\
                \;\;\;\;b \cdot b + t\_0 \cdot t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 3.99999999999999973e-102

                  1. Initial program 79.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. 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-*.f6459.3%

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

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

                  if 3.99999999999999973e-102 < a

                  1. Initial program 77.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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                  4. Step-by-step derivation
                    1. Simplified78.6%

                      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\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-*l/N/A

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{1 \cdot \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) \]
                      3. *-un-lft-identityN/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. div-invN/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}{180 \cdot \frac{1}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                      11. 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}{\frac{180}{angle}} - \frac{\frac{1}{180}}{\frac{1}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                      12. metadata-evalN/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{\frac{1}{180}}{\frac{1}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                      13. div-invN/A

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right) - 1 \cdot 1}{\mathsf{PI}\left(\right) - 1} \cdot \frac{1}{\frac{180}{angle}} - \frac{\frac{1}{180}}{\frac{1}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                      15. 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) \cdot \mathsf{PI}\left(\right) - 1 \cdot 1}{\mathsf{PI}\left(\right) - 1} \cdot \frac{angle}{180} - \frac{\frac{1}{180}}{\frac{1}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                      16. 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) \cdot \mathsf{PI}\left(\right) - 1 \cdot 1\right) \cdot \frac{angle}{180}}{\mathsf{PI}\left(\right) - 1} - \frac{\frac{1}{180}}{\frac{1}{angle}}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                      17. frac-subN/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{b \cdot b + \left(\left(\frac{0.005555555555555556 \cdot \left(\pi \cdot \pi\right) + -0.005555555555555556}{\pi + -1} + -0.005555555555555556\right) \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(\frac{0.005555555555555556 \cdot \left(\pi \cdot \pi\right) + -0.005555555555555556}{\pi + -1} + -0.005555555555555556\right) \cdot \left(a \cdot angle\right)\right)} \]
                  5. Recombined 2 regimes into one program.
                  6. Final simplification63.9%

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

                  Alternative 7: 65.5% accurate, 15.4× speedup?

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

                    1. Initial program 79.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. 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-*.f6459.3%

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

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

                    if 1.36000000000000001e-102 < a < 4.5000000000000001e153

                    1. Initial program 64.6%

                      \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                    4. Step-by-step derivation
                      1. Simplified66.2%

                        \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\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. Simplified59.1%

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

                      if 4.5000000000000001e153 < a

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

                        \[\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, \color{blue}{\left(\frac{1}{180} \cdot \left(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) \]
                      6. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\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, \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{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) \]
                        3. *-commutativeN/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(angle \cdot \left(\frac{1}{180} \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) \]
                        4. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \left(\frac{1}{180} \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) \]
                        5. *-lowering-*.f64N/A

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \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) \]
                        6. PI-lowering-PI.f6499.8%

                          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{PI.f64}\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) \]
                      7. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(angle, \color{blue}{angle}\right)\right)\right) \]
                      10. Simplified69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(angle, a\right)\right), \mathsf{*.f64}\left(a, \left({\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)}^{2}\right)\right)\right) \]
                        15. unpow-prod-downN/A

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(angle \cdot \left(angle \cdot a\right)\right) \cdot \left(a \cdot \left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)} \]
                    5. Recombined 3 regimes into one program.
                    6. Add Preprocessing

                    Alternative 8: 65.5% accurate, 15.4× speedup?

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

                      1. Initial program 79.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. 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-*.f6459.3%

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

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

                      if 1.72000000000000009e-102 < a < 1.31999999999999998e154

                      1. Initial program 64.6%

                        \[{\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 \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{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                      4. Step-by-step derivation
                        1. Simplified66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(\mathsf{sin.f64}\left(\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)\right), a\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(\mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), \left(\frac{180}{angle}\right)\right)\right), a\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                          16. PI-lowering-PI.f64N/A

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

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

                          \[\leadsto {\color{blue}{\left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot a\right)}}^{2} + {\left(b \cdot 1\right)}^{2} \]
                        4. 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}} \]
                        5. 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. associate-*l*N/A

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

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

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

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

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

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

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\left(a \cdot a\right), \left(\color{blue}{\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \cdot \frac{1}{32400}\right)\right)\right) \]
                          15. *-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}{\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)} \cdot \frac{1}{32400}\right)\right)\right) \]
                          16. *-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(\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \color{blue}{\frac{1}{32400}}\right)\right)\right) \]
                        6. Simplified59.1%

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

                        if 1.31999999999999998e154 < a

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

                          \[\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, \color{blue}{\left(\frac{1}{180} \cdot \left(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) \]
                        6. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\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, \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{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) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(angle \cdot \left(\frac{1}{180} \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) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \left(\frac{1}{180} \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) \]
                          5. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \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) \]
                          6. PI-lowering-PI.f6499.8%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{PI.f64}\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) \]
                        7. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(angle, \color{blue}{angle}\right)\right)\right) \]
                        10. Simplified69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(angle, a\right)\right), \mathsf{*.f64}\left(a, \left({\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)}^{2}\right)\right)\right) \]
                          15. unpow-prod-downN/A

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

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

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

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.72 \cdot 10^{-102}:\\ \;\;\;\;b \cdot b\\ \mathbf{elif}\;a \leq 1.32 \cdot 10^{+154}:\\ \;\;\;\;b \cdot b + \left(a \cdot a\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot \left(angle \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \left(angle \cdot a\right)\right) \cdot \left(a \cdot \left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 9: 63.7% accurate, 23.1× speedup?

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

                        1. Initial program 76.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-*.f6458.6%

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

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

                        if 1.9e151 < a

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

                          \[\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, \color{blue}{\left(\frac{1}{180} \cdot \left(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) \]
                        6. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\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, \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{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) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(angle \cdot \left(\frac{1}{180} \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) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \left(\frac{1}{180} \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) \]
                          5. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \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) \]
                          6. PI-lowering-PI.f6499.8%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{PI.f64}\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) \]
                        7. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(angle, \color{blue}{angle}\right)\right)\right) \]
                        10. Simplified69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(angle, a\right)\right), \mathsf{*.f64}\left(a, \left({\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)}^{2}\right)\right)\right) \]
                          15. unpow-prod-downN/A

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(angle \cdot \left(angle \cdot a\right)\right) \cdot \left(a \cdot \left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)} \]
                      3. Recombined 2 regimes into one program.
                      4. Add Preprocessing

                      Alternative 10: 61.7% accurate, 23.1× speedup?

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

                        1. Initial program 76.6%

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

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

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

                        if 1.6e154 < 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, \color{blue}{\left(\frac{1}{180} \cdot \left(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) \]
                        6. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\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, \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{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) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(angle \cdot \left(\frac{1}{180} \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) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \left(\frac{1}{180} \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) \]
                          5. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \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) \]
                          6. PI-lowering-PI.f6499.8%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{PI.f64}\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) \]
                        7. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(angle \cdot \color{blue}{angle}\right)\right)\right) \]
                          17. *-lowering-*.f6471.8%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(angle, \color{blue}{angle}\right)\right)\right) \]
                        10. Simplified71.8%

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(angle \cdot angle\right) \cdot \left(a \cdot \left(\left(a \cdot \left(\pi \cdot \pi\right)\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)} \]
                      3. Recombined 2 regimes into one program.
                      4. Add Preprocessing

                      Alternative 11: 61.6% accurate, 23.1× speedup?

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

                        1. Initial program 76.6%

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

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

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

                        if 4.00000000000000015e154 < 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, \color{blue}{\left(\frac{1}{180} \cdot \left(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) \]
                        6. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\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, \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{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) \]
                          3. *-commutativeN/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(angle \cdot \left(\frac{1}{180} \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) \]
                          4. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \left(\frac{1}{180} \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) \]
                          5. *-lowering-*.f64N/A

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \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) \]
                          6. PI-lowering-PI.f6499.8%

                            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\frac{1}{180}, \mathsf{PI.f64}\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) \]
                        7. Simplified99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{32400}, \left(angle \cdot \color{blue}{angle}\right)\right)\right) \]
                          17. *-lowering-*.f6471.8%

                            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{32400}, \mathsf{*.f64}\left(angle, \color{blue}{angle}\right)\right)\right) \]
                        10. Simplified71.8%

                          \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right)\right)} \]
                      3. Recombined 2 regimes into one program.
                      4. Add Preprocessing

                      Alternative 12: 57.5% 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 79.1%

                        \[{\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 2024160 
                      (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)))