ab-angle->ABCF B

Percentage Accurate: 54.4% → 66.5%
Time: 45.9s
Alternatives: 13
Speedup: 5.5×

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 13 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: 54.4% 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: 66.5% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_0 := \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
t_2 := t_0 \cdot t_1\\
t_3 := angle \cdot \left(\pi \cdot -0.005555555555555556\right)\\
t_4 := \cos t_3\\
\mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+155}:\\
\;\;\;\;2 \cdot \left(t_4 \cdot t_2\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+44}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \left(t_4 \cdot \sin t_3\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{-34}:\\
\;\;\;\;2 \cdot \left(t_2 \cdot \cos \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t_0\right)}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle 180) < -1.00000000000000001e155

    1. Initial program 31.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. Step-by-step derivation
      1. associate-*l*31.9%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*31.9%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out31.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg31.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-131.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*31.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/34.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/36.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*36.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval36.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{\color{blue}{-180}} \cdot angle\right)\right)\right) \]
    3. Simplified36.5%

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow236.5%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares39.9%

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(\cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. *-commutative29.1%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
      2. associate-*r*43.1%

        \[\leadsto 2 \cdot \left(\left(\sin \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      3. +-commutative43.1%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      4. *-commutative43.1%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      5. +-commutative43.1%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      6. *-commutative43.1%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \]
      7. *-commutative43.1%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)}\right) \]
      8. *-commutative43.1%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot -0.005555555555555556\right)\right) \]
      9. associate-*r*47.2%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \color{blue}{\left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)}\right) \]
    9. Simplified47.2%

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

    if -1.00000000000000001e155 < (/.f64 angle 180) < -2.0000000000000002e44

    1. Initial program 22.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. Step-by-step derivation
      1. associate-*l*22.7%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*22.7%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out22.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg22.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-122.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*31.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/31.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/30.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*30.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval30.1%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow230.1%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares30.1%

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def21.6%

        \[\leadsto 2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
      2. expm1-log1p46.8%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} \]
      3. associate-*r*46.8%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)} \]
      4. *-commutative46.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)} \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right) \]
      5. +-commutative46.8%

        \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right) \]
      6. *-commutative46.8%

        \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(\sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)}\right) \]
    9. Simplified46.8%

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

    if -2.0000000000000002e44 < (/.f64 angle 180) < -5.0000000000000003e-34

    1. Initial program 69.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. Step-by-step derivation
      1. associate-*l*69.5%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*69.5%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg69.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out69.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg69.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-169.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*68.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/63.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/64.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*64.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval64.7%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow264.7%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares69.4%

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(\cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutative74.0%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
      2. *-commutative74.0%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      3. associate-*r*69.2%

        \[\leadsto 2 \cdot \left(\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      4. *-commutative69.2%

        \[\leadsto 2 \cdot \left(\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\color{blue}{\left(angle \cdot 0.005555555555555556\right)} \cdot \pi\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      5. *-commutative69.2%

        \[\leadsto 2 \cdot \left(\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      6. associate-*r*75.1%

        \[\leadsto 2 \cdot \left(\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right) \]
      7. *-commutative75.1%

        \[\leadsto 2 \cdot \left(\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\color{blue}{\left(angle \cdot -0.005555555555555556\right)} \cdot \pi\right)\right) \]
      8. *-commutative75.1%

        \[\leadsto 2 \cdot \left(\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)}\right) \]
      9. *-commutative75.1%

        \[\leadsto 2 \cdot \left(\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\pi \cdot \color{blue}{\left(-0.005555555555555556 \cdot angle\right)}\right)\right) \]
    8. Simplified75.1%

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

    if -5.0000000000000003e-34 < (/.f64 angle 180)

    1. Initial program 65.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. Step-by-step derivation
      1. associate-*l*65.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*65.3%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-165.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*66.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/65.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval65.3%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow265.3%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares68.1%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-cube-cbrt67.8%

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

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

      \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}} \]
    8. Taylor expanded in angle around 0 79.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+155}:\\ \;\;\;\;2 \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+44}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{-34}:\\ \;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}\right)}^{3}\\ \end{array} \]

