ab-angle->ABCF B

Percentage Accurate: 53.5% → 67.8%
Time: 43.6s
Alternatives: 20
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 20 alternatives:

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

Initial Program: 53.5% accurate, 1.0× speedup?

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

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

Alternative 1: 67.8% accurate, 0.9× speedup?

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

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

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


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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. Simplified69.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 inf 85.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)} \]

    if 5e13 < (/.f64 angle 180)

    1. Initial program 28.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. *-commutative28.6%

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

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

        \[\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. expm1-log1p-u24.0%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\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)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. expm1-udef22.7%

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

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

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

        \[\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)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. rem-exp-log30.8%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.6% accurate, 1.5× speedup?

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

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

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

    \[\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 73.0%

    \[\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. associate-*r*73.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.6% accurate, 1.5× speedup?

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

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

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

    \[\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 73.0%

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

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

Alternative 4: 67.6% accurate, 1.5× speedup?

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

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

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

    \[\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 73.0%

    \[\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. associate-*r*73.2%

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

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

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

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

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

      \[\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(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right) \cdot \left(a + b\right)\right)\right)\right) \]
    7. div-inv72.9%

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

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

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

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

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

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

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

Alternative 5: 65.7% accurate, 1.9× speedup?

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

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

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

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


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

    1. Initial program 59.1%

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. Simplified61.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 72.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. Step-by-step derivation
      1. associate-*r*73.1%

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

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

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

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

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

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

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

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

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

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

    if 3.0499999999999998e164 < b < 5.80000000000000035e266

    1. Initial program 27.4%

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

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

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

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

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

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

      \[\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 83.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)} \]
    5. Step-by-step derivation
      1. associate-*r*84.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(a + b\right)\right)\right)\right) \]
      2. metadata-eval94.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(\left(\color{blue}{\frac{1}{180}} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      3. associate-/r/94.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(\color{blue}{\frac{1}{\frac{180}{angle}}} \cdot \pi\right) \cdot \left(a + b\right)\right)\right)\right) \]
      4. associate-*l/94.6%

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

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

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

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

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

    if 5.80000000000000035e266 < 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. *-commutative50.0%

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

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

        \[\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-neg62.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. unpow262.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. Simplified62.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 62.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. *-commutative62.5%

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

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

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

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

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

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

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

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

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

Alternative 6: 65.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 28.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. *-commutative28.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*28.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. unpow228.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-neg40.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. unpow240.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. Simplified40.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. Applied egg-rr14.6%

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \sqrt{\left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot 0.5}\right) \cdot \sqrt{2}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \sqrt{\left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot 0.5}\right)} \cdot \sqrt{2}\right) \]
      6. swap-sqr14.6%

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \sqrt{\left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot 0.5}\right) \cdot \left(\left(b + a\right) \cdot \sqrt{\left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot 0.5}\right)\right) \cdot \left(\sqrt{2} \cdot \sqrt{2}\right)} \]
    6. Simplified45.0%

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

    if -3.99999999999999992e179 < (/.f64 angle 180)

    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.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. unpow258.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. 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-squares62.8%

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

      \[\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 75.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. Step-by-step derivation
      1. associate-*r*75.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 65.8% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 50000000000000:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= (/ angle 180.0) -4e+179)
   (* 0.011111111111111112 (* angle (* PI (fma 1.0 (* b b) (* a a)))))
   (if (<= (/ angle 180.0) 50000000000000.0)
     (*
      2.0
      (* (- b a) (* (sin (* 0.005555555555555556 (* angle PI))) (+ b a))))
     (* 2.0 (* (* (- b a) (+ b a)) (sin (* (/ angle 180.0) PI)))))))
