ab-angle->ABCF A

Percentage Accurate: 79.2% → 79.2%
Time: 15.9s
Alternatives: 19
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 19 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.2% 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, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 79.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle}{180}\\ {\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 (* PI (/ angle 180.0))))
   (+ (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 = ((double) M_PI) * (angle / 180.0);
	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 = Math.PI * (angle / 180.0);
	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 = math.pi * (angle / 180.0)
	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(pi * Float64(angle / 180.0))
	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 = pi * (angle / 180.0);
	tmp = ((a * sin(t_0)) ^ 2.0) + ((b * cos(t_0)) ^ 2.0);
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(N[Power[N[(a * N[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 := \pi \cdot \frac{angle}{180}\\
{\left(a \cdot \sin t\_0\right)}^{2} + {\left(b \cdot \cos t\_0\right)}^{2}
\end{array}
\end{array}
Derivation
  1. Initial program 79.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. Final simplification79.9%

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

Alternative 6: 79.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.1% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 64.9% accurate, 1.9× speedup?

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

      1. Initial program 80.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 a around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.09999999999999971e-93 < a

      1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 79.0% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 79.1% accurate, 2.0× speedup?

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

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

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

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

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

        \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
      12. 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{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
      13. PI-lowering-PI.f6473.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{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
    5. Simplified73.5%

      \[\leadsto {\left(a \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)}^{2} + {\left(b \cdot \color{blue}{\left(1 + \left(angle \cdot angle\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot -1.54320987654321 \cdot 10^{-5}\right)\right)}\right)}^{2} \]
    6. 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), \color{blue}{\left({b}^{2}\right)}\right) \]
    7. Step-by-step derivation
      1. unpow2N/A

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

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

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

    Alternative 11: 64.9% accurate, 3.1× speedup?

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

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

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

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

      if 1.35e-95 < a

      1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 64.8% accurate, 3.1× speedup?

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

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

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

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

      if 1.15999999999999998e-93 < a

      1. Initial program 79.4%

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

        \[\leadsto \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}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right), 2\right)\right) \]
      4. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
        12. 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{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
        13. PI-lowering-PI.f6477.2%

          \[\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{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
      5. Simplified77.2%

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\left(\left(\left({a}^{2} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{1}{32400}\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(\color{blue}{b}, \mathsf{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
        3. associate-*l*N/A

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left({a}^{2} \cdot {angle}^{2}\right), \left({\mathsf{PI}\left(\right)}^{2} \cdot \frac{1}{32400}\right)\right), \mathsf{pow.f64}\left(\color{blue}{\mathsf{*.f64}\left(b, \mathsf{+.f64}\left(1, \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}{64800}\right)\right)\right)\right)}, 2\right)\right) \]
        5. unpow2N/A

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, angle\right)\right)\right), \mathsf{*.f64}\left(\left({\mathsf{PI}\left(\right)}^{2}\right), \frac{1}{32400}\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \color{blue}{\mathsf{+.f64}\left(1, \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}{64800}\right)\right)\right)}\right), 2\right)\right) \]
        12. unpow2N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, angle\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right), \frac{1}{32400}\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
        15. PI-lowering-PI.f6471.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(angle, angle\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right), \frac{1}{32400}\right)\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, \mathsf{+.f64}\left(1, \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}{64800}\right)\right)\right)\right), 2\right)\right) \]
      8. Simplified71.0%

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

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

    Alternative 13: 55.6% accurate, 14.9× speedup?

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

      1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.50000000000000014e90 < b

      1. Initial program 95.6%

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

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

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

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

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

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

    Alternative 14: 63.9% accurate, 15.4× speedup?

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

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

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

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

      if 1.55e-96 < a < 5.39999999999999964e179

      1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.39999999999999964e179 < a

      1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \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(\frac{1}{32400}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
        17. unpow2N/A

          \[\leadsto \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(\frac{1}{32400}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
        18. *-lowering-*.f6476.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 62.6% accurate, 23.1× speedup?

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

      1. Initial program 77.6%

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

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

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

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

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

      if 2.06000000000000001e127 < a

      1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \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(\frac{1}{32400}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
        17. unpow2N/A

          \[\leadsto \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(\frac{1}{32400}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
        18. *-lowering-*.f6469.2%

          \[\leadsto \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(\frac{1}{32400}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
      12. Simplified69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 16: 61.5% accurate, 23.1× speedup?

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

      1. Initial program 77.6%

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

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

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

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

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

      if 8.2000000000000001e126 < a

      1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \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(\frac{1}{32400}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
        17. unpow2N/A

          \[\leadsto \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(\frac{1}{32400}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
        18. *-lowering-*.f6469.2%

          \[\leadsto \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(\frac{1}{32400}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
      12. Simplified69.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 17: 60.4% accurate, 23.1× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 9 \cdot 10^{+123}:\\ \;\;\;\;b \cdot b\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot 3.08641975308642 \cdot 10^{-5}\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= a 9e+123)
       (* b b)
       (* (* a a) (* (* angle angle) (* PI (* PI 3.08641975308642e-5))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (a <= 9e+123) {
    		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 <= 9e+123) {
    		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 <= 9e+123:
    		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 <= 9e+123)
    		tmp = Float64(b * b);
    	else
    		tmp = Float64(Float64(a * 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 <= 9e+123)
    		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, 9e+123], N[(b * b), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * 3.08641975308642e-5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a \leq 9 \cdot 10^{+123}:\\
    \;\;\;\;b \cdot b\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(a \cdot a\right) \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \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 < 8.99999999999999965e123

      1. Initial program 77.6%

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

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

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

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

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

      if 8.99999999999999965e123 < a

      1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \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(\frac{1}{32400}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
        17. unpow2N/A

          \[\leadsto \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(\frac{1}{32400}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
        18. *-lowering-*.f6469.2%

          \[\leadsto \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(\frac{1}{32400}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
      12. Simplified69.2%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 18: 60.4% accurate, 23.1× speedup?

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

      1. Initial program 77.6%

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

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

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

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

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

      if 5.49999999999999977e124 < a

      1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\left(angle \cdot angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\color{blue}{\frac{1}{32400}} \cdot \left({a}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \]
        8. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\left(\frac{1}{32400} \cdot {a}^{2}\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left({\mathsf{PI}\left(\right)}^{2} \cdot \color{blue}{\left(\frac{1}{32400} \cdot {a}^{2}\right)}\right)\right) \]
        10. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\frac{1}{32400}} \cdot {a}^{2}\right)\right)\right) \]
        11. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {a}^{2}\right)\right)}\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{32400} \cdot {a}^{2}\right)\right)}\right)\right) \]
        13. PI-lowering-PI.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\frac{1}{32400} \cdot {a}^{2}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \color{blue}{\left(\frac{1}{32400} \cdot {a}^{2}\right)}\right)\right)\right) \]
        15. PI-lowering-PI.f64N/A

          \[\leadsto \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(\color{blue}{\frac{1}{32400}} \cdot {a}^{2}\right)\right)\right)\right) \]
        16. *-lowering-*.f64N/A

          \[\leadsto \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(\frac{1}{32400}, \color{blue}{\left({a}^{2}\right)}\right)\right)\right)\right) \]
        17. unpow2N/A

          \[\leadsto \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(\frac{1}{32400}, \left(a \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
        18. *-lowering-*.f6469.2%

          \[\leadsto \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(\frac{1}{32400}, \mathsf{*.f64}\left(a, \color{blue}{a}\right)\right)\right)\right)\right) \]
      12. Simplified69.2%

        \[\leadsto \color{blue}{\left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \left(3.08641975308642 \cdot 10^{-5} \cdot \left(a \cdot a\right)\right)\right)\right)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 19: 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 79.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-*.f6458.5%

        \[\leadsto \mathsf{*.f64}\left(b, \color{blue}{b}\right) \]
    5. Simplified58.5%

      \[\leadsto \color{blue}{b \cdot b} \]
    6. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2024150 
    (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)))