ab-angle->ABCF A

Percentage Accurate: 79.8% → 79.7%
Time: 15.5s
Alternatives: 14
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 79.8% 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.1× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{\pi}{\frac{180}{angle\_m}}\\
t_1 := 0.5 \cdot \cos \left(2 \cdot t\_0\right)\\
t_2 := a \cdot t\_0\\
\mathbf{if}\;angle\_m \leq 15500:\\
\;\;\;\;t\_2 \cdot t\_2 + b \cdot \left(b \cdot \left(0.5 + t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot b + \left(a \cdot a\right) \cdot \left(0.5 - t\_1\right)\\


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

    1. Initial program 86.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. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left({\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}^{\left(\frac{-1}{2}\right)} \cdot {\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}^{\left(\frac{-1}{2}\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{sin.f64}\left(\mathsf{*.f64}\left(\left({\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}^{\left(\frac{-1}{2}\right)}\right), \left({\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}^{\left(\frac{-1}{2}\right)}\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. 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{pow.f64}\left(\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right), \left(\frac{-1}{2}\right)\right), \left({\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}^{\left(\frac{-1}{2}\right)}\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. associate-/r*N/A

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(180, angle\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{2}\right), \left({\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)}^{\left(\frac{-1}{2}\right)}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      11. 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{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(180, angle\right), \mathsf{PI.f64}\left(\right)\right), \frac{-1}{2}\right), \mathsf{pow.f64}\left(\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right), \left(\frac{-1}{2}\right)\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right)\right) \]
      12. associate-/r*N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \left(angle \cdot \left(\left(\sqrt{\frac{1}{180}} \cdot \sqrt{\frac{1}{180}}\right) \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) \]
      3. rem-square-sqrtN/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.f6483.9%

        \[\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) \]
    9. Simplified83.9%

      \[\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} \]
    10. Applied egg-rr83.9%

      \[\leadsto \color{blue}{\left(a \cdot \frac{\pi}{\frac{180}{angle}}\right) \cdot \left(a \cdot \frac{\pi}{\frac{180}{angle}}\right) + b \cdot \left(b \cdot \left(0.5 + 0.5 \cdot \cos \left(2 \cdot \frac{\pi}{\frac{180}{angle}}\right)\right)\right)} \]

    if 15500 < angle

    1. Initial program 59.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. Simplified60.0%

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

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

        \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
      2. Step-by-step derivation
        1. +-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-rr62.2%

        \[\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} \]
    7. Recombined 2 regimes into one program.
    8. Final simplification79.9%

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

    Alternative 2: 79.7% accurate, 0.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{+.f64}\left(\left(\cos \left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}}\right) \cdot \cos \left(\frac{angle}{180}\right)\right), \left(\sin \left(\frac{e^{\mathsf{log1p}\left(\mathsf{PI}\left(\right)\right)}}{\frac{180}{angle}}\right) \cdot \sin \left(\frac{angle}{180}\right)\right)\right)\right), 2\right)\right) \]
    6. Applied egg-rr82.0%

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

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

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

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

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

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

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

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

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

    Alternative 3: 79.8% accurate, 0.7× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \sin \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{\pi}{e^{\log \left(\frac{180}{angle\_m}\right)}}\right)\right)}^{2} \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m)
     :precision binary64
     (+
      (pow (* a (sin (/ (* angle_m PI) 180.0))) 2.0)
      (pow (* b (cos (/ PI (exp (log (/ 180.0 angle_m)))))) 2.0)))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	return pow((a * sin(((angle_m * ((double) M_PI)) / 180.0))), 2.0) + pow((b * cos((((double) M_PI) / exp(log((180.0 / angle_m)))))), 2.0);
    }
    
    angle_m = Math.abs(angle);
    public static double code(double a, double b, double angle_m) {
    	return Math.pow((a * Math.sin(((angle_m * Math.PI) / 180.0))), 2.0) + Math.pow((b * Math.cos((Math.PI / Math.exp(Math.log((180.0 / angle_m)))))), 2.0);
    }
    
    angle_m = math.fabs(angle)
    def code(a, b, angle_m):
    	return math.pow((a * math.sin(((angle_m * math.pi) / 180.0))), 2.0) + math.pow((b * math.cos((math.pi / math.exp(math.log((180.0 / angle_m)))))), 2.0)
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	return Float64((Float64(a * sin(Float64(Float64(angle_m * pi) / 180.0))) ^ 2.0) + (Float64(b * cos(Float64(pi / exp(log(Float64(180.0 / angle_m)))))) ^ 2.0))
    end
    
    angle_m = abs(angle);
    function tmp = code(a, b, angle_m)
    	tmp = ((a * sin(((angle_m * pi) / 180.0))) ^ 2.0) + ((b * cos((pi / exp(log((180.0 / angle_m)))))) ^ 2.0);
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[(Pi / N[Exp[N[Log[N[(180.0 / angle$95$m), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    {\left(a \cdot \sin \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{\pi}{e^{\log \left(\frac{180}{angle\_m}\right)}}\right)\right)}^{2}
    \end{array}
    
    Derivation
    1. Initial program 81.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. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \left(\frac{180}{angle}\right)\right)\right)\right)\right)\right), 2\right)\right) \]
      21. /-lowering-/.f6440.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right), 2\right)\right) \]
    8. Applied egg-rr40.8%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{exp.f64}\left(\mathsf{log.f64}\left(\left(\frac{180}{angle}\right)\right)\right)\right)\right)\right), 2\right)\right) \]
      8. /-lowering-/.f6440.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{exp.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right), 2\right)\right) \]
    10. Applied egg-rr40.8%

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

    Alternative 4: 79.8% accurate, 0.7× speedup?

    \[\begin{array}{l} angle_m = \left|angle\right| \\ {\left(a \cdot \sin \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(e^{\log \left(\frac{\pi}{\frac{180}{angle\_m}}\right)}\right)\right)}^{2} \end{array} \]
    angle_m = (fabs.f64 angle)
    (FPCore (a b angle_m)
     :precision binary64
     (+
      (pow (* a (sin (/ (* angle_m PI) 180.0))) 2.0)
      (pow (* b (cos (exp (log (/ PI (/ 180.0 angle_m)))))) 2.0)))
    angle_m = fabs(angle);
    double code(double a, double b, double angle_m) {
    	return pow((a * sin(((angle_m * ((double) M_PI)) / 180.0))), 2.0) + pow((b * cos(exp(log((((double) M_PI) / (180.0 / angle_m)))))), 2.0);
    }
    
    angle_m = Math.abs(angle);
    public static double code(double a, double b, double angle_m) {
    	return Math.pow((a * Math.sin(((angle_m * Math.PI) / 180.0))), 2.0) + Math.pow((b * Math.cos(Math.exp(Math.log((Math.PI / (180.0 / angle_m)))))), 2.0);
    }
    
    angle_m = math.fabs(angle)
    def code(a, b, angle_m):
    	return math.pow((a * math.sin(((angle_m * math.pi) / 180.0))), 2.0) + math.pow((b * math.cos(math.exp(math.log((math.pi / (180.0 / angle_m)))))), 2.0)
    
    angle_m = abs(angle)
    function code(a, b, angle_m)
    	return Float64((Float64(a * sin(Float64(Float64(angle_m * pi) / 180.0))) ^ 2.0) + (Float64(b * cos(exp(log(Float64(pi / Float64(180.0 / angle_m)))))) ^ 2.0))
    end
    
    angle_m = abs(angle);
    function tmp = code(a, b, angle_m)
    	tmp = ((a * sin(((angle_m * pi) / 180.0))) ^ 2.0) + ((b * cos(exp(log((pi / (180.0 / angle_m)))))) ^ 2.0);
    end
    
    angle_m = N[Abs[angle], $MachinePrecision]
    code[a_, b_, angle$95$m_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(b * N[Cos[N[Exp[N[Log[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    angle_m = \left|angle\right|
    
    \\
    {\left(a \cdot \sin \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left(e^{\log \left(\frac{\pi}{\frac{180}{angle\_m}}\right)}\right)\right)}^{2}
    \end{array}
    
    Derivation
    1. Initial program 81.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. Step-by-step derivation
      1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \left(\frac{180}{angle}\right)\right)\right)\right)\right)\right), 2\right)\right) \]
      21. /-lowering-/.f6440.8%

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{exp.f64}\left(\mathsf{log.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right)\right)\right), 2\right)\right) \]
    8. Applied egg-rr40.8%

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

    Alternative 5: 79.4% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 79.7% accurate, 1.3× speedup?

      \[\begin{array}{l} angle_m = \left|angle\right| \\ {b}^{2} + {\left(a \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}^{2} \end{array} \]
      angle_m = (fabs.f64 angle)
      (FPCore (a b angle_m)
       :precision binary64
       (+ (pow b 2.0) (pow (* a (sin (* (* angle_m PI) 0.005555555555555556))) 2.0)))
      angle_m = fabs(angle);
      double code(double a, double b, double angle_m) {
      	return pow(b, 2.0) + pow((a * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556))), 2.0);
      }
      
      angle_m = Math.abs(angle);
      public static double code(double a, double b, double angle_m) {
      	return Math.pow(b, 2.0) + Math.pow((a * Math.sin(((angle_m * Math.PI) * 0.005555555555555556))), 2.0);
      }
      
      angle_m = math.fabs(angle)
      def code(a, b, angle_m):
      	return math.pow(b, 2.0) + math.pow((a * math.sin(((angle_m * math.pi) * 0.005555555555555556))), 2.0)
      
      angle_m = abs(angle)
      function code(a, b, angle_m)
      	return Float64((b ^ 2.0) + (Float64(a * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556))) ^ 2.0))
      end
      
      angle_m = abs(angle);
      function tmp = code(a, b, angle_m)
      	tmp = (b ^ 2.0) + ((a * sin(((angle_m * pi) * 0.005555555555555556))) ^ 2.0);
      end
      
      angle_m = N[Abs[angle], $MachinePrecision]
      code[a_, b_, angle$95$m_] := N[(N[Power[b, 2.0], $MachinePrecision] + N[Power[N[(a * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle_m = \left|angle\right|
      
      \\
      {b}^{2} + {\left(a \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}^{2}
      \end{array}
      
      Derivation
      1. Initial program 81.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. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
          2. *-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), \left(\frac{1}{180}\right)\right)\right)\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(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right), \left(\frac{1}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
          4. 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), \left(\frac{1}{180}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
          5. metadata-eval81.9%

            \[\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), \frac{1}{180}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        3. Applied egg-rr81.9%

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

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

        Alternative 7: 79.7% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 77.4% accurate, 3.4× speedup?

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

            1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto {b}^{2} + \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.4499999999999999e-11 < angle

              1. Initial program 64.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. 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. Simplified64.3%

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

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

                  \[\leadsto {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \color{blue}{1}\right)}^{2} \]
                2. Step-by-step derivation
                  1. +-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-rr64.9%

                  \[\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} \]
              7. Recombined 2 regimes into one program.
              8. Final simplification76.7%

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

              Alternative 9: 65.7% accurate, 18.9× speedup?

              \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 8.8 \cdot 10^{-17}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot b + angle\_m \cdot \left(\left(a \cdot angle\_m\right) \cdot \left(a \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\ \end{array} \end{array} \]
              angle_m = (fabs.f64 angle)
              (FPCore (a b angle_m)
               :precision binary64
               (if (<= a 8.8e-17)
                 (* b b)
                 (+
                  (* b b)
                  (* angle_m (* (* a angle_m) (* a (* PI (* PI 3.08641975308642e-5))))))))
              angle_m = fabs(angle);
              double code(double a, double b, double angle_m) {
              	double tmp;
              	if (a <= 8.8e-17) {
              		tmp = b * b;
              	} else {
              		tmp = (b * b) + (angle_m * ((a * angle_m) * (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 <= 8.8e-17) {
              		tmp = b * b;
              	} else {
              		tmp = (b * b) + (angle_m * ((a * angle_m) * (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 <= 8.8e-17:
              		tmp = b * b
              	else:
              		tmp = (b * b) + (angle_m * ((a * angle_m) * (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 <= 8.8e-17)
              		tmp = Float64(b * b);
              	else
              		tmp = Float64(Float64(b * b) + Float64(angle_m * Float64(Float64(a * angle_m) * Float64(a * Float64(pi * Float64(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 <= 8.8e-17)
              		tmp = b * b;
              	else
              		tmp = (b * b) + (angle_m * ((a * angle_m) * (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, 8.8e-17], N[(b * b), $MachinePrecision], N[(N[(b * b), $MachinePrecision] + N[(angle$95$m * N[(N[(a * angle$95$m), $MachinePrecision] * N[(a * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              angle_m = \left|angle\right|
              
              \\
              \begin{array}{l}
              \mathbf{if}\;a \leq 8.8 \cdot 10^{-17}:\\
              \;\;\;\;b \cdot b\\
              
              \mathbf{else}:\\
              \;\;\;\;b \cdot b + angle\_m \cdot \left(\left(a \cdot angle\_m\right) \cdot \left(a \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if a < 8.8e-17

                1. Initial program 79.7%

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

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

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

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

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

                if 8.8e-17 < a

                1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                3. Simplified87.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, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                6. Step-by-step derivation
                  1. Simplified88.1%

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

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

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

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

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

                      \[\leadsto {b}^{2} + \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 64.9% accurate, 18.9× speedup?

                \[\begin{array}{l} angle_m = \left|angle\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 8.8 \cdot 10^{-17}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;b \cdot b + a \cdot \left(\left(a \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right) \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 8.8e-17)
                   (* b b)
                   (+
                    (* 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 <= 8.8e-17) {
                		tmp = b * b;
                	} else {
                		tmp = (b * b) + (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 <= 8.8e-17) {
                		tmp = b * b;
                	} else {
                		tmp = (b * b) + (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 <= 8.8e-17:
                		tmp = b * b
                	else:
                		tmp = (b * b) + (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 <= 8.8e-17)
                		tmp = Float64(b * b);
                	else
                		tmp = Float64(Float64(b * b) + Float64(a * Float64(Float64(a * Float64(pi * Float64(pi * 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 <= 8.8e-17)
                		tmp = b * b;
                	else
                		tmp = (b * b) + (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, 8.8e-17], N[(b * b), $MachinePrecision], N[(N[(b * b), $MachinePrecision] + N[(a * N[(N[(a * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                angle_m = \left|angle\right|
                
                \\
                \begin{array}{l}
                \mathbf{if}\;a \leq 8.8 \cdot 10^{-17}:\\
                \;\;\;\;b \cdot b\\
                
                \mathbf{else}:\\
                \;\;\;\;b \cdot b + a \cdot \left(\left(a \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right) \cdot \left(angle\_m \cdot angle\_m\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 8.8e-17

                  1. Initial program 79.7%

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

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

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

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

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

                  if 8.8e-17 < a

                  1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\left(b \cdot \cos \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{2}\right)\right) \]
                  3. Simplified87.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, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), 180\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
                  6. Step-by-step derivation
                    1. Simplified88.1%

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

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

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

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

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

                        \[\leadsto {b}^{2} + \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{{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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 61.1% accurate, 23.1× speedup?

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

                    1. Initial program 78.9%

                      \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
                    2. 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-*.f6464.8%

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

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

                    if 1.20000000000000005e93 < a

                    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto {b}^{2} + \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{{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. *-commutativeN/A

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

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

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

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

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

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

                          \[\leadsto \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 {angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                        5. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 12: 61.1% accurate, 23.1× speedup?

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

                      1. Initial program 78.9%

                        \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
                      2. 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-*.f6464.8%

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

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

                      if 1.65000000000000004e93 < a

                      1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto {b}^{2} + \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{{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. *-commutativeN/A

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

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

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

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

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

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

                            \[\leadsto \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 {angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                          5. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 13: 61.0% accurate, 23.1× speedup?

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

                        1. Initial program 79.4%

                          \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
                        2. 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-*.f6464.1%

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

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

                        if 5.4999999999999998e164 < a

                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto {b}^{2} + \left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \color{blue}{{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. *-commutativeN/A

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

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

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

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

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

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

                              \[\leadsto \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 {angle}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
                            5. *-lowering-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(\color{blue}{angle} \cdot angle\right)\right)\right) \]
                            10. swap-sqrN/A

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

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

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

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

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

                              \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\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), \left(angle \cdot angle\right)\right)\right) \]
                            16. PI-lowering-PI.f64N/A

                              \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\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), \left(angle \cdot angle\right)\right)\right) \]
                            17. *-lowering-*.f6479.2%

                              \[\leadsto \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\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), \mathsf{*.f64}\left(angle, \color{blue}{angle}\right)\right)\right) \]
                          9. Applied egg-rr79.2%

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

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

                        Alternative 14: 57.2% accurate, 139.0× speedup?

                        \[\begin{array}{l} angle_m = \left|angle\right| \\ b \cdot b \end{array} \]
                        angle_m = (fabs.f64 angle)
                        (FPCore (a b angle_m) :precision binary64 (* b b))
                        angle_m = fabs(angle);
                        double code(double a, double b, double angle_m) {
                        	return b * b;
                        }
                        
                        angle_m = abs(angle)
                        real(8) function code(a, b, angle_m)
                            real(8), intent (in) :: a
                            real(8), intent (in) :: b
                            real(8), intent (in) :: angle_m
                            code = b * b
                        end function
                        
                        angle_m = Math.abs(angle);
                        public static double code(double a, double b, double angle_m) {
                        	return b * b;
                        }
                        
                        angle_m = math.fabs(angle)
                        def code(a, b, angle_m):
                        	return b * b
                        
                        angle_m = abs(angle)
                        function code(a, b, angle_m)
                        	return Float64(b * b)
                        end
                        
                        angle_m = abs(angle);
                        function tmp = code(a, b, angle_m)
                        	tmp = b * b;
                        end
                        
                        angle_m = N[Abs[angle], $MachinePrecision]
                        code[a_, b_, angle$95$m_] := N[(b * b), $MachinePrecision]
                        
                        \begin{array}{l}
                        angle_m = \left|angle\right|
                        
                        \\
                        b \cdot b
                        \end{array}
                        
                        Derivation
                        1. Initial program 81.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-*.f6459.0%

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

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

                        Reproduce

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