Alternative 2: 67.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_0 := \sqrt[3]{{\pi}^{3}}\\
\mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+109}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot t_0\right) \cdot \cos \left(angle \cdot \left(-0.005555555555555556 \cdot t_0\right)\right)\right)\right)}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b 2) < 1.99999999999999996e109

    1. Initial program 64.0%

      \[\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. Step-by-step derivation
      1. associate-*l*64.0%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*64.0%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg64.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out64.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg64.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-164.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*63.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/63.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/63.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*63.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval63.2%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow263.2%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares63.2%

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

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

        \[\leadsto 2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)\right)} \]
      2. expm1-udef32.7%

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

      \[\leadsto 2 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def55.6%

        \[\leadsto 2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
      2. expm1-log1p70.4%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} \]
      3. +-commutative70.4%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right) \]
      4. associate-*r*70.4%

        \[\leadsto 2 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \color{blue}{\left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right)}\right)\right)\right) \]
      5. *-commutative70.4%

        \[\leadsto 2 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \color{blue}{\left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right)\right) \]
    9. Simplified70.4%

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

    if 1.99999999999999996e109 < (pow.f64 b 2)

    1. Initial program 49.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. Step-by-step derivation
      1. associate-*l*49.4%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*49.4%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg49.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out49.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg49.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-149.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*53.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/53.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/52.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*52.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval52.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{\color{blue}{-180}} \cdot angle\right)\right)\right) \]
    3. Simplified52.4%

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow252.4%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares59.5%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-cube-cbrt59.3%

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

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

      \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}} \]
    8. Step-by-step derivation
      1. add-cbrt-cube73.2%

        \[\leadsto 2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3} \]
      2. pow373.2%

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

      \[\leadsto 2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3} \]
    10. Step-by-step derivation
      1. add-cbrt-cube73.2%

        \[\leadsto 2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3} \]
      2. pow373.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+109}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \cos \left(angle \cdot \left(-0.005555555555555556 \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\right)}\right)}^{3}\\ \end{array} \]

Alternative 3: 66.3% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot t_0\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < -1e18

    1. Initial program 29.0%

      \[\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. Step-by-step derivation
      1. *-commutative29.0%

        \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*l*29.0%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. associate-*l*29.0%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    3. Simplified29.0%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. unpow232.4%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares34.1%

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

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

        \[\leadsto 2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3} \]
      2. pow329.5%

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

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

    if -1e18 < (/.f64 angle 180)

    1. Initial program 66.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. Step-by-step derivation
      1. associate-*l*66.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*66.8%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg66.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out66.8%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-166.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*67.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/67.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/66.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*66.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval66.7%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow266.7%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares69.8%

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}} \]
    8. Step-by-step derivation
      1. add-cbrt-cube81.8%

        \[\leadsto 2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3} \]
      2. pow381.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+18}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\sqrt[3]{{\pi}^{3}} \cdot \frac{angle}{180}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}\\ \end{array} \]

Alternative 4: 67.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < 2.00000000000000006e40

    1. Initial program 63.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. Step-by-step derivation
      1. associate-*l*63.9%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*63.9%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out63.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg63.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-163.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*64.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/64.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/64.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*64.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval64.7%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow264.7%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares68.2%

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

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

        \[\leadsto 2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)\right)} \]
      2. expm1-udef33.8%

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

      \[\leadsto 2 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def55.8%

        \[\leadsto 2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
      2. expm1-log1p79.8%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} \]
      3. +-commutative79.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right) \]
      4. associate-*r*79.2%

        \[\leadsto 2 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \color{blue}{\left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right)}\right)\right)\right) \]
      5. *-commutative79.2%

        \[\leadsto 2 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \color{blue}{\left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right)\right) \]
    9. Simplified79.2%

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

    if 2.00000000000000006e40 < (/.f64 angle 180)

    1. Initial program 34.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. Step-by-step derivation
      1. associate-*l*34.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*34.3%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out34.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg34.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-134.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*38.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/36.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/34.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*34.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval34.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{\color{blue}{-180}} \cdot angle\right)\right)\right) \]
    3. Simplified34.5%

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow234.5%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares34.5%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-sqr-sqrt41.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+40}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(angle \cdot \frac{{\left(\sqrt{\pi}\right)}^{2}}{-180}\right)\right)\right)\\ \end{array} \]

