ab-angle->ABCF B

Percentage Accurate: 54.5% → 66.5%
Time: 35.8s
Alternatives: 11
Speedup: 5.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

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

Initial Program: 54.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: 66.5% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 58.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e285 < (pow.f64 b 2)

    1. Initial program 47.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. Taylor expanded in angle around 0 36.4%

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)}}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares45.7%

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*62.4%

        \[\leadsto \left(0.011111111111111112 \cdot \left({\color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot angle\right)\right)}}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+250}:\\
\;\;\;\;\left(\left(2 \cdot t_1\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos t_0\\

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


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

    1. Initial program 53.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. add-cube-cbrt53.6%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(\sqrt[3]{{b}^{2} - {a}^{2}} \cdot \sqrt[3]{{b}^{2} - {a}^{2}}\right) \cdot \sqrt[3]{{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. pow353.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{{\left(2 \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)}^{2}}} \cdot 1 \]
    7. Taylor expanded in angle around inf 49.4%

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

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

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

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

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

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

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

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

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

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

    if -1e297 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 3.9999999999999997e250

    1. Initial program 60.3%

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

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

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

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

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

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

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

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

    if 3.9999999999999997e250 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*62.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot 1 \]
    10. Simplified79.7%

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

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

Alternative 3: 66.5% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+285}:\\
\;\;\;\;\cos t_1 \cdot \left(\left(2 \cdot t_0\right) \cdot \sin t_1\right)\\

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


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

    1. Initial program 53.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. add-cube-cbrt53.6%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(\sqrt[3]{{b}^{2} - {a}^{2}} \cdot \sqrt[3]{{b}^{2} - {a}^{2}}\right) \cdot \sqrt[3]{{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. pow353.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{{\left(2 \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)}^{2}}} \cdot 1 \]
    7. Taylor expanded in angle around inf 49.4%

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

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

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

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

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

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

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

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

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

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

    if -1e297 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 2e285

    1. Initial program 60.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) \]

    if 2e285 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

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

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

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

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

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

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. pow137.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 64.0% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 61.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. Taylor expanded in angle around 0 57.5%

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

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

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

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

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. pow157.6%

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)}}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares60.0%

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-10 < (/.f64 angle 180)

    1. Initial program 42.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. add-cube-cbrt42.4%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(\sqrt[3]{{b}^{2} - {a}^{2}} \cdot \sqrt[3]{{b}^{2} - {a}^{2}}\right) \cdot \sqrt[3]{{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. pow342.5%

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

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

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

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

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

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

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

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

Alternative 5: 65.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 58.3%

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(\sqrt[3]{{b}^{2} - {a}^{2}} \cdot \sqrt[3]{{b}^{2} - {a}^{2}}\right) \cdot \sqrt[3]{{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. pow358.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{{\left(2 \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)}^{2}}} \cdot 1 \]
    7. Taylor expanded in angle around inf 54.8%

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

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

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

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

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

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

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

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

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

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

    if 2e285 < (pow.f64 b 2)

    1. Initial program 47.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. Taylor expanded in angle around 0 36.4%

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)}}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares45.7%

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*62.4%

        \[\leadsto \left(0.011111111111111112 \cdot \left({\color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot angle\right)\right)}}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied egg-rr62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 62.0% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*65.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot 1 \]
    10. Simplified73.0%

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

    if 2.1000000000000001e99 < angle

    1. Initial program 42.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. add-cube-cbrt42.9%

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(\sqrt[3]{{b}^{2} - {a}^{2}} \cdot \sqrt[3]{{b}^{2} - {a}^{2}}\right) \cdot \sqrt[3]{{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. pow342.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(-2 \cdot \left({a}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \cdot 1 \]
    6. Step-by-step derivation
      1. unpow231.3%

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

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

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

        \[\leadsto \left(\left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \left(\color{blue}{\left(angle \cdot 0.005555555555555556\right)} \cdot \pi\right)\right) \cdot 1 \]
      5. associate-*r*29.5%

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

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

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

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

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

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

        \[\leadsto \left(\sin \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556\right) \cdot \left(-2 \cdot \left(a \cdot a\right)\right)\right) \cdot 1 \]
      12. associate-*l*32.0%

        \[\leadsto \left(\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(-2 \cdot \left(a \cdot a\right)\right)\right) \cdot 1 \]
    7. Simplified32.0%

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

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

Alternative 7: 62.9% accurate, 5.4× speedup?

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

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

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


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

    1. Initial program 59.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. Taylor expanded in angle around 0 51.6%

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

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

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

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

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. pow151.6%

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\color{blue}{\left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)}}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. difference-of-squares53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999998e87 < angle

    1. Initial program 42.0%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. pow129.3%

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

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*21.8%

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

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

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

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

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

Alternative 8: 46.4% accurate, 5.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{-17} \lor \neg \left(b \leq 1.25 \cdot 10^{+100}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -8.99999999999999957e-17 or 1.25e100 < b

    1. Initial program 50.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. Taylor expanded in angle around 0 39.6%

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

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

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

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

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

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

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

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

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

    if -8.99999999999999957e-17 < b < 1.25e100

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*58.9%

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

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

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

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

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

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

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

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

Alternative 9: 50.9% accurate, 5.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{-16} \lor \neg \left(b \leq 1.15 \cdot 10^{+100}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(b \cdot angle\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.7e-16 or 1.14999999999999995e100 < b

    1. Initial program 50.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. Taylor expanded in angle around 0 39.6%

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

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

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

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

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

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

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

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

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

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

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

    if -1.7e-16 < b < 1.14999999999999995e100

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      4. associate-*l*58.9%

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

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

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

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

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

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

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

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

Alternative 10: 54.7% accurate, 5.5× speedup?

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

\\
0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 55.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. Taylor expanded in angle around 0 47.2%

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

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

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

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

    \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  5. Step-by-step derivation
    1. pow147.3%

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

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

      \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    4. associate-*l*57.7%

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

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

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

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

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

Alternative 11: 35.4% 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 55.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. Taylor expanded in angle around 0 47.2%

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

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

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

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

    \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  5. Step-by-step derivation
    1. pow147.3%

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

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

      \[\leadsto \left(0.011111111111111112 \cdot \left({\left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot angle\right)}^{1} \cdot \pi\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    4. associate-*l*57.7%

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

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

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

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

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

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

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

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

Reproduce

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