ab-angle->ABCF A

Percentage Accurate: 79.3% → 79.2%
Time: 17.8s
Alternatives: 18
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 18 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.3% 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.2% accurate, 0.7× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\sqrt{\pi} \cdot \frac{angle \cdot \sqrt{\pi}}{180}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 78.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. Step-by-step derivation
    1. add-sqr-sqrtN/A

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

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

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

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

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

      \[\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, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right), 2\right)\right) \]
  4. Applied egg-rr78.9%

    \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \sqrt{\pi}}{180} \cdot \sqrt{\pi}\right)}\right)}^{2} \]
  5. Final simplification78.9%

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

Alternative 2: 79.2% accurate, 0.7× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot \sqrt{\pi}\right) \cdot \frac{\sqrt{\pi}}{180}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 78.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. Step-by-step derivation
    1. associate-*l/N/A

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

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

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

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

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

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

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

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

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

Alternative 3: 79.3% accurate, 1.0× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{\frac{\pi}{180}}{\frac{1}{angle}}\right)\right)}^{2} + {\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 78.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. Step-by-step derivation
    1. *-commutativeN/A

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\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. Applied egg-rr78.8%

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

Alternative 4: 79.2% accurate, 1.0× speedup?

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

\\
{\left(b \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(a \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 78.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. Step-by-step derivation
    1. associate-*l/N/A

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

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

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

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

Alternative 5: 79.3% 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}
Derivation
  1. Initial program 78.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. Add Preprocessing

Alternative 6: 79.2% accurate, 1.0× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 78.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. Step-by-step derivation
    1. associate-*l/N/A

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

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

      \[\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, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right), \frac{1}{180}\right)\right)\right), 2\right)\right) \]
  4. Applied egg-rr78.7%

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

Alternative 7: 79.2% accurate, 1.3× speedup?

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

