ab-angle->ABCF B

Percentage Accurate: 54.3% → 67.2%
Time: 32.6s
Alternatives: 14
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 14 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 67.2% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999991e68 < (/.f64 angle 180)

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 34.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.5% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
2 \cdot \left(\left(\left(b - a\right) \cdot \cos t_0\right) \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.4% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 65.8% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.89999999999999965e215 < a

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 53.4% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 5.4000000000000002e-94

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{{\color{blue}{\left(\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)}}^{2}} \]
    8. Taylor expanded in b around 0 42.5%

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

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

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

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

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

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

        \[\leadsto \color{blue}{b \cdot \left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)} \]
    10. Simplified47.4%

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

    if 5.4000000000000002e-94 < a

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 42.9% accurate, 5.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.5e-39

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{{\color{blue}{\left(\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)}}^{2}} \]
    8. Taylor expanded in angle around 0 37.5%

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

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

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

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

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

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

    if 3.5e-39 < a

    1. Initial program 44.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 42.8% accurate, 5.5× speedup?

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

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

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5e8 < b

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 55.1% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 10: 62.5% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 42.1% accurate, 5.6× speedup?

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

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

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6e8 < b

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{{\color{blue}{\left(\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)}}^{2}} \]
    8. Taylor expanded in angle around 0 45.5%

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

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

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

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

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

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

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

Alternative 12: 42.1% accurate, 5.6× speedup?

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

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

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2e8 < b

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 35.0% accurate, 5.7× speedup?

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

\\
-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)} \]
  14. Final simplification31.0%

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

Alternative 14: 35.0% accurate, 5.7× speedup?

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

\\
angle \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot -0.011111111111111112\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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