ab-angle->ABCF B

Percentage Accurate: 53.8% → 67.2%
Time: 58.1s
Alternatives: 16
Speedup: 5.4×

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 16 alternatives:

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

Initial Program: 53.8% 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.2% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+25}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot t_2\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{+28}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_1 \cdot t_2\right)\right)\\

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


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

    1. Initial program 28.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. *-commutative28.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*28.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. unpow228.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-neg36.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. unpow236.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-in36.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. Simplified36.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. Step-by-step derivation
      1. *-commutative36.2%

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

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

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

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

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

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

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

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

    if -5.0000000000000001e132 < (/.f64 angle 180) < -2.00000000000000018e25

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 45.4%

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

    if -2.00000000000000018e25 < (/.f64 angle 180) < 9.99999999999999958e27

    1. Initial program 71.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*71.8%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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 9.99999999999999958e27 < (/.f64 angle 180)

    1. Initial program 24.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. *-commutative24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 58.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*58.3%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. add-sqr-sqrt44.2%

        \[\leadsto {\left(\sin \left(\color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right)}^{1} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr65.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(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)}\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt44.2%

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

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

    if 4.99999999999999993e306 < (pow.f64 a 2)

    1. Initial program 30.2%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*30.2%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 83.6%

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

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

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

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

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

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

Alternative 3: 66.8% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 58.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*58.3%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. add-sqr-sqrt44.2%

        \[\leadsto {\left(\sin \left(\color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right)}^{1} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr65.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(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)}\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. add-cbrt-cube64.5%

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

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

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

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

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

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

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

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

    if 4.99999999999999993e306 < (pow.f64 a 2)

    1. Initial program 30.2%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*30.2%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 83.6%

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

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

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

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

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

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

Alternative 4: 66.8% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 58.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*58.3%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. add-sqr-sqrt44.2%

        \[\leadsto {\left(\sin \left(\color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right)}^{1} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr65.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(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)}\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
    7. Step-by-step derivation
      1. associate-*r*65.6%

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\log \left(e^{\cos \left(\color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \pi\right)}\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
      9. metadata-eval65.6%

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

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

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

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

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

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

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

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

    if 4.99999999999999993e306 < (pow.f64 a 2)

    1. Initial program 30.2%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*30.2%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 83.6%

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

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

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

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

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

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

Alternative 5: 66.7% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 58.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*58.3%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. add-sqr-sqrt44.2%

        \[\leadsto {\left(\sin \left(\color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)} \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right)}^{1} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr65.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(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)}\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]

    if 4.99999999999999993e306 < (pow.f64 a 2)

    1. Initial program 30.2%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*30.2%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 83.6%

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

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

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

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

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

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

Alternative 6: 67.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+25}:\\ \;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot {\left(\left(a + b\right) \cdot \sqrt{2 \cdot \left|t_1\right|}\right)}^{2}\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+28}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\left(a + b\right) \cdot \sin t_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot t_1\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (sin (* PI (* 0.005555555555555556 angle)))))
   (if (<= (/ angle 180.0) -2e+25)
     (*
      (cos (* PI (/ angle 180.0)))
      (pow (* (+ a b) (sqrt (* 2.0 (fabs t_1)))) 2.0))
     (if (<= (/ angle 180.0) 1e+28)
       (* 2.0 (* (- b a) (* (cos t_0) (* (+ a b) (sin t_0)))))
       (* (* 2.0 (pow (+ a b) 2.0)) t_1)))))