\\
{\left(a \cdot \sin \left(\frac{\frac{\pi}{180}}{\frac{1}{angle}}\right)\right)}^{2} + {b}^{2}
\end{array}
Derivation
  1. Initial program 78.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. Step-by-step derivation
    1. *-commutativeN/A

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

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

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

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

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

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

      \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\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. Applied egg-rr78.8%

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

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

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

    Alternative 8: 79.1% accurate, 1.3× speedup?

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

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

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

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

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

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

      Alternative 9: 79.2% accurate, 1.3× speedup?

      \[\begin{array}{l} \\ {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {b}^{2} \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (+ (pow (* a (sin (* (/ angle 180.0) PI))) 2.0) (pow b 2.0)))
      double code(double a, double b, double angle) {
      	return pow((a * sin(((angle / 180.0) * ((double) M_PI)))), 2.0) + pow(b, 2.0);
      }
      
      public static double code(double a, double b, double angle) {
      	return Math.pow((a * Math.sin(((angle / 180.0) * Math.PI))), 2.0) + Math.pow(b, 2.0);
      }
      
      def code(a, b, angle):
      	return math.pow((a * math.sin(((angle / 180.0) * math.pi))), 2.0) + math.pow(b, 2.0)
      
      function code(a, b, angle)
      	return Float64((Float64(a * sin(Float64(Float64(angle / 180.0) * pi))) ^ 2.0) + (b ^ 2.0))
      end
      
      function tmp = code(a, b, angle)
      	tmp = ((a * sin(((angle / 180.0) * pi))) ^ 2.0) + (b ^ 2.0);
      end
      
      code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {b}^{2}
      \end{array}
      
      Derivation
      1. Initial program 78.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(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{1}\right), 2\right)\right) \]
      4. Step-by-step derivation
        1. Simplified78.5%

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

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

        Alternative 10: 65.5% accurate, 1.7× speedup?

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

          1. Initial program 84.1%

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

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

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

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

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

          if 4.9999999999999999e-161 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000012e-9

          1. Initial program 99.6%

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

              \[\leadsto \mathsf{+.f64}\left(\left(e^{\log \left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{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) \]
            2. unpow1N/A

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\left(e^{1 \cdot \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\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. exp-prodN/A

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\right)\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) \]
            10. unpow1N/A

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \mathsf{*.f64}\left(2, \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{\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-rr35.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(e^{\color{blue}{\log \left(\frac{1}{180} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2}}\right)\right)\right) \]
            13. exp-to-powN/A

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

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

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

          if 2.00000000000000012e-9 < (/.f64 angle #s(literal 180 binary64))

          1. Initial program 60.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. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\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. Applied egg-rr60.3%

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left({\left(\frac{\frac{1}{angle}}{\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)}\right)}^{-1} \cdot \frac{1}{\mathsf{neg}\left(180\right)}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\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(\left({\left(\frac{\frac{1}{angle}}{\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)}\right)}^{-1}\right), \left(\frac{1}{\mathsf{neg}\left(180\right)}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right) \]
          6. Applied egg-rr60.4%

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

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

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

        Alternative 11: 65.4% accurate, 1.8× speedup?

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

          1. Initial program 84.1%

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

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

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

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

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

          if 4.9999999999999999e-161 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000012e-9

          1. Initial program 99.6%

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

              \[\leadsto \mathsf{+.f64}\left(\left(e^{\log \left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{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) \]
            2. unpow1N/A

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\left(e^{1 \cdot \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\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. exp-prodN/A

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\right)\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) \]
            10. unpow1N/A

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \mathsf{*.f64}\left(2, \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{\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-rr35.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(e^{\color{blue}{\log \left(\frac{1}{180} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2}}\right)\right)\right) \]
            13. exp-to-powN/A

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

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

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

          if 2.00000000000000012e-9 < (/.f64 angle #s(literal 180 binary64))

          1. Initial program 60.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. 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-rr60.1%

            \[\leadsto \color{blue}{\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \frac{\pi}{\frac{180}{angle}}\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. 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(\frac{2}{1} \cdot \frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\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. times-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(\left(\frac{2 \cdot \mathsf{PI}\left(\right)}{1 \cdot \frac{180}{angle}}\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. *-commutativeN/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{\mathsf{PI}\left(\right) \cdot 2}{1 \cdot \frac{180}{angle}}\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. times-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(\left(\frac{\mathsf{PI}\left(\right)}{1} \cdot \frac{2}{\frac{180}{angle}}\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(\frac{\mathsf{PI}\left(\right)}{1}\right), \left(\frac{2}{\frac{180}{angle}}\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. /-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(\mathsf{/.f64}\left(\mathsf{PI}\left(\right), 1\right), \left(\frac{2}{\frac{180}{angle}}\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. PI-lowering-PI.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(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \left(\frac{2}{\frac{180}{angle}}\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(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(2, \left(\frac{180}{angle}\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. /-lowering-/.f6460.2%

              \[\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(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(180, angle\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-rr60.2%

            \[\leadsto \left(0.5 - 0.5 \cdot \cos \color{blue}{\left(\frac{\pi}{1} \cdot \frac{2}{\frac{180}{angle}}\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(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 1\right), \mathsf{/.f64}\left(2, \mathsf{/.f64}\left(180, angle\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. Simplified61.3%

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

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

          Alternative 12: 65.4% accurate, 1.8× speedup?

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

            1. Initial program 84.1%

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

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

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

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

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

            if 4.9999999999999999e-161 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000012e-9

            1. Initial program 99.6%

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

                \[\leadsto \mathsf{+.f64}\left(\left(e^{\log \left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{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) \]
              2. unpow1N/A

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\left(e^{1 \cdot \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\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. exp-prodN/A

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\right)\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) \]
              10. unpow1N/A

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \mathsf{*.f64}\left(2, \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{\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-rr35.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(e^{\color{blue}{\log \left(\frac{1}{180} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2}}\right)\right)\right) \]
              13. exp-to-powN/A

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

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

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

            if 2.00000000000000012e-9 < (/.f64 angle #s(literal 180 binary64))

            1. Initial program 60.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. 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-rr60.1%

              \[\leadsto \color{blue}{\left(0.5 - 0.5 \cdot \cos \left(2 \cdot \frac{\pi}{\frac{180}{angle}}\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{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\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) \]
            6. Step-by-step derivation
              1. Simplified61.3%

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

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

            Alternative 13: 55.5% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.25 \cdot 10^{-153}:\\ \;\;\;\;{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+136}:\\ \;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot {\left(0.005555555555555556 \cdot \left(a \cdot \pi\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;b \cdot b\\ \end{array} \end{array} \]
            (FPCore (a b angle)
             :precision binary64
             (if (<= b 2.25e-153)
               (pow (* a (sin (* angle (* PI 0.005555555555555556)))) 2.0)
               (if (<= b 1.4e+136)
                 (+
                  (* b b)
                  (* (* angle angle) (pow (* 0.005555555555555556 (* a PI)) 2.0)))
                 (* b b))))
            double code(double a, double b, double angle) {
            	double tmp;
            	if (b <= 2.25e-153) {
            		tmp = pow((a * sin((angle * (((double) M_PI) * 0.005555555555555556)))), 2.0);
            	} else if (b <= 1.4e+136) {
            		tmp = (b * b) + ((angle * angle) * pow((0.005555555555555556 * (a * ((double) M_PI))), 2.0));
            	} else {
            		tmp = b * b;
            	}
            	return tmp;
            }
            
            public static double code(double a, double b, double angle) {
            	double tmp;
            	if (b <= 2.25e-153) {
            		tmp = Math.pow((a * Math.sin((angle * (Math.PI * 0.005555555555555556)))), 2.0);
            	} else if (b <= 1.4e+136) {
            		tmp = (b * b) + ((angle * angle) * Math.pow((0.005555555555555556 * (a * Math.PI)), 2.0));
            	} else {
            		tmp = b * b;
            	}
            	return tmp;
            }
            
            def code(a, b, angle):
            	tmp = 0
            	if b <= 2.25e-153:
            		tmp = math.pow((a * math.sin((angle * (math.pi * 0.005555555555555556)))), 2.0)
            	elif b <= 1.4e+136:
            		tmp = (b * b) + ((angle * angle) * math.pow((0.005555555555555556 * (a * math.pi)), 2.0))
            	else:
            		tmp = b * b
            	return tmp
            
            function code(a, b, angle)
            	tmp = 0.0
            	if (b <= 2.25e-153)
            		tmp = Float64(a * sin(Float64(angle * Float64(pi * 0.005555555555555556)))) ^ 2.0;
            	elseif (b <= 1.4e+136)
            		tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * (Float64(0.005555555555555556 * Float64(a * pi)) ^ 2.0)));
            	else
            		tmp = Float64(b * b);
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, b, angle)
            	tmp = 0.0;
            	if (b <= 2.25e-153)
            		tmp = (a * sin((angle * (pi * 0.005555555555555556)))) ^ 2.0;
            	elseif (b <= 1.4e+136)
            		tmp = (b * b) + ((angle * angle) * ((0.005555555555555556 * (a * pi)) ^ 2.0));
            	else
            		tmp = b * b;
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, angle_] := If[LessEqual[b, 2.25e-153], N[Power[N[(a * N[Sin[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[b, 1.4e+136], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[Power[N[(0.005555555555555556 * N[(a * Pi), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * b), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;b \leq 2.25 \cdot 10^{-153}:\\
            \;\;\;\;{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}\\
            
            \mathbf{elif}\;b \leq 1.4 \cdot 10^{+136}:\\
            \;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot {\left(0.005555555555555556 \cdot \left(a \cdot \pi\right)\right)}^{2}\\
            
            \mathbf{else}:\\
            \;\;\;\;b \cdot b\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if b < 2.25e-153

              1. Initial program 78.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. Step-by-step derivation
                1. *-commutativeN/A

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

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), 180\right), \mathsf{/.f64}\left(1, angle\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. Applied egg-rr78.9%

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\left({\left(\frac{\frac{1}{angle}}{\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)}\right)}^{-1} \cdot \frac{1}{\mathsf{neg}\left(180\right)}\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\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(\left({\left(\frac{\frac{1}{angle}}{\mathsf{neg}\left(\mathsf{PI}\left(\right)\right)}\right)}^{-1}\right), \left(\frac{1}{\mathsf{neg}\left(180\right)}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right)\right) \]
              6. Applied egg-rr78.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), 2\right) \]
              9. Simplified43.7%

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

              if 2.25e-153 < b < 1.4000000000000001e136

              1. Initial program 66.2%

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

                  \[\leadsto \mathsf{+.f64}\left(\left(e^{\log \left({\left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right)}^{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) \]
                2. unpow1N/A

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\left(e^{1 \cdot \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\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. exp-prodN/A

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2\right)\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) \]
                10. unpow1N/A

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{E.f64}\left(\right), \mathsf{*.f64}\left(2, \left(\log \left(a \cdot \sin \left(\frac{angle}{180} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 1\right)\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{\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-rr29.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(e^{\color{blue}{\log \left(\frac{1}{180} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right) \cdot 2}}\right)\right)\right) \]
                13. exp-to-powN/A

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

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

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

              if 1.4000000000000001e136 < b

              1. Initial program 97.9%

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

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

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

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

                \[\leadsto \color{blue}{b \cdot b} \]
            3. Recombined 3 regimes into one program.
            4. Final simplification54.0%

              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.25 \cdot 10^{-153}:\\ \;\;\;\;{\left(a \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)}^{2}\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{+136}:\\ \;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot {\left(0.005555555555555556 \cdot \left(a \cdot \pi\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;b \cdot b\\ \end{array} \]
            5. Add Preprocessing

            Alternative 14: 63.2% accurate, 14.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 1.1 \cdot 10^{-54}:\\ \;\;\;\;b \cdot b\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\ \mathbf{elif}\;a \leq 6 \cdot 10^{+200}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \left(a \cdot a\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\\ \end{array} \end{array} \]
            (FPCore (a b angle)
             :precision binary64
             (if (<= a 1.1e-54)
               (* b b)
               (if (<= a 1.35e+154)
                 (+
                  (* b b)
                  (* (* angle angle) (* PI (* PI (* (* a a) 3.08641975308642e-5)))))
                 (if (<= a 6e+200)
                   (* a (* a (* (* angle angle) (* PI (* PI 3.08641975308642e-5)))))
                   (* (* angle (* a a)) (* (* angle PI) (* PI 3.08641975308642e-5)))))))
            double code(double a, double b, double angle) {
            	double tmp;
            	if (a <= 1.1e-54) {
            		tmp = b * b;
            	} else if (a <= 1.35e+154) {
            		tmp = (b * b) + ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((a * a) * 3.08641975308642e-5))));
            	} else if (a <= 6e+200) {
            		tmp = a * (a * ((angle * angle) * (((double) M_PI) * (((double) M_PI) * 3.08641975308642e-5))));
            	} else {
            		tmp = (angle * (a * a)) * ((angle * ((double) M_PI)) * (((double) M_PI) * 3.08641975308642e-5));
            	}
            	return tmp;
            }
            
            public static double code(double a, double b, double angle) {
            	double tmp;
            	if (a <= 1.1e-54) {
            		tmp = b * b;
            	} else if (a <= 1.35e+154) {
            		tmp = (b * b) + ((angle * angle) * (Math.PI * (Math.PI * ((a * a) * 3.08641975308642e-5))));
            	} else if (a <= 6e+200) {
            		tmp = a * (a * ((angle * angle) * (Math.PI * (Math.PI * 3.08641975308642e-5))));
            	} else {
            		tmp = (angle * (a * a)) * ((angle * Math.PI) * (Math.PI * 3.08641975308642e-5));
            	}
            	return tmp;
            }
            
            def code(a, b, angle):
            	tmp = 0
            	if a <= 1.1e-54:
            		tmp = b * b
            	elif a <= 1.35e+154:
            		tmp = (b * b) + ((angle * angle) * (math.pi * (math.pi * ((a * a) * 3.08641975308642e-5))))
            	elif a <= 6e+200:
            		tmp = a * (a * ((angle * angle) * (math.pi * (math.pi * 3.08641975308642e-5))))
            	else:
            		tmp = (angle * (a * a)) * ((angle * math.pi) * (math.pi * 3.08641975308642e-5))
            	return tmp
            
            function code(a, b, angle)
            	tmp = 0.0
            	if (a <= 1.1e-54)
            		tmp = Float64(b * b);
            	elseif (a <= 1.35e+154)
            		tmp = Float64(Float64(b * b) + Float64(Float64(angle * angle) * Float64(pi * Float64(pi * Float64(Float64(a * a) * 3.08641975308642e-5)))));
            	elseif (a <= 6e+200)
            		tmp = Float64(a * Float64(a * Float64(Float64(angle * angle) * Float64(pi * Float64(pi * 3.08641975308642e-5)))));
            	else
            		tmp = Float64(Float64(angle * Float64(a * a)) * Float64(Float64(angle * pi) * Float64(pi * 3.08641975308642e-5)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, b, angle)
            	tmp = 0.0;
            	if (a <= 1.1e-54)
            		tmp = b * b;
            	elseif (a <= 1.35e+154)
            		tmp = (b * b) + ((angle * angle) * (pi * (pi * ((a * a) * 3.08641975308642e-5))));
            	elseif (a <= 6e+200)
            		tmp = a * (a * ((angle * angle) * (pi * (pi * 3.08641975308642e-5))));
            	else
            		tmp = (angle * (a * a)) * ((angle * pi) * (pi * 3.08641975308642e-5));
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, angle_] := If[LessEqual[a, 1.1e-54], N[(b * b), $MachinePrecision], If[LessEqual[a, 1.35e+154], N[(N[(b * b), $MachinePrecision] + N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * N[(N[(a * a), $MachinePrecision] * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+200], N[(a * N[(a * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \leq 1.1 \cdot 10^{-54}:\\
            \;\;\;\;b \cdot b\\
            
            \mathbf{elif}\;a \leq 1.35 \cdot 10^{+154}:\\
            \;\;\;\;b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\
            
            \mathbf{elif}\;a \leq 6 \cdot 10^{+200}:\\
            \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(angle \cdot \left(a \cdot a\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 4 regimes
            2. if a < 1.1e-54

              1. Initial program 77.2%

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

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

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

              if 1.1e-54 < a < 1.35000000000000003e154

              1. Initial program 70.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. Step-by-step derivation
                1. add-sqr-sqrtN/A

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

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

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

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

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

                  \[\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, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right), 2\right)\right) \]
              4. Applied egg-rr70.5%

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \sqrt{\pi}}{180} \cdot \sqrt{\pi}\right)}\right)}^{2} \]
              5. 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}} \]
              6. 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. unpow2N/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 \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                10. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                11. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\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), \left(\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                13. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                14. 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) \cdot \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                15. *-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{PI}\left(\right), \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
              7. Simplified28.7%

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

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

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

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

              if 1.35000000000000003e154 < a < 5.99999999999999982e200

              1. Initial program 99.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. Step-by-step derivation
                1. add-sqr-sqrtN/A

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

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

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

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

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

                  \[\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, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right), 2\right)\right) \]
              4. Applied egg-rr99.3%

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \sqrt{\pi}}{180} \cdot \sqrt{\pi}\right)}\right)}^{2} \]
              5. 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}} \]
              6. 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. unpow2N/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 \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                10. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                11. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\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), \left(\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                13. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                14. 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) \cdot \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                15. *-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{PI}\left(\right), \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
              7. Simplified20.1%

                \[\leadsto \color{blue}{b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5} + \left(b \cdot b\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right)} \]
              8. 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)} \]
              9. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\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), \frac{1}{32400}\right)\right)\right) \]
              10. Simplified47.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 5.99999999999999982e200 < a

              1. Initial program 100.0%

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

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

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

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

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

                  \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI}\left(\right)\right)\right)\right)\right), 2\right)\right) \]
                10. PI-lowering-PI.f64100.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, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right), 2\right)\right) \]
              4. Applied egg-rr100.0%

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \sqrt{\pi}}{180} \cdot \sqrt{\pi}\right)}\right)}^{2} \]
              5. 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}} \]
              6. 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. unpow2N/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 \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                10. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                11. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\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), \left(\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                13. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                14. 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) \cdot \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                15. *-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{PI}\left(\right), \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
              7. Simplified61.1%

                \[\leadsto \color{blue}{b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5} + \left(b \cdot b\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right)} \]
              8. 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)} \]
              9. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\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), \frac{1}{32400}\right)\right)\right) \]
              10. Simplified77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 15: 60.9% accurate, 23.1× speedup?

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

              1. Initial program 76.5%

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

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

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

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

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

              if 1.9499999999999999e174 < a

              1. Initial program 99.8%

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

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

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

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

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

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

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

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \sqrt{\pi}}{180} \cdot \sqrt{\pi}\right)}\right)}^{2} \]
              5. 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}} \]
              6. 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. unpow2N/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 \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                10. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                11. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\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), \left(\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                13. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                14. 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) \cdot \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                15. *-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{PI}\left(\right), \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
              7. Simplified52.4%

                \[\leadsto \color{blue}{b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5} + \left(b \cdot b\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right)} \]
              8. 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)} \]
              9. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\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), \frac{1}{32400}\right)\right)\right) \]
              10. Simplified72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 16: 60.8% accurate, 23.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 3.1 \cdot 10^{+168}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\ \end{array} \end{array} \]
            (FPCore (a b angle)
             :precision binary64
             (if (<= a 3.1e+168)
               (* b b)
               (* a (* a (* (* angle angle) (* PI (* PI 3.08641975308642e-5)))))))
            double code(double a, double b, double angle) {
            	double tmp;
            	if (a <= 3.1e+168) {
            		tmp = b * b;
            	} else {
            		tmp = a * (a * ((angle * angle) * (((double) M_PI) * (((double) M_PI) * 3.08641975308642e-5))));
            	}
            	return tmp;
            }
            
            public static double code(double a, double b, double angle) {
            	double tmp;
            	if (a <= 3.1e+168) {
            		tmp = b * b;
            	} else {
            		tmp = a * (a * ((angle * angle) * (Math.PI * (Math.PI * 3.08641975308642e-5))));
            	}
            	return tmp;
            }
            
            def code(a, b, angle):
            	tmp = 0
            	if a <= 3.1e+168:
            		tmp = b * b
            	else:
            		tmp = a * (a * ((angle * angle) * (math.pi * (math.pi * 3.08641975308642e-5))))
            	return tmp
            
            function code(a, b, angle)
            	tmp = 0.0
            	if (a <= 3.1e+168)
            		tmp = Float64(b * b);
            	else
            		tmp = Float64(a * Float64(a * Float64(Float64(angle * angle) * Float64(pi * Float64(pi * 3.08641975308642e-5)))));
            	end
            	return tmp
            end
            
            function tmp_2 = code(a, b, angle)
            	tmp = 0.0;
            	if (a <= 3.1e+168)
            		tmp = b * b;
            	else
            		tmp = a * (a * ((angle * angle) * (pi * (pi * 3.08641975308642e-5))));
            	end
            	tmp_2 = tmp;
            end
            
            code[a_, b_, angle_] := If[LessEqual[a, 3.1e+168], N[(b * b), $MachinePrecision], N[(a * N[(a * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \leq 3.1 \cdot 10^{+168}:\\
            \;\;\;\;b \cdot b\\
            
            \mathbf{else}:\\
            \;\;\;\;a \cdot \left(a \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if a < 3.09999999999999996e168

              1. Initial program 76.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-*.f6459.0%

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

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

              if 3.09999999999999996e168 < a

              1. Initial program 99.7%

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

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

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

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

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

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

                  \[\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, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right), 180\right), \mathsf{sqrt.f64}\left(\mathsf{PI.f64}\left(\right)\right)\right)\right)\right), 2\right)\right) \]
              4. Applied egg-rr99.7%

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \sqrt{\pi}}{180} \cdot \sqrt{\pi}\right)}\right)}^{2} \]
              5. 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}} \]
              6. 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. unpow2N/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 \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                10. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                11. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\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), \left(\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                13. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                14. 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) \cdot \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                15. *-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{PI}\left(\right), \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
              7. Simplified48.7%

                \[\leadsto \color{blue}{b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5} + \left(b \cdot b\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right)} \]
              8. 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)} \]
              9. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\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), \frac{1}{32400}\right)\right)\right) \]
              10. Simplified70.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 17: 60.2% accurate, 23.1× speedup?

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

              1. Initial program 76.5%

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

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

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

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

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

              if 1.9499999999999999e174 < a

              1. Initial program 99.8%

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

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

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

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

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

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

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

                \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \cos \color{blue}{\left(\frac{angle \cdot \sqrt{\pi}}{180} \cdot \sqrt{\pi}\right)}\right)}^{2} \]
              5. 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}} \]
              6. 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. unpow2N/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 \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{32400} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                10. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                11. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\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), \left(\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \]
                13. 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(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right) + \left(\left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                14. 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) \cdot \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
                15. *-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{PI}\left(\right), \color{blue}{\left(\left(\frac{-1}{32400} \cdot {b}^{2}\right) \cdot \mathsf{PI}\left(\right) + \left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
              7. Simplified52.4%

                \[\leadsto \color{blue}{b \cdot b + \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(\left(a \cdot a\right) \cdot 3.08641975308642 \cdot 10^{-5} + \left(b \cdot b\right) \cdot -3.08641975308642 \cdot 10^{-5}\right)\right)\right)} \]
              8. 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)} \]
              9. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, a\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), \frac{1}{32400}\right)\right)\right) \]
              10. Simplified72.4%

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 18: 56.9% accurate, 139.0× speedup?

            \[\begin{array}{l} \\ b \cdot b \end{array} \]
            (FPCore (a b angle) :precision binary64 (* b b))
            double code(double a, double b, double angle) {
            	return b * b;
            }
            
            real(8) function code(a, b, angle)
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                real(8), intent (in) :: angle
                code = b * b
            end function
            
            public static double code(double a, double b, double angle) {
            	return b * b;
            }
            
            def code(a, b, angle):
            	return b * b
            
            function code(a, b, angle)
            	return Float64(b * b)
            end
            
            function tmp = code(a, b, angle)
            	tmp = b * b;
            end
            
            code[a_, b_, angle_] := N[(b * b), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            b \cdot b
            \end{array}
            
            Derivation
            1. Initial program 78.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-*.f6457.0%

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

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

            Reproduce

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