ab-angle->ABCF A

Percentage Accurate: 79.5% → 79.4%
Time: 22.4s
Alternatives: 14
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 79.5% accurate, 1.0× speedup?

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

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

Alternative 1: 79.4% accurate, 0.6× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle\_m \cdot \pi}{180}\right)\right)}^{2} + {\left(b \cdot \cos \left({\left(e^{-0.5 \cdot \log \left(\frac{180}{angle\_m \cdot \pi}\right)}\right)}^{2}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 79.3%

    \[{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} \]
  2. Add Preprocessing
  3. Final simplification79.3%

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

Alternative 3: 79.3% accurate, 1.3× speedup?

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

\\
{\left(a \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)}^{2} + {b}^{2}
\end{array}
Derivation
  1. Initial program 79.3%

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

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

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

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

    Alternative 4: 79.3% accurate, 1.8× speedup?

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

      1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 79.3% accurate, 1.8× speedup?

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

        1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 79.2% accurate, 1.9× speedup?

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

          1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{\_.f64}\left(\frac{1}{2}, \mathsf{*.f64}\left(\frac{1}{2}, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(-2, \left(\mathsf{neg}\left(\frac{180}{angle \cdot \mathsf{PI}\left(\right)}\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(a, a\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right) \]
              7. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

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

            Alternative 7: 79.2% accurate, 1.9× speedup?

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

              1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 57.4%

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

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

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

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

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

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

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

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

                Alternative 8: 67.4% accurate, 1.9× speedup?

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

                  1. Initial program 77.8%

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

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

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

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

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

                  if 9.49999999999999958e-114 < a

                  1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 9: 65.4% accurate, 3.2× speedup?

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

                    1. Initial program 77.8%

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

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

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

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

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

                    if 4.6e-111 < a

                    1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 10: 64.4% accurate, 15.4× speedup?

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

                    1. Initial program 77.8%

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

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

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

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

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

                    if 1.75000000000000014e-113 < a < 3.0000000000000001e137

                    1. Initial program 73.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 3.0000000000000001e137 < a

                    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\mathsf{neg}\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{32400}\right)\right)\right)\right) \]
                      17. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(angle \cdot angle\right) \cdot {\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot a\right)\right)}^{2} \]
                      8. unpow2N/A

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot a\right)\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right), \color{blue}{\left(\frac{1}{180} \cdot a\right)}\right) \]
                    14. Applied egg-rr83.4%

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

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

                  Alternative 11: 62.5% accurate, 20.8× speedup?

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

                    1. Initial program 76.7%

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

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

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

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

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

                    if 1.0200000000000001e93 < a

                    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\mathsf{neg}\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{32400}\right)\right)\right)\right) \]
                      17. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(angle \cdot angle\right) \cdot {\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot a\right)\right)}^{2} \]
                      8. unpow2N/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot a\right)\right)\right) \cdot angle\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot a\right)\right)}\right) \]
                    14. Applied egg-rr74.8%

                      \[\leadsto \color{blue}{\left(\left(\pi \cdot \left(angle \cdot \left(a \cdot 0.005555555555555556\right)\right)\right) \cdot angle\right) \cdot \left(a \cdot \frac{\pi}{180}\right)} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification61.6%

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

                  Alternative 12: 62.2% accurate, 23.1× speedup?

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

                    1. Initial program 76.7%

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

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

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

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

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

                    if 2.24999999999999986e94 < a

                    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\mathsf{neg}\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{32400}\right)\right)\right)\right) \]
                      17. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(angle \cdot \left(\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{32400}\right) \cdot \left(a \cdot a\right)\right)\right) \cdot angle \]
                      4. pow2N/A

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

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

                        \[\leadsto \left(angle \cdot \left({\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)}^{2} \cdot \left(a \cdot a\right)\right)\right) \cdot angle \]
                      7. pow2N/A

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\left(angle \cdot {\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot a\right)\right)}^{2}\right), \color{blue}{angle}\right) \]
                    14. Applied egg-rr70.3%

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

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

                  Alternative 13: 61.0% accurate, 23.1× speedup?

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

                    1. Initial program 76.7%

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

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

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

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

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

                    if 2.24999999999999986e94 < a

                    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\right), \left(\mathsf{neg}\left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{-1}{32400}\right)\right)\right)\right) \]
                      17. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 14: 56.9% accurate, 139.0× speedup?

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

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

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

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

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

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

                  Reproduce

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