ab-angle->ABCF B

Percentage Accurate: 53.6% → 67.8%
Time: 17.0s
Alternatives: 20
Speedup: 32.2×

Specification

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0
\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 20 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: 53.6% accurate, 1.0× speedup?

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

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

Alternative 1: 67.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \sqrt[3]{{\pi}^{1.5}}\\ \mathbf{if}\;{b}^{2} \leq 0:\\ \;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{t\_0 \cdot t\_0}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (cbrt (pow PI 1.5))))
   (if (<= (pow b 2.0) 0.0)
     (*
      (* (* 2.0 (sin (/ PI (/ 180.0 angle)))) (+ b a))
      (* (cos (/ (* t_0 t_0) (/ 180.0 angle))) (- b a)))
     (* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* PI angle))))))))
double code(double a, double b, double angle) {
	double t_0 = cbrt(pow(((double) M_PI), 1.5));
	double tmp;
	if (pow(b, 2.0) <= 0.0) {
		tmp = ((2.0 * sin((((double) M_PI) / (180.0 / angle)))) * (b + a)) * (cos(((t_0 * t_0) / (180.0 / angle))) * (b - a));
	} else {
		tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.cbrt(Math.pow(Math.PI, 1.5));
	double tmp;
	if (Math.pow(b, 2.0) <= 0.0) {
		tmp = ((2.0 * Math.sin((Math.PI / (180.0 / angle)))) * (b + a)) * (Math.cos(((t_0 * t_0) / (180.0 / angle))) * (b - a));
	} else {
		tmp = (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
	}
	return tmp;
}
function code(a, b, angle)
	t_0 = cbrt((pi ^ 1.5))
	tmp = 0.0
	if ((b ^ 2.0) <= 0.0)
		tmp = Float64(Float64(Float64(2.0 * sin(Float64(pi / Float64(180.0 / angle)))) * Float64(b + a)) * Float64(cos(Float64(Float64(t_0 * t_0) / Float64(180.0 / angle))) * Float64(b - a)));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(pi * angle)))));
	end
	return tmp
end
code[a_, b_, angle_] := Block[{t$95$0 = N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 0.0], N[(N[(N[(2.0 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[N[(N[(t$95$0 * t$95$0), $MachinePrecision] / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \sqrt[3]{{\pi}^{1.5}}\\
\mathbf{if}\;{b}^{2} \leq 0:\\
\;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{t\_0 \cdot t\_0}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 0.0

    1. Initial program 71.7%

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

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

        \[\leadsto \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(b \cdot b - {a}^{2}\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. pow2N/A

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

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

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

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

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

        \[\leadsto \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right) \cdot \color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)} \]
      9. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{sin.f64}\left(\mathsf{/.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(180, angle\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{cbrt.f64}\left(\left({\mathsf{PI}\left(\right)}^{1} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)\right), \left(\sqrt[3]{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}\right)\right), \mathsf{/.f64}\left(180, angle\right)\right)\right), \mathsf{\_.f64}\left(b, a\right)\right)\right) \]
      8. pow1/2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\color{blue}{\sqrt[3]{{\pi}^{1.5}} \cdot \sqrt[3]{{\pi}^{1.5}}}}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right) \]

    if 0.0 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 55.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
      10. difference-of-squaresN/A

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 0:\\ \;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\sqrt[3]{{\pi}^{1.5}} \cdot \sqrt[3]{{\pi}^{1.5}}}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 67.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 5 \cdot 10^{+131}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi + 1}{\frac{180}{angle}} - \frac{angle}{180}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 4.99999999999999995e131

    1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
      10. difference-of-squaresN/A

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

      \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right)} \]

    if 4.99999999999999995e131 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 53.9%

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

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

        \[\leadsto \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(b \cdot b - {a}^{2}\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. pow2N/A

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

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

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

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

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

        \[\leadsto \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right) \cdot \color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)} \]
      9. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 6.1 \cdot 10^{-108}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 6.10000000000000007e-108

    1. Initial program 59.9%

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

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

        \[\leadsto \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(b \cdot b - {a}^{2}\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. pow2N/A

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

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

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

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

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

        \[\leadsto \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right) \cdot \color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)} \]
      9. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)}\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(b - a\right)\right) \]

    if 6.10000000000000007e-108 < b

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
      10. difference-of-squaresN/A

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

      \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification72.9%

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

