ab-angle->ABCF B

Percentage Accurate: 54.1% → 67.3%
Time: 38.4s
Alternatives: 23
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 23 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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 67.3% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 19.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*19.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. unpow219.4%

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e191 < (/.f64 angle 180) < 5.00000000000000046e55

    1. Initial program 70.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*70.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. unpow270.1%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      4. add-cube-cbrt82.7%

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
    11. Step-by-step derivation
      1. add-sqr-sqrt85.5%

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

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

    if 5.00000000000000046e55 < (/.f64 angle 180)

    1. Initial program 29.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. *-commutative29.6%

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

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\color{blue}{\left(b \cdot b - a \cdot a\right)} + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. difference-of-squares21.8%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\color{blue}{\left(b + a\right) \cdot \left(b - a\right)} + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      5. sub-neg21.8%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b + \left(-a\right)\right)} + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      6. distribute-rgt-in17.8%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\color{blue}{\left(b \cdot \left(b + a\right) + \left(-a\right) \cdot \left(b + a\right)\right)} + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      7. add-sqr-sqrt9.5%

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b \cdot \left(b + a\right) + \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \cdot \left(b + a\right)\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      9. sqr-neg26.0%

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b \cdot \left(b + a\right) + \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(b + a\right)\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      11. add-sqr-sqrt34.6%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b \cdot \left(b + a\right) + \color{blue}{a} \cdot \left(b + a\right)\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      12. distribute-rgt-in38.5%

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\color{blue}{{\left(b + a\right)}^{2}} + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      14. add-sqr-sqrt20.1%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left({\left(b + a\right)}^{2} + \mathsf{fma}\left(\color{blue}{\sqrt{-a} \cdot \sqrt{-a}}, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      15. sqrt-unprod28.7%

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left({\left(b + a\right)}^{2} + \mathsf{fma}\left(\color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      16. sqr-neg28.7%

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left({\left(b + a\right)}^{2} + \mathsf{fma}\left(\color{blue}{\sqrt{a} \cdot \sqrt{a}}, a, a \cdot a\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      18. add-sqr-sqrt38.3%

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

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

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

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

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

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

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

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

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

Alternative 2: 67.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_0 := \frac{angle}{180} \cdot \pi\\
t_1 := \sin t_0\\
\mathbf{if}\;\cos t_0 \cdot \left(t_1 \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \leq \infty:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right) \cdot \left(\left(b + a\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot t_1\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) < +inf.0

    1. Initial program 59.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*59.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. unpow259.8%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      4. add-cube-cbrt68.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \color{blue}{\left({\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}^{\left(\frac{2}{2}\right)}\right)}\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
      9. metadata-eval69.8%

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
      11. associate-*r*67.9%

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
      14. associate-*r*69.8%

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.3% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) < 5.0000000000000004e301

    1. Initial program 60.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*60.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. unpow260.3%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutative65.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000004e301 < (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))

    1. Initial program 42.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*42.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. unpow242.0%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.1% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < +inf.0

    1. Initial program 59.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*59.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. unpow259.8%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      4. add-cube-cbrt68.1%

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.4% accurate, 0.7× speedup?

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

\\
2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right) \cdot \left(b + a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.3%

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

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

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

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

    \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
  5. Step-by-step derivation
    1. associate-*r*67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
    4. add-cube-cbrt67.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 5.8 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\right)\right)\\

\mathbf{elif}\;b \leq 1.6 \cdot 10^{+215}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < 2.8999999999999998e47

    1. Initial program 59.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*59.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. unpow259.5%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. *-commutative68.5%

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      4. add-cube-cbrt68.8%

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

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

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

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

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

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

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

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

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

    if 2.8999999999999998e47 < b < 5.80000000000000004e153

    1. Initial program 53.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*53.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. unpow253.9%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*52.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)} \cdot \left(a + b\right)\right)\right)\right) \]
    9. Step-by-step derivation
      1. associate-*r*52.8%

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

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

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

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

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

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

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

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

    if 5.80000000000000004e153 < b < 1.5999999999999999e215

    1. Initial program 18.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*18.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. unpow218.1%

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

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

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

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

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

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

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

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

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

    if 1.5999999999999999e215 < b

    1. Initial program 47.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. *-commutative47.7%

        \[\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*47.7%

        \[\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. unpow247.7%

        \[\leadsto \left(\left(\color{blue}{b \cdot b} - {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) \]
      4. fma-neg58.2%

        \[\leadsto \left(\color{blue}{\mathsf{fma}\left(b, b, -{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) \]
      5. unpow258.2%

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

        \[\leadsto \left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-a\right)}\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. Simplified58.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified74.0%

      \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. add-cube-cbrt74.0%

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

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

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

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

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

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

Alternative 7: 66.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;b \leq 1.6 \cdot 10^{+215}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 5.4000000000000001e153

    1. Initial program 59.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*59.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. unpow259.1%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      4. add-cube-cbrt67.7%

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)} \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      6. rem-cube-cbrt69.4%

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

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

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

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

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

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

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

    if 5.4000000000000001e153 < b < 1.5999999999999999e215

    1. Initial program 18.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*18.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. unpow218.1%

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

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

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

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

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

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

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

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

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

    if 1.5999999999999999e215 < b

    1. Initial program 47.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. *-commutative47.7%

        \[\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*47.7%

        \[\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. unpow247.7%

        \[\leadsto \left(\left(\color{blue}{b \cdot b} - {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) \]
      4. fma-neg58.2%

        \[\leadsto \left(\color{blue}{\mathsf{fma}\left(b, b, -{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) \]
      5. unpow258.2%

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

        \[\leadsto \left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-a\right)}\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. Simplified58.2%

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

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

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

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

        \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified74.0%

      \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. add-cube-cbrt74.0%

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

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

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

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

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

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

Alternative 8: 67.8% accurate, 1.0× speedup?

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

\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \log \left(e^{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.3%

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

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

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

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

    \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
  5. Step-by-step derivation
    1. associate-*r*67.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \log \left(e^{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)\right)\right) \]

Alternative 9: 66.6% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a 2) < 5e14

    1. Initial program 62.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*62.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. unpow262.8%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*67.2%

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

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

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

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

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

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

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

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

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

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

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

    if 5e14 < (pow.f64 a 2)

    1. Initial program 49.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*49.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. unpow249.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 64.8% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;b \leq 4.5 \cdot 10^{+237}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 2.35e19

    1. Initial program 59.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*59.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. unpow259.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.35e19 < b < 4.49999999999999964e237

    1. Initial program 43.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*43.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. unpow243.7%

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

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

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

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

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

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

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

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

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

    if 4.49999999999999964e237 < b

    1. Initial program 47.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. *-commutative47.4%

        \[\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*47.4%

        \[\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. unpow247.4%

        \[\leadsto \left(\left(\color{blue}{b \cdot b} - {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) \]
      4. fma-neg59.2%

        \[\leadsto \left(\color{blue}{\mathsf{fma}\left(b, b, -{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) \]
      5. unpow259.2%

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

        \[\leadsto \left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-a\right)}\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. Simplified59.2%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
    4. Taylor expanded in b around inf 76.9%

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

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

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

        \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified76.9%

      \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. associate-*r/71.0%

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

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

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

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

Alternative 11: 66.6% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;b \leq 3.5 \cdot 10^{+240}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 1.6999999999999999e46

    1. Initial program 59.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*59.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. unpow259.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]

    if 1.6999999999999999e46 < b < 3.50000000000000033e240

    1. Initial program 40.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*40.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. unpow240.0%

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

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

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

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

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

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

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

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

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

    if 3.50000000000000033e240 < b

    1. Initial program 47.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. *-commutative47.4%

        \[\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*47.4%

        \[\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. unpow247.4%

        \[\leadsto \left(\left(\color{blue}{b \cdot b} - {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) \]
      4. fma-neg59.2%

        \[\leadsto \left(\color{blue}{\mathsf{fma}\left(b, b, -{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) \]
      5. unpow259.2%

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

        \[\leadsto \left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-a\right)}\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. Simplified59.2%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
    4. Taylor expanded in b around inf 76.9%

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

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

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

        \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified76.9%

      \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. associate-*r/71.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.7 \cdot 10^{+46}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(\left(b + a\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)\right)\\ \mathbf{elif}\;b \leq 3.5 \cdot 10^{+240}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\frac{1}{\frac{180}{angle \cdot \pi}}\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 12: 64.9% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;b \leq 3 \cdot 10^{+240}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right) \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 2.1e19

    1. Initial program 59.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*59.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. unpow259.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1e19 < b < 2.9999999999999999e240

    1. Initial program 43.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*43.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. unpow243.7%

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

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

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

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

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

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

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

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

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

    if 2.9999999999999999e240 < b

    1. Initial program 47.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. *-commutative47.4%

        \[\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*47.4%

        \[\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. unpow247.4%

        \[\leadsto \left(\left(\color{blue}{b \cdot b} - {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) \]
      4. fma-neg59.2%

        \[\leadsto \left(\color{blue}{\mathsf{fma}\left(b, b, -{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) \]
      5. unpow259.2%

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

        \[\leadsto \left(\mathsf{fma}\left(b, b, \color{blue}{a \cdot \left(-a\right)}\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. Simplified59.2%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
    4. Taylor expanded in b around inf 76.9%

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

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

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

        \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified76.9%

      \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. associate-*r/82.7%

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

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

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

Alternative 13: 67.8% accurate, 1.5× speedup?

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

\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.3%

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

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

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

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

    \[\leadsto \color{blue}{2 \cdot \left(\left(b - a\right) \cdot \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(a + b\right)\right)\right)\right)} \]
  5. Step-by-step derivation
    1. associate-*r*67.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 65.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 64.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*64.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. unpow264.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999997e38 < (pow.f64 b 2)

    1. Initial program 45.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*45.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. unpow245.6%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 66.1% accurate, 2.9× speedup?

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

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

\mathbf{elif}\;a \leq 8.5 \cdot 10^{+299}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.99999999999999989e183

    1. Initial program 56.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*56.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. unpow256.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999989e183 < a < 8.50000000000000045e299

    1. Initial program 55.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*55.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. unpow255.4%

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

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

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

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

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

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

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

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

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

    if 8.50000000000000045e299 < a

    1. Initial program 33.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. *-commutative33.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left({\left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)}^{\left(2 \cdot {\left(b + a\right)}^{2}\right)}\right)} \]
    5. Step-by-step derivation
      1. log-pow66.7%

        \[\leadsto \color{blue}{\left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)} \]
      2. sin-066.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{0} + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right) \]
      3. +-lft-identity66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      4. associate-*l*66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}}}\right) \]
      5. *-commutative66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \color{blue}{\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}}\right) \]
      6. *-commutative66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}}\right) \]
    6. Simplified66.7%

      \[\leadsto \color{blue}{\left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in angle around 0 100.0%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot {\left(a + b\right)}^{2}\right)\right)} \]
    8. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot {\left(a + b\right)}^{2}\right)\right) \cdot 0.011111111111111112} \]
      2. associate-*r*100.0%

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

        \[\leadsto \color{blue}{\left(angle \cdot \pi\right) \cdot \left({\left(a + b\right)}^{2} \cdot 0.011111111111111112\right)} \]
      4. +-commutative100.0%

        \[\leadsto \left(angle \cdot \pi\right) \cdot \left({\color{blue}{\left(b + a\right)}}^{2} \cdot 0.011111111111111112\right) \]
    9. Simplified100.0%

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

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

Alternative 16: 62.5% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.5 \cdot 10^{+299}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


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

    1. Initial program 56.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*56.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. unpow256.6%

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

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

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

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

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

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

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

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

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

    if 8.50000000000000045e299 < a

    1. Initial program 33.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. *-commutative33.3%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left({\left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)}^{\left(2 \cdot {\left(b + a\right)}^{2}\right)}\right)} \]
    5. Step-by-step derivation
      1. log-pow66.7%

        \[\leadsto \color{blue}{\left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)} \]
      2. sin-066.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{0} + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right) \]
      3. +-lft-identity66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      4. associate-*l*66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}}}\right) \]
      5. *-commutative66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \color{blue}{\left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}}\right) \]
      6. *-commutative66.7%

        \[\leadsto \left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}}\right) \]
    6. Simplified66.7%

      \[\leadsto \color{blue}{\left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in angle around 0 100.0%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot {\left(a + b\right)}^{2}\right)\right)} \]
    8. Step-by-step derivation
      1. *-commutative100.0%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot {\left(a + b\right)}^{2}\right)\right) \cdot 0.011111111111111112} \]
      2. associate-*r*100.0%

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

        \[\leadsto \color{blue}{\left(angle \cdot \pi\right) \cdot \left({\left(a + b\right)}^{2} \cdot 0.011111111111111112\right)} \]
      4. +-commutative100.0%

        \[\leadsto \left(angle \cdot \pi\right) \cdot \left({\color{blue}{\left(b + a\right)}}^{2} \cdot 0.011111111111111112\right) \]
    9. Simplified100.0%

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

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

