ab-angle->ABCF B

Percentage Accurate: 53.6% → 67.5%
Time: 30.9s
Alternatives: 15
Speedup: 5.0×

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.6% 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.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+27}:\\
\;\;\;\;\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)\\

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

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

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


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

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

        \[\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. *-commutative27.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)} \]
      3. prod-diff18.7%

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

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

        \[\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-rr17.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. *-commutative17.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-out17.8%

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

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

      \[\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. rem-cube-cbrt29.5%

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{{\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}}\right)\right) \]
    10. Step-by-step derivation
      1. rem-cube-cbrt25.2%

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \sqrt{{\left(\pi \cdot angle\right)}^{2} \cdot \color{blue}{3.08641975308642 \cdot 10^{-5}}}\right)\right) \]
    11. Applied egg-rr17.1%

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\sqrt{{\left(\pi \cdot angle\right)}^{2} \cdot 3.08641975308642 \cdot 10^{-5}}}\right)\right) \]
    12. Step-by-step derivation
      1. unpow217.1%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \sqrt{\color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)\right)} \cdot 3.08641975308642 \cdot 10^{-5}}\right)\right) \]
      2. metadata-eval17.1%

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

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

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

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

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

        \[\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) \]
      8. associate-*l*41.6%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left|\color{blue}{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right|\right)\right) \]
      9. *-commutative41.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) \]
    13. Simplified41.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) \]

    if -4.99999999999999979e27 < (/.f64 angle 180) < 5.00000000000000017e169

    1. Initial program 74.5%

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

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

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

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

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

        \[\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-squares78.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. Simplified78.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-squares74.5%

        \[\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. *-commutative74.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)} \]
      3. prod-diff58.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-neg58.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-in58.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-rr61.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. *-commutative61.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-out61.8%

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

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

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

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

    if 5.00000000000000017e169 < (/.f64 angle 180) < 9.99999999999999945e272

    1. Initial program 17.7%

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999945e272 < (/.f64 angle 180)

    1. Initial program 44.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. *-commutative44.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*44.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*44.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. unpow244.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. unpow244.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-squares44.1%

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

      \[\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-squares44.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. *-commutative44.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-diff4.1%

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

        \[\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-in4.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) + \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-rr4.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. *-commutative4.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-out4.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. *-commutative4.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. Simplified64.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. Taylor expanded in b around 0 48.0%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(-\color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot a}\right) \]
      3. distribute-rgt-neg-in48.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+27}:\\ \;\;\;\;\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)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+169}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+273}:\\ \;\;\;\;\left(2 \cdot \sin \left(\frac{angle \cdot \pi}{180}\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(a \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\ \end{array} \]

Alternative 2: 67.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+79}:\\
\;\;\;\;\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)\\

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


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

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

        \[\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. *-commutative27.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)} \]
      3. prod-diff18.6%

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

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

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

        \[\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-out17.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. *-commutative17.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. Simplified26.4%

      \[\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. rem-cube-cbrt27.4%

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{{\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}}\right)\right) \]
    10. Step-by-step derivation
      1. rem-cube-cbrt26.4%

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \sqrt{{\left(\pi \cdot angle\right)}^{2} \cdot \color{blue}{3.08641975308642 \cdot 10^{-5}}}\right)\right) \]
    11. Applied egg-rr14.2%

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \sqrt{\color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)\right)} \cdot 3.08641975308642 \cdot 10^{-5}}\right)\right) \]
      2. metadata-eval14.2%

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

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

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

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

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

        \[\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) \]
      8. associate-*l*43.6%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left|\color{blue}{angle \cdot \left(0.005555555555555556 \cdot \pi\right)}\right|\right)\right) \]
      9. *-commutative43.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) \]
    13. Simplified43.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) \]

    if -5e79 < (/.f64 angle 180)

    1. Initial program 65.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. *-commutative65.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*65.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*65.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. unpow265.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. unpow265.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-squares69.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. Simplified69.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-squares65.8%

        \[\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. *-commutative65.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)} \]
      3. prod-diff50.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-neg50.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-in50.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-rr53.3%

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

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

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

        \[\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. Simplified78.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)} \]
    8. Step-by-step derivation
      1. rem-cube-cbrt80.1%

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

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

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

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