double code(double a, double b, double angle) {
	double tmp;
	if ((angle / 180.0) <= -4e+179) {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * fma(1.0, (b * b), (a * a))));
	} else if ((angle / 180.0) <= 50000000000000.0) {
		tmp = 2.0 * ((b - a) * (sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (b + a)));
	} else {
		tmp = 2.0 * (((b - a) * (b + a)) * sin(((angle / 180.0) * ((double) M_PI))));
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (Float64(angle / 180.0) <= -4e+179)
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * fma(1.0, Float64(b * b), Float64(a * a)))));
	elseif (Float64(angle / 180.0) <= 50000000000000.0)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(b + a))));
	else
		tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * Float64(b + a)) * sin(Float64(Float64(angle / 180.0) * pi))));
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+179], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(1.0 * N[(b * b), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 50000000000000.0], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\

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

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


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

    1. Initial program 28.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. *-commutative28.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*28.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. unpow228.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-neg40.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. unpow240.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. Simplified40.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 18.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. *-commutative18.2%

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\mathsf{fma}\left(1, b \cdot b, -a \cdot a\right)}\right)\right) \]
      3. add-sqr-sqrt11.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{-a \cdot a} \cdot \sqrt{-a \cdot a}}\right)\right)\right) \]
      4. sqrt-unprod40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{\left(-a \cdot a\right) \cdot \left(-a \cdot a\right)}}\right)\right)\right) \]
      5. sqr-neg40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \sqrt{\color{blue}{\left(a \cdot a\right) \cdot \left(a \cdot a\right)}}\right)\right)\right) \]
      6. sqrt-unprod40.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{a \cdot a} \cdot \sqrt{a \cdot a}}\right)\right)\right) \]
      7. add-sqr-sqrt40.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{a \cdot a}\right)\right)\right) \]
    8. Applied egg-rr40.4%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\mathsf{fma}\left(1, b \cdot b, a \cdot a\right)}\right)\right) \]

    if -3.99999999999999992e179 < (/.f64 angle 180) < 5e13

    1. Initial program 68.4%

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      5. difference-of-squares72.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. Simplified72.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 inf 89.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 83.9%

      \[\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 5e13 < (/.f64 angle 180)

    1. Initial program 28.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*28.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*28.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. unpow228.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. unpow228.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-squares33.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. Simplified33.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 42.8%

      \[\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 3 regimes into one program.
  4. Final simplification71.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 50000000000000:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)\\ \end{array} \]

Alternative 8: 65.6% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= (/ angle 180.0) -4e+179)
   (* 0.011111111111111112 (* angle (* PI (fma 1.0 (* b b) (* a a)))))
   (* 2.0 (* (- b a) (* (+ b a) (sin (/ 1.0 (/ (/ 180.0 angle) PI))))))))
double code(double a, double b, double angle) {
	double tmp;
	if ((angle / 180.0) <= -4e+179) {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * fma(1.0, (b * b), (a * a))));
	} else {
		tmp = 2.0 * ((b - a) * ((b + a) * sin((1.0 / ((180.0 / angle) / ((double) M_PI))))));
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (Float64(angle / 180.0) <= -4e+179)
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * fma(1.0, Float64(b * b), Float64(a * a)))));
	else
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(1.0 / Float64(Float64(180.0 / angle) / pi))))));
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], -4e+179], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(1.0 * N[(b * b), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(1.0 / N[(N[(180.0 / angle), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\

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


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

    1. Initial program 28.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. *-commutative28.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*28.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. unpow228.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-neg40.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. unpow240.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. Simplified40.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 18.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. *-commutative18.2%

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\mathsf{fma}\left(1, b \cdot b, -a \cdot a\right)}\right)\right) \]
      3. add-sqr-sqrt11.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{-a \cdot a} \cdot \sqrt{-a \cdot a}}\right)\right)\right) \]
      4. sqrt-unprod40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{\left(-a \cdot a\right) \cdot \left(-a \cdot a\right)}}\right)\right)\right) \]
      5. sqr-neg40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \sqrt{\color{blue}{\left(a \cdot a\right) \cdot \left(a \cdot a\right)}}\right)\right)\right) \]
      6. sqrt-unprod40.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{a \cdot a} \cdot \sqrt{a \cdot a}}\right)\right)\right) \]
      7. add-sqr-sqrt40.4%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{a \cdot a}\right)\right)\right) \]
    8. Applied egg-rr40.4%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\mathsf{fma}\left(1, b \cdot b, a \cdot a\right)}\right)\right) \]

    if -3.99999999999999992e179 < (/.f64 angle 180)

    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.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. unpow258.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. 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-squares62.8%

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

      \[\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 75.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. Step-by-step derivation
      1. associate-*r*75.7%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -4 \cdot 10^{+179}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right)\right)\right)\\ \end{array} \]