Alternative 17: 41.3% accurate, 5.3× speedup?

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

\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\
\mathbf{if}\;a \leq 1.2 \cdot 10^{-23}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{+34}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\

\mathbf{elif}\;a \leq 5.2 \cdot 10^{+47}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.19999999999999998e-23 or 6.19999999999999955e34 < a < 5.20000000000000007e47

    1. Initial program 57.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*57.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. unpow257.9%

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative42.7%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
      2. unpow242.7%

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

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

    if 1.19999999999999998e-23 < a < 6.19999999999999955e34

    1. Initial program 47.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*47.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. unpow247.9%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(angle \cdot \left({a}^{2} \cdot \pi\right)\right) \cdot -0.011111111111111112} \]
      2. associate-*l*38.4%

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

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

        \[\leadsto angle \cdot \left(\left(\pi \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot -0.011111111111111112\right) \]
    7. Simplified38.4%

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

    if 5.20000000000000007e47 < a

    1. Initial program 52.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*52.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. unpow252.3%

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a \cdot \pi\right)}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutative54.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.2 \cdot 10^{-23}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{elif}\;a \leq 6.2 \cdot 10^{+34}:\\ \;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{+47}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\ \end{array} \]

Alternative 18: 41.4% accurate, 5.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.7 \cdot 10^{-71}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\

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


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

    1. Initial program 59.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*59.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. unpow259.4%

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

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

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

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

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

      \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative43.6%

        \[\leadsto \color{blue}{\left(angle \cdot \left({a}^{2} \cdot \pi\right)\right) \cdot -0.011111111111111112} \]
      2. associate-*l*43.6%

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

        \[\leadsto angle \cdot \left(\color{blue}{\left(\pi \cdot {a}^{2}\right)} \cdot -0.011111111111111112\right) \]
      4. unpow243.6%

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

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

    if 1.70000000000000002e-71 < b

    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. unpow249.4%

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(b \cdot \pi\right)}\right)\right) \]
    6. Step-by-step derivation
      1. *-commutative48.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.7 \cdot 10^{-71}:\\ \;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]

