ab-angle->ABCF C

Percentage Accurate: 79.8% → 79.4%
Time: 12.6s
Alternatives: 12
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 79.8% accurate, 1.0× speedup?

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

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

Alternative 1: 79.4% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 86.9%

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

      \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
    4. Step-by-step derivation
      1. Simplified87.0%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right)}^{2} \]
        10. lower-PI.f6487.1

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

        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)}}^{2} \]
      5. Step-by-step derivation
        1. lift-PI.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)} \cdot b\right)}^{2} \]
        10. lower-*.f6487.1

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

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

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

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

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

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

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

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

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

      if 5.00000000000000031e-10 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 58.8%

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

        \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
      4. Step-by-step derivation
        1. Simplified59.0%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)}}^{2} \]
        5. Step-by-step derivation
          1. lift-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 79.5% accurate, 1.4× speedup?

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

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

        \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
      4. Step-by-step derivation
        1. Simplified79.0%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right)}^{2} \]
          10. lower-PI.f6479.2

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

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

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

        Alternative 3: 79.6% accurate, 1.4× speedup?

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

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

          \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
        4. Step-by-step derivation
          1. Simplified79.0%

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

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

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

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

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

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

              \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(b \cdot \sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)}\right)}^{2} \]
            7. lower-*.f6479.1

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

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

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

          Alternative 4: 79.5% accurate, 1.8× speedup?

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

            1. Initial program 86.9%

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

              \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
            4. Step-by-step derivation
              1. Simplified87.0%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right)}^{2} \]
                10. lower-PI.f6487.1

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

                \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)}}^{2} \]
              5. Step-by-step derivation
                1. lift-PI.f64N/A

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

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

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

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

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

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

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

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

                  \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)} \cdot b\right)}^{2} \]
                10. lower-*.f6487.1

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

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

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

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

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

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

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

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

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

              if 5.00000000000000031e-10 < (/.f64 angle #s(literal 180 binary64))

              1. Initial program 58.8%

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

                \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
              4. Step-by-step derivation
                1. Simplified59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 5: 67.0% accurate, 2.0× speedup?

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

                1. Initial program 78.0%

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

                  \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                4. Step-by-step derivation
                  1. Simplified78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                    17. lower-PI.f6463.7

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

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

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

                      \[\leadsto \color{blue}{a \cdot a} \]
                    2. lower-*.f6461.6

                      \[\leadsto \color{blue}{a \cdot a} \]
                  7. Simplified61.6%

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

                  if 1.15999999999999996e-57 < b

                  1. Initial program 81.4%

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

                    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                  4. Step-by-step derivation
                    1. Simplified81.3%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\sin \left(\frac{1}{180} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right)}^{2} \]
                      10. lower-PI.f6481.3

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

                      \[\leadsto {\left(a \cdot 1\right)}^{2} + {\color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)}}^{2} \]
                    5. Step-by-step derivation
                      1. lift-PI.f64N/A

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

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

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

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

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

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

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

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

                        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\sin \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right) \cdot angle\right)} \cdot b\right)}^{2} \]
                      10. lower-*.f6481.4

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

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

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

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

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

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

                        \[\leadsto {\left(a \cdot 1\right)}^{2} + {\left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot b\right)}\right)\right)}^{2} \]
                      5. lower-PI.f6478.9

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

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

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

                  Alternative 6: 67.0% accurate, 9.3× speedup?

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

                    1. Initial program 78.0%

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

                      \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                    4. Step-by-step derivation
                      1. Simplified78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                        17. lower-PI.f6463.7

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

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

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

                          \[\leadsto \color{blue}{a \cdot a} \]
                        2. lower-*.f6461.6

                          \[\leadsto \color{blue}{a \cdot a} \]
                      7. Simplified61.6%

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

                      if 1.15999999999999996e-57 < b

                      1. Initial program 81.4%

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

                        \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                      4. Step-by-step derivation
                        1. Simplified81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                          17. lower-PI.f6463.0

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\pi \cdot b\right) \cdot \left(angle \cdot -0.005555555555555556\right), \left(\pi \cdot b\right) \cdot \left(angle \cdot -0.005555555555555556\right), a \cdot a\right)} \]
                      5. Recombined 2 regimes into one program.
                      6. Add Preprocessing

                      Alternative 7: 71.8% accurate, 10.4× speedup?

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

                        1. Initial program 76.6%

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

                          \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                        4. Step-by-step derivation
                          1. Simplified76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 1.4e154 < b

                          1. Initial program 99.7%

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

                            \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                          4. Step-by-step derivation
                            1. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                              17. lower-PI.f6464.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 8: 71.8% accurate, 10.4× speedup?

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

                            1. Initial program 76.6%

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

                              \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                            4. Step-by-step derivation
                              1. Simplified76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 1.4e154 < b

                              1. Initial program 99.7%

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

                                \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                              4. Step-by-step derivation
                                1. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                  17. lower-PI.f6464.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 9: 71.8% accurate, 10.4× speedup?

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

                                1. Initial program 76.6%

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

                                  \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                4. Step-by-step derivation
                                  1. Simplified76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 1.29999999999999994e154 < b

                                  1. Initial program 99.7%

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

                                    \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                  4. Step-by-step derivation
                                    1. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                      17. lower-PI.f6464.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  Alternative 10: 65.1% accurate, 10.4× speedup?

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

                                    1. Initial program 78.0%

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

                                      \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                    4. Step-by-step derivation
                                      1. Simplified78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                        17. lower-PI.f6463.7

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

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

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

                                          \[\leadsto \color{blue}{a \cdot a} \]
                                        2. lower-*.f6461.6

                                          \[\leadsto \color{blue}{a \cdot a} \]
                                      7. Simplified61.6%

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

                                      if 1.15999999999999996e-57 < b

                                      1. Initial program 81.4%

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

                                        \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                      4. Step-by-step derivation
                                        1. Simplified81.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                          17. lower-PI.f6463.0

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \color{blue}{\left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) + {\left(a \cdot 1\right)}^{2}} \]
                                        6. Applied egg-rr70.5%

                                          \[\leadsto \color{blue}{\mathsf{fma}\left(b, \left(b \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(angle \cdot angle\right), a \cdot a\right)} \]
                                      5. Recombined 2 regimes into one program.
                                      6. Final simplification63.9%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.16 \cdot 10^{-57}:\\ \;\;\;\;a \cdot a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b, \left(b \cdot \left(\left(\pi \cdot \pi\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right) \cdot \left(angle \cdot angle\right), a \cdot a\right)\\ \end{array} \]
                                      7. Add Preprocessing

                                      Alternative 11: 60.8% accurate, 12.1× speedup?

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

                                        1. Initial program 76.6%

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

                                          \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                        4. Step-by-step derivation
                                          1. Simplified76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{a \cdot a} \]
                                            2. lower-*.f6458.8

                                              \[\leadsto \color{blue}{a \cdot a} \]
                                          7. Simplified58.8%

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

                                          if 7.50000000000000033e162 < b

                                          1. Initial program 99.7%

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

                                            \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                          4. Step-by-step derivation
                                            1. Simplified99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                              17. lower-PI.f6464.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot \color{blue}{\left(b \cdot b\right)}\right)\right)\right) \]
                                              18. lower-*.f6464.8

                                                \[\leadsto \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \color{blue}{\left(b \cdot b\right)}\right)\right)\right) \]
                                            7. Simplified64.8%

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

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

                                          Alternative 12: 57.2% accurate, 74.7× speedup?

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

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

                                            \[\leadsto {\left(a \cdot \color{blue}{1}\right)}^{2} + {\left(b \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)}^{2} \]
                                          4. Step-by-step derivation
                                            1. Simplified79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto {\left(a \cdot 1\right)}^{2} + \left(angle \cdot angle\right) \cdot \left(\left(b \cdot b\right) \cdot \left(\frac{1}{32400} \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                              17. lower-PI.f6463.5

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

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

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

                                                \[\leadsto \color{blue}{a \cdot a} \]
                                              2. lower-*.f6456.4

                                                \[\leadsto \color{blue}{a \cdot a} \]
                                            7. Simplified56.4%

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

                                            Reproduce

                                            ?
                                            herbie shell --seed 2024215 
                                            (FPCore (a b angle)
                                              :name "ab-angle->ABCF C"
                                              :precision binary64
                                              (+ (pow (* a (cos (* PI (/ angle 180.0)))) 2.0) (pow (* b (sin (* PI (/ angle 180.0)))) 2.0)))