double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = sin((((double) M_PI) * (0.005555555555555556 * angle)));
	double tmp;
	if ((angle / 180.0) <= -2e+25) {
		tmp = cos((((double) M_PI) * (angle / 180.0))) * pow(((a + b) * sqrt((2.0 * fabs(t_1)))), 2.0);
	} else if ((angle / 180.0) <= 1e+28) {
		tmp = 2.0 * ((b - a) * (cos(t_0) * ((a + b) * sin(t_0))));
	} else {
		tmp = (2.0 * pow((a + b), 2.0)) * t_1;
	}
	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((Math.PI * (0.005555555555555556 * angle)));
	double tmp;
	if ((angle / 180.0) <= -2e+25) {
		tmp = Math.cos((Math.PI * (angle / 180.0))) * Math.pow(((a + b) * Math.sqrt((2.0 * Math.abs(t_1)))), 2.0);
	} else if ((angle / 180.0) <= 1e+28) {
		tmp = 2.0 * ((b - a) * (Math.cos(t_0) * ((a + b) * Math.sin(t_0))));
	} else {
		tmp = (2.0 * Math.pow((a + b), 2.0)) * t_1;
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = 0.005555555555555556 * (angle * math.pi)
	t_1 = math.sin((math.pi * (0.005555555555555556 * angle)))
	tmp = 0
	if (angle / 180.0) <= -2e+25:
		tmp = math.cos((math.pi * (angle / 180.0))) * math.pow(((a + b) * math.sqrt((2.0 * math.fabs(t_1)))), 2.0)
	elif (angle / 180.0) <= 1e+28:
		tmp = 2.0 * ((b - a) * (math.cos(t_0) * ((a + b) * math.sin(t_0))))
	else:
		tmp = (2.0 * math.pow((a + b), 2.0)) * t_1
	return tmp
function code(a, b, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = sin(Float64(pi * Float64(0.005555555555555556 * angle)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -2e+25)
		tmp = Float64(cos(Float64(pi * Float64(angle / 180.0))) * (Float64(Float64(a + b) * sqrt(Float64(2.0 * abs(t_1)))) ^ 2.0));
	elseif (Float64(angle / 180.0) <= 1e+28)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_0) * Float64(Float64(a + b) * sin(t_0)))));
	else
		tmp = Float64(Float64(2.0 * (Float64(a + b) ^ 2.0)) * t_1);
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = 0.005555555555555556 * (angle * pi);
	t_1 = sin((pi * (0.005555555555555556 * angle)));
	tmp = 0.0;
	if ((angle / 180.0) <= -2e+25)
		tmp = cos((pi * (angle / 180.0))) * (((a + b) * sqrt((2.0 * abs(t_1)))) ^ 2.0);
	elseif ((angle / 180.0) <= 1e+28)
		tmp = 2.0 * ((b - a) * (cos(t_0) * ((a + b) * sin(t_0))));
	else
		tmp = (2.0 * ((a + b) ^ 2.0)) * t_1;
	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[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+25], N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[(N[(a + b), $MachinePrecision] * N[Sqrt[N[(2.0 * N[Abs[t$95$1], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+28], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[N[(a + b), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 25.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. *-commutative25.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*25.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. unpow225.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-neg32.0%

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

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

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

      \[\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. Step-by-step derivation
      1. add-sqr-sqrt25.9%

        \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \sqrt{\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) \]
      2. pow225.9%

        \[\leadsto \color{blue}{{\left(\sqrt{\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)}^{2}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Applied egg-rr17.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(b + a\right) \cdot \sqrt{\left|\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right| \cdot 2}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    9. Simplified43.4%

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

    if -2.00000000000000018e25 < (/.f64 angle 180) < 9.99999999999999958e27

    1. Initial program 71.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*71.8%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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 9.99999999999999958e27 < (/.f64 angle 180)

    1. Initial program 24.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. *-commutative24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.0% accurate, 1.2× speedup?

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

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

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


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

    1. Initial program 58.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*58.3%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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 4.99999999999999993e306 < (pow.f64 a 2)

    1. Initial program 30.2%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*30.2%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 83.6%

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

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

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

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

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

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

Alternative 8: 65.4% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 58.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*58.6%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 64.7%

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

    if 4.99999999999999989e122 < (pow.f64 a 2)

    1. Initial program 39.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*39.5%

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

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

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

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

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

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

      \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 73.9%

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

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

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

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

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

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

Alternative 9: 63.5% accurate, 2.8× speedup?

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

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

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


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

    1. Initial program 55.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*55.6%

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000025e95 < (/.f64 angle 180)

    1. Initial program 20.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*20.7%

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

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

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

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

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

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

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

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

Alternative 10: 63.5% accurate, 2.8× speedup?

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

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

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


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

    1. Initial program 55.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*55.6%

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000025e95 < (/.f64 angle 180)

    1. Initial program 20.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*20.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 65.2% accurate, 2.9× speedup?

\[\begin{array}{l} \\ 2 \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (* 2.0 (* (- b a) (* (+ a b) (sin (* 0.005555555555555556 (* angle PI)))))))
double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((a + b) * sin((0.005555555555555556 * (angle * ((double) M_PI))))));
}
public static double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((a + b) * Math.sin((0.005555555555555556 * (angle * Math.PI)))));
}
def code(a, b, angle):
	return 2.0 * ((b - a) * ((a + b) * math.sin((0.005555555555555556 * (angle * math.pi)))))
function code(a, b, angle)
	return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(a + b) * sin(Float64(0.005555555555555556 * Float64(angle * pi))))))
end
function tmp = code(a, b, angle)
	tmp = 2.0 * ((b - a) * ((a + b) * sin((0.005555555555555556 * (angle * pi)))));
end
code[a_, b_, angle_] := N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[Sin[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(a + b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.2%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*50.2%

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

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

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

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

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

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

    \[\leadsto 2 \cdot \color{blue}{\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. Taylor expanded in angle around 0 64.8%

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

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

Alternative 12: 57.8% accurate, 5.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -8.6 \cdot 10^{+145} \lor \neg \left(b \leq 5.5 \cdot 10^{+147}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (or (<= b -8.6e+145) (not (<= b 5.5e+147)))
   (* 0.011111111111111112 (* (* b angle) (* b PI)))
   (* 0.011111111111111112 (* PI (* angle (- (* b b) (* a a)))))))
double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -8.6e+145) || !(b <= 5.5e+147)) {
		tmp = 0.011111111111111112 * ((b * angle) * (b * ((double) M_PI)));
	} else {
		tmp = 0.011111111111111112 * (((double) M_PI) * (angle * ((b * b) - (a * a))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -8.6e+145) || !(b <= 5.5e+147)) {
		tmp = 0.011111111111111112 * ((b * angle) * (b * Math.PI));
	} else {
		tmp = 0.011111111111111112 * (Math.PI * (angle * ((b * b) - (a * a))));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if (b <= -8.6e+145) or not (b <= 5.5e+147):
		tmp = 0.011111111111111112 * ((b * angle) * (b * math.pi))
	else:
		tmp = 0.011111111111111112 * (math.pi * (angle * ((b * b) - (a * a))))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if ((b <= -8.6e+145) || !(b <= 5.5e+147))
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * angle) * Float64(b * pi)));
	else
		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle * Float64(Float64(b * b) - Float64(a * a)))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if ((b <= -8.6e+145) || ~((b <= 5.5e+147)))
		tmp = 0.011111111111111112 * ((b * angle) * (b * pi));
	else
		tmp = 0.011111111111111112 * (pi * (angle * ((b * b) - (a * a))));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[Or[LessEqual[b, -8.6e+145], N[Not[LessEqual[b, 5.5e+147]], $MachinePrecision]], N[(0.011111111111111112 * N[(N[(b * angle), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(Pi * N[(angle * N[(N[(b * b), $MachinePrecision] - N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.6 \cdot 10^{+145} \lor \neg \left(b \leq 5.5 \cdot 10^{+147}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.59999999999999996e145 or 5.4999999999999997e147 < b

    1. Initial program 37.2%

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

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

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

        \[\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-neg47.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. unpow247.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. Simplified47.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. Taylor expanded in angle around 0 44.5%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b\right)\right) \cdot \pi\right)} \]
    10. Taylor expanded in angle around 0 54.5%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    11. Step-by-step derivation
      1. unpow254.5%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(b \cdot \left(b \cdot \pi\right)\right)}\right) \]
      3. associate-*r*68.0%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)} \]
      4. *-commutative68.0%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \color{blue}{\left(\pi \cdot b\right)}\right) \]
    12. Simplified68.0%

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

    if -8.59999999999999996e145 < b < 5.4999999999999997e147

    1. Initial program 54.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. *-commutative54.9%

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

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

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

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

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

      \[\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. Taylor expanded in angle around 0 52.0%

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

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

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

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

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

        \[\leadsto \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(0.011111111111111112 \cdot angle\right) \]
      6. *-commutative52.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8.6 \cdot 10^{+145} \lor \neg \left(b \leq 5.5 \cdot 10^{+147}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b - a \cdot a\right)\right)\right)\\ \end{array} \]

Alternative 13: 55.8% accurate, 5.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.2999999999999999e161

    1. Initial program 51.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. *-commutative51.1%

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

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

        \[\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-neg56.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. unpow256.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. Simplified56.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. Taylor expanded in angle around 0 53.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b\right)\right) \cdot \pi\right)} \]
    10. Taylor expanded in angle around 0 64.9%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    11. Step-by-step derivation
      1. unpow264.9%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(b \cdot \left(b \cdot \pi\right)\right)}\right) \]
      3. associate-*r*77.7%

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

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

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

    if -1.2999999999999999e161 < b

    1. Initial program 50.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*50.0%

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

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

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

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

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

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

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

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