Alternative 19: 54.5% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

Alternative 20: 62.7% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 40.4% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.8 \cdot 10^{-71}:\\
\;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\

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


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

    1. Initial program 59.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*59.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. unpow259.4%

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

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

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

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

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

      \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(angle \cdot \left({a}^{2} \cdot \pi\right)\right)} \]
    6. Step-by-step derivation
      1. *-commutative43.6%

        \[\leadsto \color{blue}{\left(angle \cdot \left({a}^{2} \cdot \pi\right)\right) \cdot -0.011111111111111112} \]
      2. associate-*l*43.6%

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

        \[\leadsto angle \cdot \left(\color{blue}{\left(\pi \cdot {a}^{2}\right)} \cdot -0.011111111111111112\right) \]
      4. unpow243.6%

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

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

    if 1.8e-71 < b

    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. unpow249.4%

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
    7. Simplified45.3%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
    8. Taylor expanded in angle around 0 45.3%

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

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

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

        \[\leadsto \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \cdot 0.011111111111111112 \]
      4. associate-*l*45.2%

        \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
      5. associate-*r*45.1%

        \[\leadsto angle \cdot \left(\color{blue}{\left(\left(\pi \cdot b\right) \cdot b\right)} \cdot 0.011111111111111112\right) \]
      6. associate-*l*46.4%

        \[\leadsto angle \cdot \color{blue}{\left(\left(\pi \cdot b\right) \cdot \left(b \cdot 0.011111111111111112\right)\right)} \]
    10. Simplified46.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.8 \cdot 10^{-71}:\\ \;\;\;\;angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot 0.011111111111111112\right)\right)\\ \end{array} \]