Alternative 3: 66.8% accurate, 2.8× speedup?

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

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

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


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

    1. Initial program 59.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. *-commutative59.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*59.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*59.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. unpow259.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. unpow259.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-squares61.1%

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

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

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

        \[\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-diff44.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-neg44.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-in44.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-rr44.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. *-commutative44.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-out44.8%

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

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

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

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

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

        \[\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. clear-num67.4%

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

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

    if 1.89999999999999983e153 < b

    1. Initial program 40.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. *-commutative40.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*40.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*40.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. unpow240.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. unpow240.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-squares51.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. Simplified51.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-squares40.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. *-commutative40.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-diff40.1%

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

        \[\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-in40.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) + \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-rr51.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. *-commutative51.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-out51.8%

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

        \[\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. Simplified76.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)} \]
    8. Taylor expanded in angle around 0 80.6%

      \[\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) \]
    9. Step-by-step derivation
      1. associate-*r*80.7%

        \[\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) \]
    10. Simplified80.7%

      \[\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) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification68.8%

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

Alternative 4: 67.3% accurate, 2.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(a + b\right) \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 b < 6.89999999999999983e245

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

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

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

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

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

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

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

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

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

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

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

    if 6.89999999999999983e245 < b

    1. Initial program 43.2%

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

        \[\leadsto \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*43.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*43.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. unpow243.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. unpow243.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-squares64.7%

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \sqrt{{\left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)}^{2}} \]
    6. Applied egg-rr42.9%

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

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

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

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

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

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

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