Alternative 4: 66.3% accurate, 3.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.7 \cdot 10^{-134}:\\ \;\;\;\;\left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= b 2.7e-134)
   (* (* (* 2.0 (sin (/ PI (/ 180.0 angle)))) (+ b a)) (- b a))
   (* (- b a) (* (+ b a) (sin (* 0.011111111111111112 (* PI angle)))))))
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 2.7e-134) {
		tmp = ((2.0 * sin((((double) M_PI) / (180.0 / angle)))) * (b + a)) * (b - a);
	} else {
		tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 2.7e-134) {
		tmp = ((2.0 * Math.sin((Math.PI / (180.0 / angle)))) * (b + a)) * (b - a);
	} else {
		tmp = (b - a) * ((b + a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if b <= 2.7e-134:
		tmp = ((2.0 * math.sin((math.pi / (180.0 / angle)))) * (b + a)) * (b - a)
	else:
		tmp = (b - a) * ((b + a) * math.sin((0.011111111111111112 * (math.pi * angle))))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (b <= 2.7e-134)
		tmp = Float64(Float64(Float64(2.0 * sin(Float64(pi / Float64(180.0 / angle)))) * Float64(b + a)) * Float64(b - a));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(0.011111111111111112 * Float64(pi * angle)))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 2.7e-134)
		tmp = ((2.0 * sin((pi / (180.0 / angle)))) * (b + a)) * (b - a);
	else
		tmp = (b - a) * ((b + a) * sin((0.011111111111111112 * (pi * angle))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[b, 2.7e-134], N[(N[(N[(2.0 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.6999999999999998e-134

    1. Initial program 60.6%

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

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

        \[\leadsto \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(b \cdot b - {a}^{2}\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      3. pow2N/A

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

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

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

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

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

        \[\leadsto \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right) \cdot \color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot \cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)} \]
      9. difference-of-squaresN/A

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{1} \cdot \left(b - a\right)\right) \]

      if 2.6999999999999998e-134 < b

      1. Initial program 57.2%

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
        10. difference-of-squaresN/A

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

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

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

    Alternative 5: 53.8% accurate, 3.6× speedup?

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

      1. Initial program 63.6%

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
        10. difference-of-squaresN/A

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

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

        \[\leadsto \mathsf{*.f64}\left(\color{blue}{b}, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      6. Step-by-step derivation
        1. Simplified58.5%

          \[\leadsto \color{blue}{b} \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right) \]

        if 1.8499999999999999e-94 < a

        1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
          10. difference-of-squaresN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          3. PI-lowering-PI.f6467.3%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        7. Simplified67.3%

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

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

      Alternative 6: 67.8% accurate, 3.7× speedup?

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
        10. difference-of-squaresN/A

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

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right)} \]
      5. Final simplification73.1%

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right) \]
      6. Add Preprocessing

      Alternative 7: 67.5% accurate, 3.7× speedup?

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
        10. difference-of-squaresN/A

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

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

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

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

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI}\left(\right), \frac{1}{90}\right), angle\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        6. PI-lowering-PI.f6472.3%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{90}\right), angle\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
      6. Applied egg-rr72.3%

        \[\leadsto \left(b - a\right) \cdot \left(\sin \color{blue}{\left(\left(\pi \cdot 0.011111111111111112\right) \cdot angle\right)} \cdot \left(b + a\right)\right) \]
      7. Final simplification72.3%

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \]
      8. Add Preprocessing

      Alternative 8: 63.0% accurate, 14.0× speedup?

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

        1. Initial program 60.2%

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
          10. difference-of-squaresN/A

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

          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right)} \]
        5. Step-by-step derivation
          1. flip--N/A

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{1}{\frac{b \cdot b - a \cdot a}{b + a}}\right)\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          5. flip--N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \left(b - a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          7. --lowering--.f6472.1%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(b, a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        6. Applied egg-rr72.1%

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(b, a\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{a} + b\right)\right)\right)\right)\right) \]
          5. +-lowering-+.f6467.1%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(b, a\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{+.f64}\left(a, \color{blue}{b}\right)\right)\right)\right)\right) \]
        9. Simplified67.1%

          \[\leadsto \frac{1}{\frac{1}{b - a}} \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)} \]

        if 1.85e-84 < b

        1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
          10. difference-of-squaresN/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4374000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{3}\right)\right), \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          8. cube-multN/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4374000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right), \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          9. unpow2N/A

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4374000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{PI}\left(\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          17. PI-lowering-PI.f6473.3%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4374000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        7. Simplified73.3%

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.85 \cdot 10^{-84}:\\ \;\;\;\;\frac{1}{\frac{1}{b - a}} \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \left(\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right) + \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 62.3% accurate, 15.0× speedup?

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

        1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
          10. difference-of-squaresN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          3. PI-lowering-PI.f6465.7%

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

          \[\leadsto \left(b - a\right) \cdot \left(\color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \cdot \left(b + a\right)\right) \]

        if 2.00000000000000009e264 < b

        1. Initial program 62.5%

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
          3. *-lowering-*.f6475.0%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
        5. Simplified75.0%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{34992000}, \mathsf{*.f64}\left(angle, angle\right)\right), \left({\mathsf{PI}\left(\right)}^{3}\right)\right), \left(\frac{1}{180} \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right), 1\right) \]
            8. cube-multN/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{34992000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{PI}\left(\right), \frac{1}{180}\right)\right)\right)\right), 1\right) \]
            18. PI-lowering-PI.f64100.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{*.f64}\left(angle, \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{34992000}, \mathsf{*.f64}\left(angle, angle\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{PI.f64}\left(\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \frac{1}{180}\right)\right)\right)\right), 1\right) \]
          4. Simplified100.0%

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

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

        Alternative 10: 54.5% accurate, 23.3× speedup?

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

          1. Initial program 60.9%

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

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            7. unpow2N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
            12. *-lowering-*.f6458.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
          5. Simplified58.2%

            \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)} \]

          if 4.29999999999999998e117 < b

          1. Initial program 51.7%

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
            3. *-lowering-*.f6454.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
          5. Simplified54.2%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
            7. *-lowering-*.f6449.0%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
          8. Simplified49.0%

            \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
          9. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(b, \mathsf{PI}\left(\right)\right)\right), b\right) \]
            9. PI-lowering-PI.f6473.6%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right)\right), b\right) \]
          10. Applied egg-rr73.6%

            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b \cdot \pi\right)\right) \cdot b} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification60.7%

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

        Alternative 11: 54.9% accurate, 23.3× speedup?

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

          1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
            10. difference-of-squaresN/A

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

            \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b + a\right)\right)} \]
          5. Step-by-step derivation
            1. flip--N/A

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \left(\frac{1}{\frac{b \cdot b - a \cdot a}{b + a}}\right)\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
            5. flip--N/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(1, \mathsf{/.f64}\left(1, \mathsf{\_.f64}\left(b, a\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right), \frac{1}{90}\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          6. Applied egg-rr70.8%

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
            3. difference-of-squaresN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot angle\right) \]
            4. unpow2N/A

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right), angle\right)\right) \]
            16. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(a \cdot a\right)\right), angle\right)\right) \]
            17. *-lowering-*.f6458.4%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right), angle\right)\right) \]
          9. Simplified58.4%

            \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \pi\right) \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)} \]

          if 8e153 < b

          1. Initial program 45.8%

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
            3. *-lowering-*.f6452.3%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
          5. Simplified52.3%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
            7. *-lowering-*.f6443.0%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
          8. Simplified43.0%

            \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
          9. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(b, \mathsf{PI}\left(\right)\right)\right), b\right) \]
            9. PI-lowering-PI.f6473.3%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right)\right), b\right) \]
          10. Applied egg-rr73.3%

            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b \cdot \pi\right)\right) \cdot b} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification60.4%

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

        Alternative 12: 46.2% accurate, 29.9× speedup?

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

          1. Initial program 60.1%

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
            3. *-lowering-*.f6446.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
          5. Simplified46.0%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
            7. *-lowering-*.f6442.2%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
          8. Simplified42.2%

            \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
          9. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(b, \mathsf{PI}\left(\right)\right)\right), b\right) \]
            9. PI-lowering-PI.f6447.2%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right)\right), b\right) \]
          10. Applied egg-rr47.2%

            \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b \cdot \pi\right)\right) \cdot b} \]

          if 2.09999999999999986e92 < a

          1. Initial program 55.2%

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

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            7. unpow2N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
            12. *-lowering-*.f6457.5%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
          5. Simplified57.5%

            \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)} \]
          6. Taylor expanded in b around 0

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
            7. PI-lowering-PI.f6463.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Simplified63.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right)\right), \frac{-1}{90}\right) \]
          10. Applied egg-rr73.0%

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

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

        Alternative 13: 46.1% accurate, 29.9× speedup?

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

          1. Initial program 60.1%

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
            3. *-lowering-*.f6446.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
          5. Simplified46.0%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
            7. *-lowering-*.f6442.2%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
          8. Simplified42.2%

            \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
          9. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
            8. *-lowering-*.f6447.2%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
          10. Applied egg-rr47.2%

            \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]

          if 2.29999999999999998e92 < a

          1. Initial program 55.2%

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

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            7. unpow2N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
            12. *-lowering-*.f6457.5%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
          5. Simplified57.5%

            \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)} \]
          6. Taylor expanded in b around 0

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
            7. PI-lowering-PI.f6463.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Simplified63.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right)\right), \frac{-1}{90}\right) \]
          10. Applied egg-rr73.0%

            \[\leadsto \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \cdot -0.011111111111111112} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 14: 46.1% accurate, 29.9× speedup?

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

          1. Initial program 60.1%

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
            3. *-lowering-*.f6446.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
          5. Simplified46.0%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
            7. *-lowering-*.f6442.2%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
          8. Simplified42.2%

            \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
          9. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
            8. *-lowering-*.f6447.2%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
          10. Applied egg-rr47.2%

            \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]

          if 6.7999999999999996e92 < a

          1. Initial program 55.2%

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

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            7. unpow2N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
            12. *-lowering-*.f6457.5%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
          5. Simplified57.5%

            \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)} \]
          6. Taylor expanded in b around 0

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
            7. PI-lowering-PI.f6463.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Simplified63.0%

            \[\leadsto \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)} \]
          9. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(a, \frac{-1}{90}\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), angle\right)\right)\right) \]
          10. Applied egg-rr73.0%

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

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

        Alternative 15: 43.7% accurate, 29.9× speedup?

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

          1. Initial program 60.1%

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(b \cdot b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
            3. *-lowering-*.f6446.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
          5. Simplified46.0%

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

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
            7. *-lowering-*.f6442.2%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
          8. Simplified42.2%

            \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
          9. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
            8. *-lowering-*.f6447.2%

              \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
          10. Applied egg-rr47.2%

            \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]

          if 4.59999999999999982e91 < a

          1. Initial program 55.2%

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

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            7. unpow2N/A

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
            12. *-lowering-*.f6457.5%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
          5. Simplified57.5%

            \[\leadsto \color{blue}{\left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)} \]
          6. Taylor expanded in b around 0

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

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

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

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

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

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

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
            7. PI-lowering-PI.f6463.0%

              \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{90}, \mathsf{*.f64}\left(a, a\right)\right), \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right) \]
          8. Simplified63.0%

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

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

        Alternative 16: 62.8% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
          10. difference-of-squaresN/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI}\left(\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
          3. PI-lowering-PI.f6465.6%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{PI.f64}\left(\right)\right)\right), \mathsf{+.f64}\left(b, a\right)\right)\right) \]
        7. Simplified65.6%

          \[\leadsto \left(b - a\right) \cdot \left(\color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \cdot \left(b + a\right)\right) \]
        8. Final simplification65.6%

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right) \]
        9. Add Preprocessing

        Alternative 17: 62.8% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\cos \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right) \cdot \left(2 \cdot \sin \left(\frac{\mathsf{PI}\left(\right) \cdot angle}{180}\right)\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
          10. difference-of-squaresN/A

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right)\right)}\right) \]
        6. Step-by-step derivation
          1. associate-*r*N/A

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(\color{blue}{a} + b\right)\right)\right)\right) \]
          6. +-lowering-+.f6465.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{1}{90}, angle\right), \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{+.f64}\left(a, \color{blue}{b}\right)\right)\right)\right) \]
        7. Simplified65.5%

          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right)} \]
        8. Final simplification65.5%

          \[\leadsto \left(b - a\right) \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right) \]
        9. Add Preprocessing

        Alternative 18: 62.8% accurate, 32.2× speedup?

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

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

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\left({b}^{2}\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          7. unpow2N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \left({a}^{2}\right)\right)\right), \left(\frac{1}{90} \cdot angle\right)\right) \]
          9. unpow2N/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \left(angle \cdot \color{blue}{\frac{1}{90}}\right)\right) \]
          12. *-lowering-*.f6455.1%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(a, a\right)\right)\right), \mathsf{*.f64}\left(angle, \color{blue}{\frac{1}{90}}\right)\right) \]
        5. Simplified55.1%

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\left(\left(b \cdot b - a \cdot a\right) \cdot \left(angle \cdot \frac{1}{90}\right)\right), \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          4. difference-of-squaresN/A

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(angle, \frac{1}{90}\right)\right)\right), \mathsf{PI}\left(\right)\right) \]
          11. PI-lowering-PI.f6465.5%

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(b, a\right), \mathsf{*.f64}\left(\mathsf{\_.f64}\left(b, a\right), \mathsf{*.f64}\left(angle, \frac{1}{90}\right)\right)\right), \mathsf{PI.f64}\left(\right)\right) \]
        7. Applied egg-rr65.5%

          \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right) \cdot \pi} \]
        8. Final simplification65.5%

          \[\leadsto \pi \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right) \]
        9. Add Preprocessing

        Alternative 19: 39.1% accurate, 46.6× speedup?

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
        5. Simplified40.5%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
          7. *-lowering-*.f6437.9%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
        8. Simplified37.9%

          \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
        9. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \left(b \cdot angle\right)\right)\right) \]
          8. *-lowering-*.f6442.9%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(\mathsf{*.f64}\left(b, \mathsf{PI.f64}\left(\right)\right), \mathsf{*.f64}\left(b, \color{blue}{angle}\right)\right)\right) \]
        10. Applied egg-rr42.9%

          \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]
        11. Add Preprocessing

        Alternative 20: 35.7% accurate, 46.6× speedup?

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(b, b\right)\right), \mathsf{sin.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{/.f64}\left(angle, 180\right)\right)\right)\right) \]
        5. Simplified40.5%

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

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

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

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

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

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

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

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \left(b \cdot \color{blue}{b}\right)\right)\right)\right) \]
          7. *-lowering-*.f6437.9%

            \[\leadsto \mathsf{*.f64}\left(\frac{1}{90}, \mathsf{*.f64}\left(angle, \mathsf{*.f64}\left(\mathsf{PI.f64}\left(\right), \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right) \]
        8. Simplified37.9%

          \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
        9. Add Preprocessing

        Reproduce

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