Alternative 9: 53.7% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 0.38:\\ \;\;\;\;2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;angle \leq 1.65 \cdot 10^{+53}:\\ \;\;\;\;2 \cdot \left(0.5 \cdot \left(\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (<= angle 0.38)
   (* 2.0 (* (* angle 0.005555555555555556) (* (+ b a) (* (- b a) PI))))
   (if (<= angle 1.65e+53)
     (* 2.0 (* 0.5 (* (* b b) (sin (* PI (* angle 0.011111111111111112))))))
     (* 0.011111111111111112 (* angle (* PI (fma 1.0 (* b b) (* a a))))))))
double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 0.38) {
		tmp = 2.0 * ((angle * 0.005555555555555556) * ((b + a) * ((b - a) * ((double) M_PI))));
	} else if (angle <= 1.65e+53) {
		tmp = 2.0 * (0.5 * ((b * b) * sin((((double) M_PI) * (angle * 0.011111111111111112)))));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * fma(1.0, (b * b), (a * a))));
	}
	return tmp;
}
function code(a, b, angle)
	tmp = 0.0
	if (angle <= 0.38)
		tmp = Float64(2.0 * Float64(Float64(angle * 0.005555555555555556) * Float64(Float64(b + a) * Float64(Float64(b - a) * pi))));
	elseif (angle <= 1.65e+53)
		tmp = Float64(2.0 * Float64(0.5 * Float64(Float64(b * b) * sin(Float64(pi * Float64(angle * 0.011111111111111112))))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * fma(1.0, Float64(b * b), Float64(a * a)))));
	end
	return tmp
end
code[a_, b_, angle_] := If[LessEqual[angle, 0.38], N[(2.0 * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.65e+53], N[(2.0 * N[(0.5 * N[(N[(b * b), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(1.0 * N[(b * b), $MachinePrecision] + N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;angle \leq 1.65 \cdot 10^{+53}:\\
\;\;\;\;2 \cdot \left(0.5 \cdot \left(\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 0.38

    1. Initial program 65.1%

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

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

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

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

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

      \[\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 65.5%

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

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

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

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

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

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

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

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

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

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

    if 0.38 < angle < 1.6500000000000001e53

    1. Initial program 51.9%

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

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

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

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

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

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

      \[\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. Applied egg-rr15.6%

      \[\leadsto 2 \cdot \color{blue}{\frac{\left({b}^{4} + {a}^{4}\right) \cdot \left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)}{2 \cdot {\left(b + a\right)}^{2}}} \]
    5. Taylor expanded in b around inf 49.7%

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

        \[\leadsto 2 \cdot \color{blue}{\left(\left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot {b}^{2}\right) \cdot 0.5\right)} \]
      2. *-commutative49.7%

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

        \[\leadsto 2 \cdot \left(\left(\color{blue}{\left(b \cdot b\right)} \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot 0.5\right) \]
      4. associate-*r*49.9%

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

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

    if 1.6500000000000001e53 < angle

    1. Initial program 27.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. *-commutative27.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*27.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. unpow227.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-neg31.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. unpow231.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. Simplified31.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 25.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. *-commutative25.8%

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

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

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-un-lft-identity25.8%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\mathsf{fma}\left(1, b \cdot b, -a \cdot a\right)}\right)\right) \]
      3. add-sqr-sqrt11.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{-a \cdot a} \cdot \sqrt{-a \cdot a}}\right)\right)\right) \]
      4. sqrt-unprod41.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{\left(-a \cdot a\right) \cdot \left(-a \cdot a\right)}}\right)\right)\right) \]
      5. sqr-neg41.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \sqrt{\color{blue}{\left(a \cdot a\right) \cdot \left(a \cdot a\right)}}\right)\right)\right) \]
      6. sqrt-unprod41.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{\sqrt{a \cdot a} \cdot \sqrt{a \cdot a}}\right)\right)\right) \]
      7. add-sqr-sqrt41.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, \color{blue}{a \cdot a}\right)\right)\right) \]
    8. Applied egg-rr41.5%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\mathsf{fma}\left(1, b \cdot b, a \cdot a\right)}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 0.38:\\ \;\;\;\;2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;angle \leq 1.65 \cdot 10^{+53}:\\ \;\;\;\;2 \cdot \left(0.5 \cdot \left(\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(1, b \cdot b, a \cdot a\right)\right)\right)\\ \end{array} \]