Alternative 5: 66.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-45}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < 4.99999999999999976e-45

    1. Initial program 62.0%

      \[\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. Step-by-step derivation
      1. associate-*l*62.0%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*62.0%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg62.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out62.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg62.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-162.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*62.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/62.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/63.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*63.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval63.1%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow263.1%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares66.4%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-cube-cbrt66.1%

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

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

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

    if 4.99999999999999976e-45 < (/.f64 angle 180)

    1. Initial program 48.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. Step-by-step derivation
      1. associate-*l*48.4%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*48.3%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out48.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg48.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-148.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*51.0%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/49.5%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/48.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*48.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval48.2%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow248.2%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares49.6%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-sqr-sqrt54.4%

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

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

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

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

Alternative 6: 66.8% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < -2.0000000000000002e44

    1. Initial program 27.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. Step-by-step derivation
      1. *-commutative27.9%

        \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*l*27.9%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. associate-*l*27.9%

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. unpow233.7%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares35.7%

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

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

        \[\leadsto 2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3} \]
      2. pow330.9%

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

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

    if -2.0000000000000002e44 < (/.f64 angle 180)

    1. Initial program 65.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. Step-by-step derivation
      1. associate-*l*65.8%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*65.8%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg65.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out65.8%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-165.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*66.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/65.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/65.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*65.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval65.2%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow265.2%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares68.2%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-cube-cbrt67.9%

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

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

      \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}} \]
    8. Taylor expanded in angle around inf 79.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+44}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\sqrt[3]{{\pi}^{3}} \cdot \frac{angle}{180}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)}\right)}^{3}\\ \end{array} \]

Alternative 7: 66.2% accurate, 1.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t_0\right)}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < -5.0000000000000003e-34

    1. Initial program 40.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. Step-by-step derivation
      1. associate-*l*40.1%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*40.1%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out40.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg40.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-140.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*42.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/42.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/42.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*42.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval42.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{\color{blue}{-180}} \cdot angle\right)\right)\right) \]
    3. Simplified42.8%

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow242.8%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares45.5%

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\left(\cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    8. Step-by-step derivation
      1. *-commutative37.4%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)} \]
      2. associate-*r*46.0%

        \[\leadsto 2 \cdot \left(\left(\sin \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      3. +-commutative46.0%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      4. *-commutative46.0%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      5. +-commutative46.0%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      6. *-commutative46.0%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \]
      7. *-commutative46.0%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)}\right) \]
      8. *-commutative46.0%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot -0.005555555555555556\right)\right) \]
      9. associate-*r*47.8%

        \[\leadsto 2 \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \cos \color{blue}{\left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)}\right) \]
    9. Simplified47.8%

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

    if -5.0000000000000003e-34 < (/.f64 angle 180)

    1. Initial program 65.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. Step-by-step derivation
      1. associate-*l*65.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*65.3%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-165.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*66.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/65.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval65.3%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow265.3%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares68.1%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-cube-cbrt67.8%

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

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

      \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}} \]
    8. Taylor expanded in angle around 0 79.7%

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

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

Alternative 8: 67.3% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < 4e13

    1. Initial program 64.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. Step-by-step derivation
      1. associate-*l*64.4%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*64.4%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg64.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out64.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg64.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-164.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*65.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/65.1%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval65.3%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow265.3%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares68.9%

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

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

        \[\leadsto 2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)\right)} \]
      2. expm1-udef33.6%

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

      \[\leadsto 2 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} - 1\right)} \]
    8. Step-by-step derivation
      1. expm1-def56.0%

        \[\leadsto 2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)\right)} \]
      2. expm1-log1p80.7%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right)} \]
      3. +-commutative80.7%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)\right) \]
      4. associate-*r*80.0%

        \[\leadsto 2 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \color{blue}{\left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right)}\right)\right)\right) \]
      5. *-commutative80.0%

        \[\leadsto 2 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \color{blue}{\left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right)\right) \]
    9. Simplified80.0%

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

    if 4e13 < (/.f64 angle 180)

    1. Initial program 35.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. Step-by-step derivation
      1. associate-*l*35.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*35.3%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out35.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg35.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-135.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*38.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/36.9%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/35.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*35.2%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval35.2%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow235.2%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares35.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 40000000000000:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]

Alternative 9: 66.2% accurate, 1.5× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}\right)}^{3}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < -5.0000000000000003e-34

    1. Initial program 40.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. Step-by-step derivation
      1. *-commutative40.1%

        \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*l*40.1%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. associate-*l*40.1%

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. unpow242.8%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares45.5%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      2. expm1-udef18.5%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def24.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. expm1-log1p46.6%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)} \]
      3. *-commutative46.6%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)} \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \]
      4. +-commutative46.6%

        \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \]
      5. associate-*l*46.6%

        \[\leadsto \left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)} \]
    9. Simplified46.6%

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

    if -5.0000000000000003e-34 < (/.f64 angle 180)

    1. Initial program 65.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. Step-by-step derivation
      1. associate-*l*65.3%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*65.3%

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

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-165.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*66.4%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/65.8%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*65.3%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval65.3%

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

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow265.3%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares68.1%

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Step-by-step derivation
      1. add-cube-cbrt67.8%

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

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

      \[\leadsto 2 \cdot \color{blue}{{\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right)\right)}\right)}^{3}} \]
    8. Taylor expanded in angle around 0 79.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-34}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\pi \cdot \left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\sqrt[3]{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}\right)}^{3}\\ \end{array} \]

