ab-angle->ABCF A

Percentage Accurate: 79.2% → 79.1%
Time: 14.8s
Alternatives: 12
Speedup: 2.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 12 alternatives:

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

Initial Program: 79.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.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ {\left(a \cdot \sin \left(\sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)} \cdot \frac{-1}{\frac{-180}{angle}}\right)\right)}^{2} + {b}^{2} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (+
  (pow (* a (sin (* (cbrt (* PI (* PI PI))) (/ -1.0 (/ -180.0 angle))))) 2.0)
  (pow b 2.0)))
double code(double a, double b, double angle) {
	return pow((a * sin((cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI)))) * (-1.0 / (-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.cbrt((Math.PI * (Math.PI * Math.PI))) * (-1.0 / (-180.0 / angle))))), 2.0) + Math.pow(b, 2.0);
}
function code(a, b, angle)
	return Float64((Float64(a * sin(Float64(cbrt(Float64(pi * Float64(pi * pi))) * Float64(-1.0 / Float64(-180.0 / angle))))) ^ 2.0) + (b ^ 2.0))
end
code[a_, b_, angle_] := N[(N[Power[N[(a * N[Sin[N[(N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(-1.0 / N[(-180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
{\left(a \cdot \sin \left(\sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)} \cdot \frac{-1}{\frac{-180}{angle}}\right)\right)}^{2} + {b}^{2}
\end{array}
Derivation
  1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 79.2% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI}\left(\right)\right)\right)\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        8. PI-lowering-PI.f6480.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{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
      3. Applied egg-rr80.2%

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{pow.f64}\left(\mathsf{*.f64}\left(a, \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(angle, 180\right), \mathsf{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), 2\right), \left(b \cdot \color{blue}{b}\right)\right) \]
        3. *-lowering-*.f6480.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{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), 2\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right) \]
      5. Applied egg-rr80.2%

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

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

      Alternative 3: 79.2% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto {\left(a \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot {\left(\frac{\frac{1}{\pi}}{angle}\right)}^{-1}\right)}\right)}^{2} + {\left(b \cdot 1\right)}^{2} \]
        4. Step-by-step derivation
          1. unpow-1N/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}{\frac{\frac{1}{\mathsf{PI}\left(\right)}}{angle}}\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
          2. div-invN/A

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

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

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

            \[\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{PI.f64}\left(\right), \mathsf{/.f64}\left(1, angle\right)\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
        5. Applied egg-rr80.2%

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

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

        Alternative 4: 79.2% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

          Alternative 5: 72.7% accurate, 3.4× speedup?

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

            1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 6.7000000000000002e-4 < angle

              1. Initial program 56.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}{1}\right), 2\right)\right) \]
              4. Step-by-step derivation
                1. Simplified60.3%

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

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

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

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

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

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

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

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

                    \[\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{cbrt.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right)\right)\right)\right), 2\right), \mathsf{pow.f64}\left(\mathsf{*.f64}\left(b, 1\right), 2\right)\right) \]
                3. Applied egg-rr60.6%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot \left(a \cdot \left(\sin \left(\frac{angle}{\frac{180}{\sqrt[3]{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}}}\right) \cdot \sin \left(\color{blue}{\frac{angle}{180}} \cdot \sqrt[3]{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right)\right)\right) \]
                5. Applied egg-rr60.4%

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

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

              Alternative 6: 72.7% accurate, 3.4× speedup?

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

                1. Initial program 86.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 6.7000000000000002e-4 < angle

                  1. Initial program 56.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}{1}\right), 2\right)\right) \]
                  4. Step-by-step derivation
                    1. Simplified60.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 7: 71.8% accurate, 18.9× speedup?

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

                    1. Initial program 75.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 7.50000000000000065e153 < a

                      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 8: 71.6% accurate, 18.9× speedup?

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

                        1. Initial program 75.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}{1}\right), 2\right)\right) \]
                        4. Step-by-step derivation
                          1. Simplified76.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 5.40000000000000034e137 < a

                          1. Initial program 96.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}{1}\right), 2\right)\right) \]
                          4. Step-by-step derivation
                            1. Simplified96.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 9: 61.2% accurate, 23.1× speedup?

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

                            1. Initial program 75.7%

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

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

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

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

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

                            if 1.6500000000000001e142 < a

                            1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left({a}^{2} \cdot {angle}^{2}\right) \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\left(\frac{-1}{8100} + \frac{-1}{16200}\right) \cdot \frac{-1}{6}\right)\right) \]
                                6. associate-*l*N/A

                                  \[\leadsto \left({a}^{2} \cdot {angle}^{2}\right) \cdot \left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{8100} + \frac{-1}{16200}\right)\right) \cdot \color{blue}{\frac{-1}{6}}\right) \]
                                7. distribute-rgt-outN/A

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

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

                                  \[\leadsto \left({a}^{2} \cdot \left({angle}^{2} \cdot \left(\frac{-1}{8100} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \cdot \frac{-1}{6} \]
                                10. associate-*l*N/A

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

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

                                  \[\leadsto {a}^{2} \cdot \left({angle}^{2} \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(\frac{-1}{8100} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                              7. Simplified64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 10: 60.4% accurate, 23.1× speedup?

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

                              1. Initial program 75.7%

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

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

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

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

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

                              if 1.49999999999999987e142 < a

                              1. Initial program 96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left({a}^{2} \cdot {angle}^{2}\right) \cdot \left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\left(\frac{-1}{8100} + \frac{-1}{16200}\right) \cdot \frac{-1}{6}\right)\right) \]
                                  6. associate-*l*N/A

                                    \[\leadsto \left({a}^{2} \cdot {angle}^{2}\right) \cdot \left(\left({\mathsf{PI}\left(\right)}^{2} \cdot \left(\frac{-1}{8100} + \frac{-1}{16200}\right)\right) \cdot \color{blue}{\frac{-1}{6}}\right) \]
                                  7. distribute-rgt-outN/A

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

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

                                    \[\leadsto \left({a}^{2} \cdot \left({angle}^{2} \cdot \left(\frac{-1}{8100} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right) \cdot \frac{-1}{6} \]
                                  10. associate-*l*N/A

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

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

                                    \[\leadsto {a}^{2} \cdot \left({angle}^{2} \cdot \left(\frac{-1}{6} \cdot \color{blue}{\left(\frac{-1}{8100} \cdot {\mathsf{PI}\left(\right)}^{2} + \frac{-1}{16200} \cdot {\mathsf{PI}\left(\right)}^{2}\right)}\right)\right) \]
                                7. Simplified64.4%

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

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

                              Alternative 11: 69.9% accurate, 24.5× speedup?

                              \[\begin{array}{l} \\ b \cdot b + \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(angle \cdot \left(a \cdot a\right)\right) \end{array} \]
                              (FPCore (a b angle)
                               :precision binary64
                               (+ (* b b) (* (* 3.08641975308642e-5 (* angle (* PI PI))) (* angle (* a a)))))
                              double code(double a, double b, double angle) {
                              	return (b * b) + ((3.08641975308642e-5 * (angle * (((double) M_PI) * ((double) M_PI)))) * (angle * (a * a)));
                              }
                              
                              public static double code(double a, double b, double angle) {
                              	return (b * b) + ((3.08641975308642e-5 * (angle * (Math.PI * Math.PI))) * (angle * (a * a)));
                              }
                              
                              def code(a, b, angle):
                              	return (b * b) + ((3.08641975308642e-5 * (angle * (math.pi * math.pi))) * (angle * (a * a)))
                              
                              function code(a, b, angle)
                              	return Float64(Float64(b * b) + Float64(Float64(3.08641975308642e-5 * Float64(angle * Float64(pi * pi))) * Float64(angle * Float64(a * a))))
                              end
                              
                              function tmp = code(a, b, angle)
                              	tmp = (b * b) + ((3.08641975308642e-5 * (angle * (pi * pi))) * (angle * (a * a)));
                              end
                              
                              code[a_, b_, angle_] := N[(N[(b * b), $MachinePrecision] + N[(N[(3.08641975308642e-5 * N[(angle * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              b \cdot b + \left(3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot \left(\pi \cdot \pi\right)\right)\right) \cdot \left(angle \cdot \left(a \cdot a\right)\right)
                              \end{array}
                              
                              Derivation
                              1. Initial program 79.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 12: 56.4% 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.0%

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

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

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

                                Reproduce

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