Alternative 14: 61.8% accurate, 5.4× speedup?

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

\\
2 \cdot \left(0.005555555555555556 \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.2%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*50.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 51.3% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.45 \cdot 10^{+72} \lor \neg \left(b \leq 225000000\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (or (<= b -3.45e+72) (not (<= b 225000000.0)))
   (* 0.011111111111111112 (* (* b angle) (* b PI)))
   (* (* PI (* a a)) (* angle -0.011111111111111112))))
double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -3.45e+72) || !(b <= 225000000.0)) {
		tmp = 0.011111111111111112 * ((b * angle) * (b * ((double) M_PI)));
	} else {
		tmp = (((double) M_PI) * (a * a)) * (angle * -0.011111111111111112);
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -3.45e+72) || !(b <= 225000000.0)) {
		tmp = 0.011111111111111112 * ((b * angle) * (b * Math.PI));
	} else {
		tmp = (Math.PI * (a * a)) * (angle * -0.011111111111111112);
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if (b <= -3.45e+72) or not (b <= 225000000.0):
		tmp = 0.011111111111111112 * ((b * angle) * (b * math.pi))
	else:
		tmp = (math.pi * (a * a)) * (angle * -0.011111111111111112)
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if ((b <= -3.45e+72) || !(b <= 225000000.0))
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * angle) * Float64(b * pi)));
	else
		tmp = Float64(Float64(pi * Float64(a * a)) * Float64(angle * -0.011111111111111112));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if ((b <= -3.45e+72) || ~((b <= 225000000.0)))
		tmp = 0.011111111111111112 * ((b * angle) * (b * pi));
	else
		tmp = (pi * (a * a)) * (angle * -0.011111111111111112);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[Or[LessEqual[b, -3.45e+72], N[Not[LessEqual[b, 225000000.0]], $MachinePrecision]], N[(0.011111111111111112 * N[(N[(b * angle), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(angle * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.45 \cdot 10^{+72} \lor \neg \left(b \leq 225000000\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -3.45000000000000017e72 or 2.25e8 < b

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

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

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

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

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

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

      \[\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. Taylor expanded in angle around 0 45.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot \pi\right) \]
    9. Simplified48.0%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b\right)\right) \cdot \pi\right)} \]
    10. Taylor expanded in angle around 0 47.9%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
    11. Step-by-step derivation
      1. unpow247.9%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(b \cdot \left(b \cdot \pi\right)\right)}\right) \]
      3. associate-*r*56.3%

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

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \color{blue}{\left(\pi \cdot b\right)}\right) \]
    12. Simplified56.3%

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

    if -3.45000000000000017e72 < b < 2.25e8

    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. *-commutative56.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*56.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. unpow256.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-neg56.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. unpow256.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. Simplified56.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. Taylor expanded in angle around 0 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.45 \cdot 10^{+72} \lor \neg \left(b \leq 225000000\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot -0.011111111111111112\right)\\ \end{array} \]

Alternative 16: 38.1% accurate, 5.7× speedup?

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

\\
0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(b \cdot \pi\right)\right)
\end{array}
Derivation
  1. Initial program 50.2%

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

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

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

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

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

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

    \[\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. Taylor expanded in angle around 0 50.0%

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

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

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

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

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

      \[\leadsto \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(0.011111111111111112 \cdot angle\right) \]
    6. *-commutative50.0%

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

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

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

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

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

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b\right)\right) \cdot \pi\right)} \]
  10. Taylor expanded in angle around 0 33.7%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(b \cdot \left(b \cdot \pi\right)\right)}\right) \]
    3. associate-*r*35.0%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)} \]
    4. *-commutative35.0%

      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \color{blue}{\left(\pi \cdot b\right)}\right) \]
  12. Simplified35.0%

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot b\right) \cdot \left(\pi \cdot b\right)\right)} \]
  13. Final simplification35.0%

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

Reproduce

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