Alternative 22: 35.6% accurate, 5.7× speedup?

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

\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.3%

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

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
  6. Step-by-step derivation
    1. *-commutative35.6%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
    2. unpow235.6%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
  7. Simplified35.6%

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

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

Alternative 23: 35.7% accurate, 5.7× speedup?

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

\\
angle \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot 0.011111111111111112\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.3%

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

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
  6. Step-by-step derivation
    1. *-commutative35.6%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot {b}^{2}\right)}\right) \]
    2. unpow235.6%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
  7. Simplified35.6%

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
  8. Taylor expanded in angle around 0 35.6%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
  9. Step-by-step derivation
    1. *-commutative35.6%

      \[\leadsto \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right) \cdot 0.011111111111111112} \]
    2. *-commutative35.6%

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

      \[\leadsto \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \cdot 0.011111111111111112 \]
    4. associate-*l*35.6%

      \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    5. associate-*r*35.6%

      \[\leadsto angle \cdot \left(\color{blue}{\left(\left(\pi \cdot b\right) \cdot b\right)} \cdot 0.011111111111111112\right) \]
    6. associate-*l*36.0%

      \[\leadsto angle \cdot \color{blue}{\left(\left(\pi \cdot b\right) \cdot \left(b \cdot 0.011111111111111112\right)\right)} \]
  10. Simplified36.0%

    \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot b\right) \cdot \left(b \cdot 0.011111111111111112\right)\right)} \]
  11. Final simplification36.0%

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

Reproduce

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