Alternative 10: 55.7% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.5 \cdot 10^{+199}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \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(b + a\right)\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.4999999999999999e199

    1. Initial program 58.1%

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

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

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

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

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

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

      \[\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 58.9%

      \[\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) \]

    if 2.4999999999999999e199 < b

    1. Initial program 39.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.5 \cdot 10^{+199}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \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(b + a\right)\right)\right)\right)\right)\\ \end{array} \]

Alternative 11: 40.1% accurate, 5.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq 2.9 \cdot 10^{-40} \lor \neg \left(b \leq 6.8 \cdot 10^{-17}\right) \land b \leq 1.46 \cdot 10^{+48}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.8999999999999999e-40 or 6.7999999999999996e-17 < b < 1.46e48

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \sin \color{blue}{\left(\frac{1 \cdot \pi}{\frac{180}{angle}}\right)}\right) \cdot \left(-2 \cdot {a}^{2}\right) \]
      12. *-lft-identity43.9%

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

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

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

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

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

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

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

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

    if 2.8999999999999999e-40 < b < 6.7999999999999996e-17 or 1.46e48 < b

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

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

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

        \[\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-neg60.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. unpow260.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. Simplified60.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 50.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.9 \cdot 10^{-40} \lor \neg \left(b \leq 6.8 \cdot 10^{-17}\right) \land b \leq 1.46 \cdot 10^{+48}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 12: 40.1% accurate, 5.4× speedup?

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

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

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

\mathbf{elif}\;b \leq 1.7 \cdot 10^{+47}:\\
\;\;\;\;t_0\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 2.10000000000000018e-40 or 6.1999999999999997e-17 < b < 1.6999999999999999e47

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \sin \color{blue}{\left(\frac{1 \cdot \pi}{\frac{180}{angle}}\right)}\right) \cdot \left(-2 \cdot {a}^{2}\right) \]
      12. *-lft-identity43.9%

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

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

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

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

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

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

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

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

    if 2.10000000000000018e-40 < b < 6.1999999999999997e-17

    1. Initial program 84.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. *-commutative84.5%

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

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

        \[\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-neg84.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. unpow284.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. Simplified84.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 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6999999999999999e47 < b

    1. Initial program 46.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. *-commutative46.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*46.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. unpow246.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.8%

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

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

      \[\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 46.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. *-commutative46.5%

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

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

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

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

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

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

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

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

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

Alternative 13: 40.0% accurate, 5.4× speedup?

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

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

\mathbf{elif}\;b \leq 3.4 \cdot 10^{-16}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot t_0\right)\\

\mathbf{elif}\;b \leq 8.4 \cdot 10^{+46}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t_0\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 7.50000000000000049e-41 or 3.4e-16 < b < 8.4e46

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \sin \color{blue}{\left(\frac{1 \cdot \pi}{\frac{180}{angle}}\right)}\right) \cdot \left(-2 \cdot {a}^{2}\right) \]
      12. *-lft-identity43.9%

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

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

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

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

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

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

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

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

    if 7.50000000000000049e-41 < b < 3.4e-16

    1. Initial program 84.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. *-commutative84.5%

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

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

        \[\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-neg84.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. unpow284.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. Simplified84.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 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.4e46 < b

    1. Initial program 46.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. *-commutative46.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*46.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. unpow246.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.8%

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

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

      \[\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 46.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. *-commutative46.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 7.5 \cdot 10^{-41}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{elif}\;b \leq 3.4 \cdot 10^{-16}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{elif}\;b \leq 8.4 \cdot 10^{+46}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 14: 40.1% accurate, 5.4× speedup?

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

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

\mathbf{elif}\;b \leq 8.5 \cdot 10^{-17}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot t_0\right)\\

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

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t_0\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < 9e-42

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(-2 \cdot {a}^{2}\right) \]
      4. metadata-eval44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9e-42 < b < 8.5e-17

    1. Initial program 84.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. *-commutative84.5%

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

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

        \[\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-neg84.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. unpow284.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. Simplified84.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 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.5e-17 < b < 4.9000000000000002e45

    1. Initial program 48.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. *-commutative48.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*48.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. unpow248.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-neg48.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. unpow248.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. Simplified48.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 56.1%

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

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

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

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

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

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

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

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

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

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

    if 4.9000000000000002e45 < b

    1. Initial program 46.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. *-commutative46.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*46.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. unpow246.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.8%

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

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

      \[\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 46.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. *-commutative46.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 9 \cdot 10^{-42}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-17}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{elif}\;b \leq 4.9 \cdot 10^{+45}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 15: 40.0% accurate, 5.4× speedup?

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

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

\mathbf{elif}\;b \leq 3.6 \cdot 10^{-16}:\\
\;\;\;\;t_0 \cdot \left(angle \cdot 0.011111111111111112\right)\\

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

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot t_0\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < 2.8000000000000002e-41

    1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(-2 \cdot {a}^{2}\right) \]
      4. metadata-eval44.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000002e-41 < b < 3.59999999999999983e-16

    1. Initial program 84.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. *-commutative84.5%

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

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

        \[\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-neg84.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. unpow284.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. Simplified84.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 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.59999999999999983e-16 < b < 8.5000000000000008e47

    1. Initial program 48.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. *-commutative48.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*48.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. unpow248.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-neg48.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. unpow248.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. Simplified48.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 56.1%

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

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

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

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

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

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

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

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

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

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

    if 8.5000000000000008e47 < b

    1. Initial program 46.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. *-commutative46.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*46.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. unpow246.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.8%

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

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

      \[\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 46.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. *-commutative46.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.8 \cdot 10^{-41}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{elif}\;b \leq 3.6 \cdot 10^{-16}:\\ \;\;\;\;\left(\pi \cdot \left(b \cdot b\right)\right) \cdot \left(angle \cdot 0.011111111111111112\right)\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{+47}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 16: 51.4% accurate, 5.4× speedup?

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

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

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


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

    1. Initial program 59.6%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. fma-neg60.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. unpow260.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. Simplified60.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 53.1%

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

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

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

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

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

    if 3e139 < b

    1. Initial program 31.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. *-commutative31.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*31.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. unpow231.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-neg45.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. unpow245.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. Simplified45.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 35.4%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 51.4% accurate, 5.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.3999999999999999e139

    1. Initial program 59.6%

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

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

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

        \[\leadsto \sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. fma-neg60.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. unpow260.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. Simplified60.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 53.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3999999999999999e139 < b

    1. Initial program 31.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. *-commutative31.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*31.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. unpow231.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-neg45.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. unpow245.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. Simplified45.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 35.4%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 53.6% accurate, 5.4× speedup?

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

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

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

    \[\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 56.2%

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

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

Alternative 19: 53.6% accurate, 5.4× speedup?

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

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

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

    \[\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 56.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 34.0% accurate, 5.7× speedup?

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

\\
-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\cos \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(-2 \cdot {a}^{2}\right) \]
    4. metadata-eval40.0%

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

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

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

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

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

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

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

      \[\leadsto \left(\cos \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \sin \color{blue}{\left(\frac{1 \cdot \pi}{\frac{180}{angle}}\right)}\right) \cdot \left(-2 \cdot {a}^{2}\right) \]
    12. *-lft-identity38.5%

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

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

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

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

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

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

      \[\leadsto -0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \pi\right) \]
  11. Simplified35.1%

    \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(\left(angle \cdot \left(a \cdot a\right)\right) \cdot \pi\right)} \]
  12. Final simplification35.1%

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

Reproduce

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