Alternative 5: 66.9% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 7.6 \cdot 10^{+23}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \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 (<= b 7.6e+23)
   (* (+ a b) (* (- b a) (sin (* angle (* PI 0.011111111111111112)))))
   (* (+ a b) (* 0.011111111111111112 (* (- b a) (* angle PI))))))
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 7.6e+23) {
		tmp = (a + b) * ((b - a) * sin((angle * (((double) M_PI) * 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 (b <= 7.6e+23) {
		tmp = (a + b) * ((b - a) * Math.sin((angle * (Math.PI * 0.011111111111111112))));
	} else {
		tmp = (a + b) * (0.011111111111111112 * ((b - a) * (angle * Math.PI)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if b <= 7.6e+23:
		tmp = (a + b) * ((b - a) * math.sin((angle * (math.pi * 0.011111111111111112))))
	else:
		tmp = (a + b) * (0.011111111111111112 * ((b - a) * (angle * math.pi)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (b <= 7.6e+23)
		tmp = Float64(Float64(a + b) * Float64(Float64(b - a) * sin(Float64(angle * Float64(pi * 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 (b <= 7.6e+23)
		tmp = (a + b) * ((b - a) * sin((angle * (pi * 0.011111111111111112))));
	else
		tmp = (a + b) * (0.011111111111111112 * ((b - a) * (angle * pi)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[b, 7.6e+23], N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(angle * N[(Pi * 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}\;b \leq 7.6 \cdot 10^{+23}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \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 b < 7.5999999999999995e23

    1. Initial program 59.6%

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

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

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

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

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

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

        \[\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. *-commutative59.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)} \]
      3. prod-diff43.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-neg43.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-in43.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-rr44.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. *-commutative44.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-out44.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. *-commutative44.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. Simplified67.4%

      \[\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. rem-cube-cbrt67.5%

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

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

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

      \[\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) \]
    12. Step-by-step derivation
      1. *-commutative66.9%

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

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

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

    if 7.5999999999999995e23 < b

    1. Initial program 49.5%

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

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

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

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

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

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

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

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

        \[\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. *-commutative49.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)} \]
      3. prod-diff44.0%

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

        \[\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-in44.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) + \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-rr48.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. *-commutative48.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-out48.8%

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

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

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

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

        \[\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) \]
    10. Simplified68.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 7.6 \cdot 10^{+23}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \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 6: 53.7% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 8.99999999999999959e-122

    1. Initial program 57.7%

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

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

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

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

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

        \[\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.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. Simplified60.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. Step-by-step derivation
      1. difference-of-squares57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(-{1}^{0.3333333333333333} \cdot \left(a \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \]
      2. pow-base-150.6%

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

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

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

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

    if 8.99999999999999959e-122 < b

    1. Initial program 56.9%

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

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

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

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

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

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

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

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

        \[\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.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)} \]
      3. prod-diff45.1%

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

        \[\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-in45.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) + \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.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. *-commutative47.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-out47.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. *-commutative47.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. Simplified69.6%

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

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

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

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

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

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

Alternative 7: 53.4% accurate, 2.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 2.2 \cdot 10^{-62}:\\ \;\;\;\;\left(a + b\right) \cdot \left(a \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\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 (<= b 2.2e-62)
   (* (+ a b) (* a (- (sin (* PI (* angle 0.011111111111111112))))))
   (* (+ a b) (* 0.011111111111111112 (* (- b a) (* angle PI))))))
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 2.2e-62) {
		tmp = (a + b) * (a * -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 (b <= 2.2e-62) {
		tmp = (a + b) * (a * -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 b <= 2.2e-62:
		tmp = (a + b) * (a * -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 (b <= 2.2e-62)
		tmp = Float64(Float64(a + b) * Float64(a * Float64(-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 (b <= 2.2e-62)
		tmp = (a + b) * (a * -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[b, 2.2e-62], N[(N[(a + b), $MachinePrecision] * N[(a * (-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}\;b \leq 2.2 \cdot 10^{-62}:\\
\;\;\;\;\left(a + b\right) \cdot \left(a \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\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 b < 2.20000000000000017e-62

    1. Initial program 58.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. *-commutative58.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*58.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*58.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. unpow258.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. unpow258.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-squares60.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. Simplified60.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-squares58.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. *-commutative58.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-diff43.7%

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

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

        \[\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-rr44.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. *-commutative44.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-out44.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. *-commutative44.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. Simplified66.8%

      \[\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 b around 0 51.9%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(-\color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot a}\right) \]
      3. distribute-rgt-neg-in51.9%

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

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

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

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

    if 2.20000000000000017e-62 < b

    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-squares59.9%

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

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

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

        \[\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-in44.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) + \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. 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. Taylor expanded in angle around 0 71.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)} \]
    9. Step-by-step derivation
      1. associate-*r*71.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) \]
    10. Simplified71.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.2 \cdot 10^{-62}:\\ \;\;\;\;\left(a + b\right) \cdot \left(a \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\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 8: 49.3% accurate, 2.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 6.2000000000000005e-147

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \sin \color{blue}{\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)} \]
    9. Simplified42.6%

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

    if 6.2000000000000005e-147 < b

    1. Initial program 55.9%

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

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

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

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

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

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

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

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

        \[\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. *-commutative55.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)} \]
      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-rr46.3%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 54.1% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{if}\;angle \leq -3.05 \cdot 10^{+237} \lor \neg \left(angle \leq -2 \cdot 10^{+173}\right) \land \left(angle \leq -2.2 \cdot 10^{+69} \lor \neg \left(angle \leq -6600\right) \land angle \leq 5.4 \cdot 10^{+169}\right):\\ \;\;\;\;0.011111111111111112 \cdot t_0\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot -0.011111111111111112\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* angle (* PI (* (+ a b) (- b a))))))
   (if (or (<= angle -3.05e+237)
           (and (not (<= angle -2e+173))
                (or (<= angle -2.2e+69)
                    (and (not (<= angle -6600.0)) (<= angle 5.4e+169)))))
     (* 0.011111111111111112 t_0)
     (* t_0 -0.011111111111111112))))
double code(double a, double b, double angle) {
	double t_0 = angle * (((double) M_PI) * ((a + b) * (b - a)));
	double tmp;
	if ((angle <= -3.05e+237) || (!(angle <= -2e+173) && ((angle <= -2.2e+69) || (!(angle <= -6600.0) && (angle <= 5.4e+169))))) {
		tmp = 0.011111111111111112 * t_0;
	} else {
		tmp = t_0 * -0.011111111111111112;
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = angle * (Math.PI * ((a + b) * (b - a)));
	double tmp;
	if ((angle <= -3.05e+237) || (!(angle <= -2e+173) && ((angle <= -2.2e+69) || (!(angle <= -6600.0) && (angle <= 5.4e+169))))) {
		tmp = 0.011111111111111112 * t_0;
	} else {
		tmp = t_0 * -0.011111111111111112;
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = angle * (math.pi * ((a + b) * (b - a)))
	tmp = 0
	if (angle <= -3.05e+237) or (not (angle <= -2e+173) and ((angle <= -2.2e+69) or (not (angle <= -6600.0) and (angle <= 5.4e+169)))):
		tmp = 0.011111111111111112 * t_0
	else:
		tmp = t_0 * -0.011111111111111112
	return tmp
function code(a, b, angle)
	t_0 = Float64(angle * Float64(pi * Float64(Float64(a + b) * Float64(b - a))))
	tmp = 0.0
	if ((angle <= -3.05e+237) || (!(angle <= -2e+173) && ((angle <= -2.2e+69) || (!(angle <= -6600.0) && (angle <= 5.4e+169)))))
		tmp = Float64(0.011111111111111112 * t_0);
	else
		tmp = Float64(t_0 * -0.011111111111111112);
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = angle * (pi * ((a + b) * (b - a)));
	tmp = 0.0;
	if ((angle <= -3.05e+237) || (~((angle <= -2e+173)) && ((angle <= -2.2e+69) || (~((angle <= -6600.0)) && (angle <= 5.4e+169)))))
		tmp = 0.011111111111111112 * t_0;
	else
		tmp = t_0 * -0.011111111111111112;
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(Pi * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[angle, -3.05e+237], And[N[Not[LessEqual[angle, -2e+173]], $MachinePrecision], Or[LessEqual[angle, -2.2e+69], And[N[Not[LessEqual[angle, -6600.0]], $MachinePrecision], LessEqual[angle, 5.4e+169]]]]], N[(0.011111111111111112 * t$95$0), $MachinePrecision], N[(t$95$0 * -0.011111111111111112), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\
\mathbf{if}\;angle \leq -3.05 \cdot 10^{+237} \lor \neg \left(angle \leq -2 \cdot 10^{+173}\right) \land \left(angle \leq -2.2 \cdot 10^{+69} \lor \neg \left(angle \leq -6600\right) \land angle \leq 5.4 \cdot 10^{+169}\right):\\
\;\;\;\;0.011111111111111112 \cdot t_0\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot -0.011111111111111112\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -3.0500000000000001e237 or -2e173 < angle < -2.2000000000000002e69 or -6600 < angle < 5.39999999999999981e169

    1. Initial program 65.1%

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

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

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

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

    if -3.0500000000000001e237 < angle < -2e173 or -2.2000000000000002e69 < angle < -6600 or 5.39999999999999981e169 < angle

    1. Initial program 28.6%

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

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

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

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

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

        \[\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-squares30.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. Simplified30.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 11.3%

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    8. Step-by-step derivation
      1. +-commutative47.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq -3.05 \cdot 10^{+237} \lor \neg \left(angle \leq -2 \cdot 10^{+173}\right) \land \left(angle \leq -2.2 \cdot 10^{+69} \lor \neg \left(angle \leq -6600\right) \land angle \leq 5.4 \cdot 10^{+169}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot -0.011111111111111112\\ \end{array} \]

Alternative 10: 63.6% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\ t_1 := t_0 \cdot -0.011111111111111112\\ t_2 := 0.011111111111111112 \cdot t_0\\ \mathbf{if}\;angle \leq -3.05 \cdot 10^{+237}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;angle \leq -2 \cdot 10^{+173}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;angle \leq -2.2 \cdot 10^{+69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;angle \leq -6600 \lor \neg \left(angle \leq 5.4 \cdot 10^{+169}\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* angle (* PI (* (+ a b) (- b a)))))
        (t_1 (* t_0 -0.011111111111111112))
        (t_2 (* 0.011111111111111112 t_0)))
   (if (<= angle -3.05e+237)
     t_2
     (if (<= angle -2e+173)
       t_1
       (if (<= angle -2.2e+69)
         t_2
         (if (or (<= angle -6600.0) (not (<= angle 5.4e+169)))
           t_1
           (* 0.011111111111111112 (* (+ a b) (* (- b a) (* angle PI))))))))))
double code(double a, double b, double angle) {
	double t_0 = angle * (((double) M_PI) * ((a + b) * (b - a)));
	double t_1 = t_0 * -0.011111111111111112;
	double t_2 = 0.011111111111111112 * t_0;
	double tmp;
	if (angle <= -3.05e+237) {
		tmp = t_2;
	} else if (angle <= -2e+173) {
		tmp = t_1;
	} else if (angle <= -2.2e+69) {
		tmp = t_2;
	} else if ((angle <= -6600.0) || !(angle <= 5.4e+169)) {
		tmp = t_1;
	} else {
		tmp = 0.011111111111111112 * ((a + b) * ((b - a) * (angle * ((double) M_PI))));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = angle * (Math.PI * ((a + b) * (b - a)));
	double t_1 = t_0 * -0.011111111111111112;
	double t_2 = 0.011111111111111112 * t_0;
	double tmp;
	if (angle <= -3.05e+237) {
		tmp = t_2;
	} else if (angle <= -2e+173) {
		tmp = t_1;
	} else if (angle <= -2.2e+69) {
		tmp = t_2;
	} else if ((angle <= -6600.0) || !(angle <= 5.4e+169)) {
		tmp = t_1;
	} else {
		tmp = 0.011111111111111112 * ((a + b) * ((b - a) * (angle * Math.PI)));
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = angle * (math.pi * ((a + b) * (b - a)))
	t_1 = t_0 * -0.011111111111111112
	t_2 = 0.011111111111111112 * t_0
	tmp = 0
	if angle <= -3.05e+237:
		tmp = t_2
	elif angle <= -2e+173:
		tmp = t_1
	elif angle <= -2.2e+69:
		tmp = t_2
	elif (angle <= -6600.0) or not (angle <= 5.4e+169):
		tmp = t_1
	else:
		tmp = 0.011111111111111112 * ((a + b) * ((b - a) * (angle * math.pi)))
	return tmp
function code(a, b, angle)
	t_0 = Float64(angle * Float64(pi * Float64(Float64(a + b) * Float64(b - a))))
	t_1 = Float64(t_0 * -0.011111111111111112)
	t_2 = Float64(0.011111111111111112 * t_0)
	tmp = 0.0
	if (angle <= -3.05e+237)
		tmp = t_2;
	elseif (angle <= -2e+173)
		tmp = t_1;
	elseif (angle <= -2.2e+69)
		tmp = t_2;
	elseif ((angle <= -6600.0) || !(angle <= 5.4e+169))
		tmp = t_1;
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(angle * pi))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = angle * (pi * ((a + b) * (b - a)));
	t_1 = t_0 * -0.011111111111111112;
	t_2 = 0.011111111111111112 * t_0;
	tmp = 0.0;
	if (angle <= -3.05e+237)
		tmp = t_2;
	elseif (angle <= -2e+173)
		tmp = t_1;
	elseif (angle <= -2.2e+69)
		tmp = t_2;
	elseif ((angle <= -6600.0) || ~((angle <= 5.4e+169)))
		tmp = t_1;
	else
		tmp = 0.011111111111111112 * ((a + b) * ((b - a) * (angle * pi)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(Pi * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * -0.011111111111111112), $MachinePrecision]}, Block[{t$95$2 = N[(0.011111111111111112 * t$95$0), $MachinePrecision]}, If[LessEqual[angle, -3.05e+237], t$95$2, If[LessEqual[angle, -2e+173], t$95$1, If[LessEqual[angle, -2.2e+69], t$95$2, If[Or[LessEqual[angle, -6600.0], N[Not[LessEqual[angle, 5.4e+169]], $MachinePrecision]], t$95$1, N[(0.011111111111111112 * N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;angle \leq -2 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;angle \leq -2.2 \cdot 10^{+69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;angle \leq -6600 \lor \neg \left(angle \leq 5.4 \cdot 10^{+169}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < -3.0500000000000001e237 or -2e173 < angle < -2.2000000000000002e69

    1. Initial program 31.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. *-commutative31.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*31.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*31.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. unpow231.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. unpow231.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-squares31.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. Simplified31.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. Taylor expanded in angle around 0 43.7%

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

    if -3.0500000000000001e237 < angle < -2e173 or -2.2000000000000002e69 < angle < -6600 or 5.39999999999999981e169 < angle

    1. Initial program 28.6%

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

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

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

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

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

        \[\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-squares30.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. Simplified30.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 11.3%

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    8. Step-by-step derivation
      1. +-commutative47.5%

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

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

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

    if -6600 < angle < 5.39999999999999981e169

    1. Initial program 74.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. *-commutative74.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*74.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*74.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. unpow274.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. unpow274.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-squares78.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq -3.05 \cdot 10^{+237}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{elif}\;angle \leq -2 \cdot 10^{+173}:\\ \;\;\;\;\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot -0.011111111111111112\\ \mathbf{elif}\;angle \leq -2.2 \cdot 10^{+69}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{elif}\;angle \leq -6600 \lor \neg \left(angle \leq 5.4 \cdot 10^{+169}\right):\\ \;\;\;\;\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot -0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \pi\right)\right)\right)\\ \end{array} \]

Alternative 11: 63.8% accurate, 5.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\ t_1 := t_0 \cdot -0.011111111111111112\\ t_2 := 0.011111111111111112 \cdot t_0\\ \mathbf{if}\;angle \leq -3.05 \cdot 10^{+237}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;angle \leq -2 \cdot 10^{+173}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;angle \leq -2.2 \cdot 10^{+69}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;angle \leq -6600 \lor \neg \left(angle \leq 5.4 \cdot 10^{+169}\right):\\ \;\;\;\;t_1\\ \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
 (let* ((t_0 (* angle (* PI (* (+ a b) (- b a)))))
        (t_1 (* t_0 -0.011111111111111112))
        (t_2 (* 0.011111111111111112 t_0)))
   (if (<= angle -3.05e+237)
     t_2
     (if (<= angle -2e+173)
       t_1
       (if (<= angle -2.2e+69)
         t_2
         (if (or (<= angle -6600.0) (not (<= angle 5.4e+169)))
           t_1
           (* (+ a b) (* 0.011111111111111112 (* (- b a) (* angle PI))))))))))
double code(double a, double b, double angle) {
	double t_0 = angle * (((double) M_PI) * ((a + b) * (b - a)));
	double t_1 = t_0 * -0.011111111111111112;
	double t_2 = 0.011111111111111112 * t_0;
	double tmp;
	if (angle <= -3.05e+237) {
		tmp = t_2;
	} else if (angle <= -2e+173) {
		tmp = t_1;
	} else if (angle <= -2.2e+69) {
		tmp = t_2;
	} else if ((angle <= -6600.0) || !(angle <= 5.4e+169)) {
		tmp = t_1;
	} 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 t_0 = angle * (Math.PI * ((a + b) * (b - a)));
	double t_1 = t_0 * -0.011111111111111112;
	double t_2 = 0.011111111111111112 * t_0;
	double tmp;
	if (angle <= -3.05e+237) {
		tmp = t_2;
	} else if (angle <= -2e+173) {
		tmp = t_1;
	} else if (angle <= -2.2e+69) {
		tmp = t_2;
	} else if ((angle <= -6600.0) || !(angle <= 5.4e+169)) {
		tmp = t_1;
	} else {
		tmp = (a + b) * (0.011111111111111112 * ((b - a) * (angle * Math.PI)));
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = angle * (math.pi * ((a + b) * (b - a)))
	t_1 = t_0 * -0.011111111111111112
	t_2 = 0.011111111111111112 * t_0
	tmp = 0
	if angle <= -3.05e+237:
		tmp = t_2
	elif angle <= -2e+173:
		tmp = t_1
	elif angle <= -2.2e+69:
		tmp = t_2
	elif (angle <= -6600.0) or not (angle <= 5.4e+169):
		tmp = t_1
	else:
		tmp = (a + b) * (0.011111111111111112 * ((b - a) * (angle * math.pi)))
	return tmp
function code(a, b, angle)
	t_0 = Float64(angle * Float64(pi * Float64(Float64(a + b) * Float64(b - a))))
	t_1 = Float64(t_0 * -0.011111111111111112)
	t_2 = Float64(0.011111111111111112 * t_0)
	tmp = 0.0
	if (angle <= -3.05e+237)
		tmp = t_2;
	elseif (angle <= -2e+173)
		tmp = t_1;
	elseif (angle <= -2.2e+69)
		tmp = t_2;
	elseif ((angle <= -6600.0) || !(angle <= 5.4e+169))
		tmp = t_1;
	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)
	t_0 = angle * (pi * ((a + b) * (b - a)));
	t_1 = t_0 * -0.011111111111111112;
	t_2 = 0.011111111111111112 * t_0;
	tmp = 0.0;
	if (angle <= -3.05e+237)
		tmp = t_2;
	elseif (angle <= -2e+173)
		tmp = t_1;
	elseif (angle <= -2.2e+69)
		tmp = t_2;
	elseif ((angle <= -6600.0) || ~((angle <= 5.4e+169)))
		tmp = t_1;
	else
		tmp = (a + b) * (0.011111111111111112 * ((b - a) * (angle * pi)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(angle * N[(Pi * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * -0.011111111111111112), $MachinePrecision]}, Block[{t$95$2 = N[(0.011111111111111112 * t$95$0), $MachinePrecision]}, If[LessEqual[angle, -3.05e+237], t$95$2, If[LessEqual[angle, -2e+173], t$95$1, If[LessEqual[angle, -2.2e+69], t$95$2, If[Or[LessEqual[angle, -6600.0], N[Not[LessEqual[angle, 5.4e+169]], $MachinePrecision]], t$95$1, 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}
t_0 := angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\
t_1 := t_0 \cdot -0.011111111111111112\\
t_2 := 0.011111111111111112 \cdot t_0\\
\mathbf{if}\;angle \leq -3.05 \cdot 10^{+237}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;angle \leq -2 \cdot 10^{+173}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;angle \leq -2.2 \cdot 10^{+69}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;angle \leq -6600 \lor \neg \left(angle \leq 5.4 \cdot 10^{+169}\right):\\
\;\;\;\;t_1\\

\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 3 regimes
  2. if angle < -3.0500000000000001e237 or -2e173 < angle < -2.2000000000000002e69

    1. Initial program 31.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. *-commutative31.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*31.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*31.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. unpow231.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. unpow231.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-squares31.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. Simplified31.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. Taylor expanded in angle around 0 43.7%

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

    if -3.0500000000000001e237 < angle < -2e173 or -2.2000000000000002e69 < angle < -6600 or 5.39999999999999981e169 < angle

    1. Initial program 28.6%

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

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

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

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

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

        \[\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-squares30.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. Simplified30.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 11.3%

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    8. Step-by-step derivation
      1. +-commutative47.5%

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

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

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

    if -6600 < angle < 5.39999999999999981e169

    1. Initial program 74.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. *-commutative74.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*74.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*74.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. unpow274.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. unpow274.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-squares78.0%

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

      \[\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-squares74.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. *-commutative74.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-diff59.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-neg59.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-in59.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-rr62.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. *-commutative62.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-out62.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. *-commutative62.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. Simplified90.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. Taylor expanded in angle around 0 90.6%

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

        \[\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) \]
    10. Simplified90.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq -3.05 \cdot 10^{+237}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{elif}\;angle \leq -2 \cdot 10^{+173}:\\ \;\;\;\;\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot -0.011111111111111112\\ \mathbf{elif}\;angle \leq -2.2 \cdot 10^{+69}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{elif}\;angle \leq -6600 \lor \neg \left(angle \leq 5.4 \cdot 10^{+169}\right):\\ \;\;\;\;\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot -0.011111111111111112\\ \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 12: 40.6% accurate, 5.2× speedup?

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

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

\mathbf{elif}\;a \leq 5.8 \cdot 10^{+208} \lor \neg \left(a \leq 2.3 \cdot 10^{+233}\right):\\
\;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 8e4

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

    if 8e4 < a < 5.80000000000000017e208 or 2.30000000000000001e233 < a

    1. Initial program 53.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. *-commutative53.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*53.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*53.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. unpow253.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. unpow253.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-squares64.7%

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

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

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

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

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

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

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

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

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

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

    if 5.80000000000000017e208 < a < 2.30000000000000001e233

    1. Initial program 50.0%

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

        \[\leadsto \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.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*50.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. unpow250.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. unpow250.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-squares50.0%

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    8. Step-by-step derivation
      1. +-commutative62.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 80000:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{elif}\;a \leq 5.8 \cdot 10^{+208} \lor \neg \left(a \leq 2.3 \cdot 10^{+233}\right):\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot -0.011111111111111112\\ \end{array} \]

Alternative 13: 34.5% accurate, 5.6× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot t_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -7.2000000000000002e106

    1. Initial program 27.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. *-commutative27.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*27.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*27.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. unpow227.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. unpow227.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-squares27.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \sqrt{{\left(\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right)}^{2}} \]
    6. Applied egg-rr30.7%

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

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

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

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

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

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

    if -7.2000000000000002e106 < angle

    1. Initial program 64.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. *-commutative64.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*64.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*64.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. unpow264.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. unpow264.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-squares67.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. Simplified67.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. Taylor expanded in angle around 0 65.3%

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

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

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

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

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

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

Alternative 14: 40.9% accurate, 5.6× speedup?

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

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

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


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

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

    if 31000 < a

    1. Initial program 52.7%

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

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

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

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

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

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

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

      \[\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 62.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 inf 50.8%

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

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

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

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

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

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

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

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

Alternative 15: 34.2% 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 57.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. *-commutative57.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*57.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*57.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. unpow257.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. unpow257.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-squares60.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. Simplified60.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 58.1%

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

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

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

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

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

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

Reproduce

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