Alternative 10: 58.5% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
\mathbf{if}\;a \leq 1.15 \cdot 10^{+232}:\\
\;\;\;\;t_0 \cdot \sin \left(\pi \cdot \left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.15000000000000003e232

    1. Initial program 58.0%

      \[\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. Step-by-step derivation
      1. *-commutative58.0%

        \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*l*58.0%

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. associate-*l*58.0%

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    3. Simplified58.0%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. unpow258.7%

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares61.7%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
      2. expm1-udef30.0%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def44.7%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
      2. expm1-log1p61.8%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)} \]
      3. *-commutative61.8%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)} \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \]
      4. +-commutative61.8%

        \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \]
      5. associate-*l*61.8%

        \[\leadsto \left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)} \]
    9. Simplified61.8%

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

    if 1.15000000000000003e232 < a

    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. Step-by-step derivation
      1. associate-*l*63.6%

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. associate-*l*63.6%

        \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
      3. cos-neg63.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(-\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      4. distribute-rgt-neg-out63.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\pi \cdot \left(-\frac{angle}{180}\right)\right)}\right)\right) \]
      5. distribute-frac-neg63.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-angle}{180}}\right)\right)\right) \]
      6. neg-mul-163.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{\color{blue}{-1 \cdot angle}}{180}\right)\right)\right) \]
      7. associate-/l*72.7%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \color{blue}{\frac{-1}{\frac{180}{angle}}}\right)\right)\right) \]
      8. associate-*r/63.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{\frac{180}{angle}}\right)}\right)\right) \]
      9. associate-/r/63.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \color{blue}{\left(\frac{\pi \cdot -1}{180} \cdot angle\right)}\right)\right) \]
      10. associate-/l*63.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\color{blue}{\frac{\pi}{\frac{180}{-1}}} \cdot angle\right)\right)\right) \]
      11. metadata-eval63.6%

        \[\leadsto 2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{\color{blue}{-180}} \cdot angle\right)\right)\right) \]
    3. Simplified63.6%

      \[\leadsto \color{blue}{2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow263.6%

        \[\leadsto 2 \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow263.6%

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares63.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.15 \cdot 10^{+232}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\pi \cdot \left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]

Alternative 11: 58.3% accurate, 2.9× speedup?

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

\\
\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\pi \cdot \left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)
\end{array}
Derivation
  1. Initial program 58.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. Step-by-step derivation
    1. *-commutative58.2%

      \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. associate-*l*58.2%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    3. associate-*l*58.2%

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
  4. Step-by-step derivation
    1. unpow258.9%

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

      \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    3. difference-of-squares61.7%

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
    2. expm1-udef29.8%

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

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)} - 1} \]
  8. Step-by-step derivation
    1. expm1-def43.6%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)\right)} \]
    2. expm1-log1p61.1%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)} \]
    3. *-commutative61.1%

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)} \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \]
    4. +-commutative61.1%

      \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \]
    5. associate-*l*61.1%

      \[\leadsto \left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)} \]
  9. Simplified61.1%

    \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)} \]
  10. Final simplification61.1%

    \[\leadsto \left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\pi \cdot \left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \]

Alternative 12: 55.0% accurate, 5.5× speedup?

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

\\
-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(a - b\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 58.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. Simplified57.1%

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

    \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
  4. Step-by-step derivation
    1. unpow253.3%

      \[\leadsto -0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
    2. unpow253.3%

      \[\leadsto -0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
    3. difference-of-squares55.7%

      \[\leadsto -0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
  5. Applied egg-rr55.7%

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

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

Alternative 13: 55.0% accurate, 5.5× speedup?

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

\\
0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 58.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. Step-by-step derivation
    1. *-commutative58.2%

      \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. associate-*l*58.2%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    3. associate-*l*58.2%

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
  4. Step-by-step derivation
    1. unpow258.9%

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

      \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    3. difference-of-squares61.7%

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

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

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
  7. Step-by-step derivation
    1. associate-*r*55.8%

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

      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
    3. *-commutative55.8%

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

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

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

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

Reproduce

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