ab-angle->ABCF B

Percentage Accurate: 53.9% → 67.0%
Time: 34.3s
Alternatives: 15
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 15 alternatives:

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

Initial Program: 53.9% 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.0% accurate, 1.2× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot {e}^{\log t_0}\right)\right)\\


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

    1. Initial program 63.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. *-commutative63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \color{blue}{\mathsf{fma}\left(-a, a, a \cdot a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      2. distribute-rgt-out54.9%

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

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
    7. Simplified77.9%

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

    if 4.9999999999999997e38 < (/.f64 angle 180)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \color{blue}{\mathsf{fma}\left(-a, a, a \cdot a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      2. distribute-rgt-out15.1%

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right)\right) \]
      3. exp-prod36.8%

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

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

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

Alternative 2: 66.9% accurate, 2.8× speedup?

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

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

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


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

    1. Initial program 36.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. *-commutative36.4%

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

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

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

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

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

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

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

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

    if -5.00000000000000022e92 < (/.f64 angle 180)

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative49.8%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \color{blue}{\mathsf{fma}\left(-a, a, a \cdot a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      2. distribute-rgt-out49.7%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)} \]
      3. *-commutative49.7%

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\frac{\pi \cdot angle}{180}}\right)\right) \]
      4. associate-/l*71.7%

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

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

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

Alternative 3: 55.0% accurate, 2.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot b + \sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{0.005555555555555556}\right) \cdot \left(-a\right)\right) \]
      12. add-sqr-sqrt44.0%

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

        \[\leadsto \left(a + b\right) \cdot \left(\sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot b + \sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}}\right) \]
      14. sqr-neg60.0%

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

        \[\leadsto \left(a + b\right) \cdot \left(\sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot b + \sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)}\right) \]
      16. add-sqr-sqrt48.5%

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

      \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot b + \sin \left(\left(\left(2 \cdot angle\right) \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot a\right)} \]
    16. Step-by-step derivation
      1. distribute-lft-in48.5%

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\sin \left(\pi \cdot \left(0.011111111111111112 \cdot angle\right)\right) \cdot \color{blue}{\left(a + b\right)}\right) \]
    17. Simplified50.2%

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

    if 3.2000000000000001e-55 < a

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative40.7%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \color{blue}{\mathsf{fma}\left(-a, a, a \cdot a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      2. distribute-rgt-out40.7%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)} \]
      3. *-commutative40.7%

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

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

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

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

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

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

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

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

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

Alternative 4: 67.4% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.3% accurate, 2.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 53.7% accurate, 2.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000006e-55 < a

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative40.7%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \color{blue}{\mathsf{fma}\left(-a, a, a \cdot a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      2. distribute-rgt-out40.7%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)} \]
      3. *-commutative40.7%

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

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

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

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

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

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

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

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

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

Alternative 7: 67.2% accurate, 2.9× speedup?

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

\\
\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 53.0% accurate, 2.9× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0500000000000001e-55 < a

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative40.7%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \color{blue}{\mathsf{fma}\left(-a, a, a \cdot a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
      2. distribute-rgt-out40.7%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right)} \]
      3. *-commutative40.7%

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

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

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

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

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

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

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

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

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

Alternative 9: 54.1% accurate, 5.5× speedup?

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

\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

Alternative 10: 62.1% accurate, 5.5× speedup?

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

\\
\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.1% accurate, 5.5× speedup?

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

\\
\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.1% accurate, 5.5× speedup?

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

\\
\left(a + b\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 62.1% accurate, 5.5× speedup?

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

\\
\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 40.8% accurate, 5.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2999999999999999e25 < b

    1. Initial program 52.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. *-commutative52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 35.3% accurate, 5.7× speedup?

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

\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.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. *-commutative54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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