ab-angle->ABCF B

Percentage Accurate: 53.9% → 67.2%
Time: 34.7s
Alternatives: 18
Speedup: 23.3×

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 18 alternatives:

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

Initial Program: 53.9% accurate, 1.0× speedup?

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

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

Alternative 1: 67.2% accurate, 0.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sqrt[3]{angle\_m \cdot 0.005555555555555556}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{a\_m}^{2} \leq 5 \cdot 10^{+87}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)}^{3}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {t\_0}^{3}\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (cbrt (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= (pow a_m 2.0) 5e+87)
      (*
       (+ a_m b_m)
       (* (- b_m a_m) (sin (* 2.0 (* PI (pow (expm1 (log1p t_0)) 3.0))))))
      (* (+ a_m b_m) (* (- b_m a_m) (sin (* 2.0 (* PI (pow t_0 3.0))))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = cbrt((angle_m * 0.005555555555555556));
	double tmp;
	if (pow(a_m, 2.0) <= 5e+87) {
		tmp = (a_m + b_m) * ((b_m - a_m) * sin((2.0 * (((double) M_PI) * pow(expm1(log1p(t_0)), 3.0)))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * sin((2.0 * (((double) M_PI) * pow(t_0, 3.0)))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.cbrt((angle_m * 0.005555555555555556));
	double tmp;
	if (Math.pow(a_m, 2.0) <= 5e+87) {
		tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin((2.0 * (Math.PI * Math.pow(Math.expm1(Math.log1p(t_0)), 3.0)))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin((2.0 * (Math.PI * Math.pow(t_0, 3.0)))));
	}
	return angle_s * tmp;
}
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = cbrt(Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if ((a_m ^ 2.0) <= 5e+87)
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * Float64(pi * (expm1(log1p(t_0)) ^ 3.0))))));
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * Float64(pi * (t_0 ^ 3.0))))));
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[Power[N[(angle$95$m * 0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 5e+87], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[Power[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sqrt[3]{angle\_m \cdot 0.005555555555555556}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{a\_m}^{2} \leq 5 \cdot 10^{+87}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)}^{3}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {t\_0}^{3}\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a 2) < 4.9999999999999998e87

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative69.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) \]
      3. *-commutative69.8%

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{0.005555555555555556 \cdot angle}\right)\right)\right)}}^{3}\right)\right)\right) \]
      2. expm1-undefine28.5%

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt[3]{0.005555555555555556 \cdot angle}\right)} - 1\right)}}^{3}\right)\right)\right) \]
    15. Step-by-step derivation
      1. expm1-define60.4%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{0.005555555555555556 \cdot angle}\right)\right)\right)}}^{3}\right)\right)\right) \]
      2. *-commutative60.4%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{\color{blue}{angle \cdot 0.005555555555555556}}\right)\right)\right)}^{3}\right)\right)\right) \]
    16. Simplified60.4%

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

    if 4.9999999999999998e87 < (pow.f64 a 2)

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative68.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) \]
      3. *-commutative68.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{+87}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{angle \cdot 0.005555555555555556}\right)\right)\right)}^{3}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\sqrt[3]{angle \cdot 0.005555555555555556}\right)}^{3}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 67.7% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 3.6 \cdot 10^{+38}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\sqrt[3]{angle\_m \cdot 0.005555555555555556}\right)}^{3}\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= a_m 3.6e+38)
    (*
     (+ a_m b_m)
     (*
      (- b_m a_m)
      (sin (* 2.0 (expm1 (log1p (* angle_m (* PI 0.005555555555555556))))))))
    (*
     (+ a_m b_m)
     (*
      (- b_m a_m)
      (sin
       (* 2.0 (* PI (pow (cbrt (* angle_m 0.005555555555555556)) 3.0)))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (a_m <= 3.6e+38) {
		tmp = (a_m + b_m) * ((b_m - a_m) * sin((2.0 * expm1(log1p((angle_m * (((double) M_PI) * 0.005555555555555556)))))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * sin((2.0 * (((double) M_PI) * pow(cbrt((angle_m * 0.005555555555555556)), 3.0)))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (a_m <= 3.6e+38) {
		tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin((2.0 * Math.expm1(Math.log1p((angle_m * (Math.PI * 0.005555555555555556)))))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * Math.sin((2.0 * (Math.PI * Math.pow(Math.cbrt((angle_m * 0.005555555555555556)), 3.0)))));
	}
	return angle_s * tmp;
}
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (a_m <= 3.6e+38)
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * expm1(log1p(Float64(angle_m * Float64(pi * 0.005555555555555556))))))));
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * Float64(pi * (cbrt(Float64(angle_m * 0.005555555555555556)) ^ 3.0))))));
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a$95$m, 3.6e+38], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(Exp[N[Log[1 + N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[Power[N[Power[N[(angle$95$m * 0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 3.6 \cdot 10^{+38}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\

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


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

    1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative69.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) \]
      3. *-commutative69.1%

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)\right)}\right)\right) \]
    12. Applied egg-rr57.1%

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

    if 3.59999999999999969e38 < a

    1. Initial program 53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative70.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) \]
      3. *-commutative70.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.6 \cdot 10^{+38}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\sqrt[3]{angle \cdot 0.005555555555555556}\right)}^{3}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.7% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (+ a_m b_m)
   (*
    (- b_m a_m)
    (expm1 (log1p (sin (* PI (* angle_m 0.011111111111111112)))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * expm1(log1p(sin((((double) M_PI) * (angle_m * 0.011111111111111112)))))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * Math.expm1(Math.log1p(Math.sin((Math.PI * (angle_m * 0.011111111111111112)))))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * math.expm1(math.log1p(math.sin((math.pi * (angle_m * 0.011111111111111112)))))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * expm1(log1p(sin(Float64(pi * Float64(angle_m * 0.011111111111111112))))))))
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Exp[N[Log[1 + N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. +-commutative69.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) \]
    3. *-commutative69.4%

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

    \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
  11. Step-by-step derivation
    1. expm1-log1p-u69.4%

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} - 1\right)}\right) \]
  12. Applied egg-rr31.5%

    \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} - 1\right)}\right) \]
  13. Step-by-step derivation
    1. expm1-define69.2%

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

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

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

    \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(0.011111111111111112 \cdot angle\right)\right)\right)\right)}\right) \]
  15. Final simplification69.4%

    \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\right) \]
  16. Add Preprocessing

Alternative 4: 64.7% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{a\_m}^{2} \leq 10^{-94}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(b\_m \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(2 \cdot \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (pow a_m 2.0) 1e-94)
    (* (+ a_m b_m) (* b_m (sin (* 0.011111111111111112 (* PI angle_m)))))
    (*
     (+ a_m b_m)
     (* (- b_m a_m) (* 2.0 (* angle_m (* PI 0.005555555555555556))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (pow(a_m, 2.0) <= 1e-94) {
		tmp = (a_m + b_m) * (b_m * sin((0.011111111111111112 * (((double) M_PI) * angle_m))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (((double) M_PI) * 0.005555555555555556))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (Math.pow(a_m, 2.0) <= 1e-94) {
		tmp = (a_m + b_m) * (b_m * Math.sin((0.011111111111111112 * (Math.PI * angle_m))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (Math.PI * 0.005555555555555556))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if math.pow(a_m, 2.0) <= 1e-94:
		tmp = (a_m + b_m) * (b_m * math.sin((0.011111111111111112 * (math.pi * angle_m))))
	else:
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (math.pi * 0.005555555555555556))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if ((a_m ^ 2.0) <= 1e-94)
		tmp = Float64(Float64(a_m + b_m) * Float64(b_m * sin(Float64(0.011111111111111112 * Float64(pi * angle_m)))));
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * Float64(2.0 * Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if ((a_m ^ 2.0) <= 1e-94)
		tmp = (a_m + b_m) * (b_m * sin((0.011111111111111112 * (pi * angle_m))));
	else
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (pi * 0.005555555555555556))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 1e-94], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a 2) < 9.9999999999999996e-95

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e-95 < (pow.f64 a 2)

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 64.8% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{a\_m}^{2} \leq 10^{-94}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(b\_m \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(2 \cdot \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (pow a_m 2.0) 1e-94)
    (* (+ a_m b_m) (* b_m (sin (* PI (* angle_m 0.011111111111111112)))))
    (*
     (+ a_m b_m)
     (* (- b_m a_m) (* 2.0 (* angle_m (* PI 0.005555555555555556))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (pow(a_m, 2.0) <= 1e-94) {
		tmp = (a_m + b_m) * (b_m * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (((double) M_PI) * 0.005555555555555556))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (Math.pow(a_m, 2.0) <= 1e-94) {
		tmp = (a_m + b_m) * (b_m * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (Math.PI * 0.005555555555555556))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if math.pow(a_m, 2.0) <= 1e-94:
		tmp = (a_m + b_m) * (b_m * math.sin((math.pi * (angle_m * 0.011111111111111112))))
	else:
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (math.pi * 0.005555555555555556))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if ((a_m ^ 2.0) <= 1e-94)
		tmp = Float64(Float64(a_m + b_m) * Float64(b_m * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * Float64(2.0 * Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if ((a_m ^ 2.0) <= 1e-94)
		tmp = (a_m + b_m) * (b_m * sin((pi * (angle_m * 0.011111111111111112))));
	else
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (pi * 0.005555555555555556))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 1e-94], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a 2) < 9.9999999999999996e-95

    1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e-95 < (pow.f64 a 2)

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 64.1% accurate, 3.4× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2650000000:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(2 \cdot \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 1.9 \cdot 10^{+143}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left|\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m - a\_m\right) \cdot angle\_m\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2650000000.0)
    (*
     (+ a_m b_m)
     (* (- b_m a_m) (* 2.0 (* angle_m (* PI 0.005555555555555556)))))
    (if (<= angle_m 1.9e+143)
      (*
       (+ a_m b_m)
       (fabs (* (* PI 0.011111111111111112) (* (- b_m a_m) angle_m))))
      (*
       0.011111111111111112
       (* angle_m (* PI (* (+ a_m b_m) (- b_m a_m)))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 2650000000.0) {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (((double) M_PI) * 0.005555555555555556))));
	} else if (angle_m <= 1.9e+143) {
		tmp = (a_m + b_m) * fabs(((((double) M_PI) * 0.011111111111111112) * ((b_m - a_m) * angle_m)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 2650000000.0) {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (Math.PI * 0.005555555555555556))));
	} else if (angle_m <= 1.9e+143) {
		tmp = (a_m + b_m) * Math.abs(((Math.PI * 0.011111111111111112) * ((b_m - a_m) * angle_m)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 2650000000.0:
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (math.pi * 0.005555555555555556))))
	elif angle_m <= 1.9e+143:
		tmp = (a_m + b_m) * math.fabs(((math.pi * 0.011111111111111112) * ((b_m - a_m) * angle_m)))
	else:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((a_m + b_m) * (b_m - a_m))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 2650000000.0)
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * Float64(2.0 * Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	elseif (angle_m <= 1.9e+143)
		tmp = Float64(Float64(a_m + b_m) * abs(Float64(Float64(pi * 0.011111111111111112) * Float64(Float64(b_m - a_m) * angle_m))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 2650000000.0)
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (pi * 0.005555555555555556))));
	elseif (angle_m <= 1.9e+143)
		tmp = (a_m + b_m) * abs(((pi * 0.011111111111111112) * ((b_m - a_m) * angle_m)));
	else
		tmp = 0.011111111111111112 * (angle_m * (pi * ((a_m + b_m) * (b_m - a_m))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2650000000.0], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 1.9e+143], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[Abs[N[(N[(Pi * 0.011111111111111112), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;angle\_m \leq 1.9 \cdot 10^{+143}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left|\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m - a\_m\right) \cdot angle\_m\right)\right|\\

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


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

    1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative81.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) \]
      3. *-commutative81.1%

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

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

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

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

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

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

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

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

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

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

    if 2.65e9 < angle < 1.9e143

    1. Initial program 20.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    12. Step-by-step derivation
      1. add-sqr-sqrt11.4%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(a + b\right) \cdot \color{blue}{\sqrt{{\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)}^{2} \cdot 0.0001234567901234568}} \]
    14. Step-by-step derivation
      1. *-commutative30.2%

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

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

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

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

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

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

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

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

    if 1.9e143 < angle

    1. Initial program 24.9%

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

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

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

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

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

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

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

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

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

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2650000000:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{elif}\;angle \leq 1.9 \cdot 10^{+143}:\\ \;\;\;\;\left(a + b\right) \cdot \left|\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot angle\right)\right|\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.7% accurate, 3.6× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (+ a_m b_m)
   (* (- b_m a_m) (sin (* 2.0 (* PI (* angle_m 0.005555555555555556))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * sin((2.0 * (((double) M_PI) * (angle_m * 0.005555555555555556))))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * Math.sin((2.0 * (Math.PI * (angle_m * 0.005555555555555556))))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * math.sin((2.0 * (math.pi * (angle_m * 0.005555555555555556))))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * Float64(pi * Float64(angle_m * 0.005555555555555556)))))))
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b_m, angle_m)
	tmp = angle_s * ((a_m + b_m) * ((b_m - a_m) * sin((2.0 * (pi * (angle_m * 0.005555555555555556))))));
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. +-commutative69.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) \]
    3. *-commutative69.4%

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

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

    \[\leadsto \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) \]
  12. Add Preprocessing

Alternative 8: 67.3% accurate, 3.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (+ a_m b_m)
   (* (- b_m a_m) (sin (* 0.011111111111111112 (* PI angle_m)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * sin((0.011111111111111112 * (((double) M_PI) * angle_m)))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * Math.sin((0.011111111111111112 * (Math.PI * angle_m)))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * ((a_m + b_m) * ((b_m - a_m) * math.sin((0.011111111111111112 * (math.pi * angle_m)))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * sin(Float64(0.011111111111111112 * Float64(pi * angle_m))))))
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b_m, angle_m)
	tmp = angle_s * ((a_m + b_m) * ((b_m - a_m) * sin((0.011111111111111112 * (pi * angle_m)))));
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. +-commutative69.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) \]
    3. *-commutative69.4%

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

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

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

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

Alternative 9: 53.9% accurate, 16.1× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 1.22 \cdot 10^{+30}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;a\_m \leq 7 \cdot 10^{+109}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a\_m \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 1.65 \cdot 10^{+116}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (+ a_m b_m) (* 0.011111111111111112 (* angle_m (* b_m PI))))))
   (*
    angle_s
    (if (<= a_m 1.22e+30)
      t_0
      (if (<= a_m 7e+109)
        (* (+ a_m b_m) (* -0.011111111111111112 (* PI (* a_m angle_m))))
        (if (<= a_m 1.65e+116)
          t_0
          (*
           (+ a_m b_m)
           (* -0.011111111111111112 (* a_m (* PI angle_m))))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * ((double) M_PI))));
	double tmp;
	if (a_m <= 1.22e+30) {
		tmp = t_0;
	} else if (a_m <= 7e+109) {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (((double) M_PI) * (a_m * angle_m)));
	} else if (a_m <= 1.65e+116) {
		tmp = t_0;
	} else {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (((double) M_PI) * angle_m)));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * Math.PI)));
	double tmp;
	if (a_m <= 1.22e+30) {
		tmp = t_0;
	} else if (a_m <= 7e+109) {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (Math.PI * (a_m * angle_m)));
	} else if (a_m <= 1.65e+116) {
		tmp = t_0;
	} else {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (Math.PI * angle_m)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * math.pi)))
	tmp = 0
	if a_m <= 1.22e+30:
		tmp = t_0
	elif a_m <= 7e+109:
		tmp = (a_m + b_m) * (-0.011111111111111112 * (math.pi * (a_m * angle_m)))
	elif a_m <= 1.65e+116:
		tmp = t_0
	else:
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (math.pi * angle_m)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(b_m * pi))))
	tmp = 0.0
	if (a_m <= 1.22e+30)
		tmp = t_0;
	elseif (a_m <= 7e+109)
		tmp = Float64(Float64(a_m + b_m) * Float64(-0.011111111111111112 * Float64(pi * Float64(a_m * angle_m))));
	elseif (a_m <= 1.65e+116)
		tmp = t_0;
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(-0.011111111111111112 * Float64(a_m * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	t_0 = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * pi)));
	tmp = 0.0;
	if (a_m <= 1.22e+30)
		tmp = t_0;
	elseif (a_m <= 7e+109)
		tmp = (a_m + b_m) * (-0.011111111111111112 * (pi * (a_m * angle_m)));
	elseif (a_m <= 1.65e+116)
		tmp = t_0;
	else
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (pi * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a$95$m, 1.22e+30], t$95$0, If[LessEqual[a$95$m, 7e+109], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(-0.011111111111111112 * N[(Pi * N[(a$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 1.65e+116], t$95$0, N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 1.22 \cdot 10^{+30}:\\
\;\;\;\;t\_0\\

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

\mathbf{elif}\;a\_m \leq 1.65 \cdot 10^{+116}:\\
\;\;\;\;t\_0\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.22e30 or 6.99999999999999966e109 < a < 1.6499999999999999e116

    1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 61.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)} \]
    12. Taylor expanded in b around inf 45.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{0} \cdot a\right) + angle \cdot \left(b \cdot \pi\right)\right)\right) \]
      16. mul0-lft44.7%

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot 0 + \color{blue}{\left(angle \cdot \pi\right) \cdot b}\right)\right) \]
    14. Simplified45.2%

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

    if 1.22e30 < a < 6.99999999999999966e109

    1. Initial program 71.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. associate-*l*71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 64.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)} \]
    12. Taylor expanded in b around 0 51.7%

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

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

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

    if 1.6499999999999999e116 < a

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    12. Taylor expanded in b around 0 60.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.22 \cdot 10^{+30}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+109}:\\ \;\;\;\;\left(a + b\right) \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+116}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 53.9% accurate, 16.1× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 6 \cdot 10^{+29}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b\_m \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 6.5 \cdot 10^{+109}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a\_m \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 1.35 \cdot 10^{+116}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= a_m 6e+29)
    (* (+ a_m b_m) (* 0.011111111111111112 (* PI (* b_m angle_m))))
    (if (<= a_m 6.5e+109)
      (* (+ a_m b_m) (* -0.011111111111111112 (* PI (* a_m angle_m))))
      (if (<= a_m 1.35e+116)
        (* (+ a_m b_m) (* 0.011111111111111112 (* angle_m (* b_m PI))))
        (* (+ a_m b_m) (* -0.011111111111111112 (* a_m (* PI angle_m)))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (a_m <= 6e+29) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (((double) M_PI) * (b_m * angle_m)));
	} else if (a_m <= 6.5e+109) {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (((double) M_PI) * (a_m * angle_m)));
	} else if (a_m <= 1.35e+116) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * ((double) M_PI))));
	} else {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (((double) M_PI) * angle_m)));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (a_m <= 6e+29) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (Math.PI * (b_m * angle_m)));
	} else if (a_m <= 6.5e+109) {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (Math.PI * (a_m * angle_m)));
	} else if (a_m <= 1.35e+116) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * Math.PI)));
	} else {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (Math.PI * angle_m)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if a_m <= 6e+29:
		tmp = (a_m + b_m) * (0.011111111111111112 * (math.pi * (b_m * angle_m)))
	elif a_m <= 6.5e+109:
		tmp = (a_m + b_m) * (-0.011111111111111112 * (math.pi * (a_m * angle_m)))
	elif a_m <= 1.35e+116:
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * math.pi)))
	else:
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (math.pi * angle_m)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (a_m <= 6e+29)
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(pi * Float64(b_m * angle_m))));
	elseif (a_m <= 6.5e+109)
		tmp = Float64(Float64(a_m + b_m) * Float64(-0.011111111111111112 * Float64(pi * Float64(a_m * angle_m))));
	elseif (a_m <= 1.35e+116)
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(b_m * pi))));
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(-0.011111111111111112 * Float64(a_m * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (a_m <= 6e+29)
		tmp = (a_m + b_m) * (0.011111111111111112 * (pi * (b_m * angle_m)));
	elseif (a_m <= 6.5e+109)
		tmp = (a_m + b_m) * (-0.011111111111111112 * (pi * (a_m * angle_m)));
	elseif (a_m <= 1.35e+116)
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * pi)));
	else
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (pi * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a$95$m, 6e+29], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(b$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 6.5e+109], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(-0.011111111111111112 * N[(Pi * N[(a$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 1.35e+116], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 6 \cdot 10^{+29}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b\_m \cdot angle\_m\right)\right)\right)\\

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

\mathbf{elif}\;a\_m \leq 1.35 \cdot 10^{+116}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\

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


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

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative68.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) \]
      3. *-commutative68.8%

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 61.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)} \]
    12. Taylor expanded in b around inf 45.2%

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

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

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

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

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

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

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

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

    if 5.9999999999999998e29 < a < 6.5e109

    1. Initial program 71.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. associate-*l*71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 64.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)} \]
    12. Taylor expanded in b around 0 51.7%

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

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

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

    if 6.5e109 < a < 1.35e116

    1. Initial program 2.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative61.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) \]
      3. *-commutative61.4%

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 50.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)} \]
    12. Taylor expanded in b around inf 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{0} \cdot a\right) + angle \cdot \left(b \cdot \pi\right)\right)\right) \]
      16. mul0-lft50.4%

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

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

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

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

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

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

    if 1.35e116 < a

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    12. Taylor expanded in b around 0 60.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 6 \cdot 10^{+29}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\ \mathbf{elif}\;a \leq 6.5 \cdot 10^{+109}:\\ \;\;\;\;\left(a + b\right) \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+116}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.9% accurate, 16.1× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 6.1 \cdot 10^{+29}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b\_m \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 7 \cdot 10^{+109}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(-a\_m\right)\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 1.35 \cdot 10^{+116}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= a_m 6.1e+29)
    (* (+ a_m b_m) (* 0.011111111111111112 (* PI (* b_m angle_m))))
    (if (<= a_m 7e+109)
      (* (+ a_m b_m) (* 0.011111111111111112 (* angle_m (* PI (- a_m)))))
      (if (<= a_m 1.35e+116)
        (* (+ a_m b_m) (* 0.011111111111111112 (* angle_m (* b_m PI))))
        (* (+ a_m b_m) (* -0.011111111111111112 (* a_m (* PI angle_m)))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (a_m <= 6.1e+29) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (((double) M_PI) * (b_m * angle_m)));
	} else if (a_m <= 7e+109) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (((double) M_PI) * -a_m)));
	} else if (a_m <= 1.35e+116) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * ((double) M_PI))));
	} else {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (((double) M_PI) * angle_m)));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (a_m <= 6.1e+29) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (Math.PI * (b_m * angle_m)));
	} else if (a_m <= 7e+109) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (Math.PI * -a_m)));
	} else if (a_m <= 1.35e+116) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * Math.PI)));
	} else {
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (Math.PI * angle_m)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if a_m <= 6.1e+29:
		tmp = (a_m + b_m) * (0.011111111111111112 * (math.pi * (b_m * angle_m)))
	elif a_m <= 7e+109:
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (math.pi * -a_m)))
	elif a_m <= 1.35e+116:
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * math.pi)))
	else:
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (math.pi * angle_m)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (a_m <= 6.1e+29)
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(pi * Float64(b_m * angle_m))));
	elseif (a_m <= 7e+109)
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(-a_m)))));
	elseif (a_m <= 1.35e+116)
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(b_m * pi))));
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(-0.011111111111111112 * Float64(a_m * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (a_m <= 6.1e+29)
		tmp = (a_m + b_m) * (0.011111111111111112 * (pi * (b_m * angle_m)));
	elseif (a_m <= 7e+109)
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (pi * -a_m)));
	elseif (a_m <= 1.35e+116)
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * (b_m * pi)));
	else
		tmp = (a_m + b_m) * (-0.011111111111111112 * (a_m * (pi * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[a$95$m, 6.1e+29], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(b$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 7e+109], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * (-a$95$m)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 1.35e+116], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 6.1 \cdot 10^{+29}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b\_m \cdot angle\_m\right)\right)\right)\\

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

\mathbf{elif}\;a\_m \leq 1.35 \cdot 10^{+116}:\\
\;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\

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


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

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative68.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) \]
      3. *-commutative68.8%

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 61.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)} \]
    12. Taylor expanded in b around inf 45.2%

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

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

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

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

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

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

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

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

    if 6.0999999999999998e29 < a < 6.99999999999999966e109

    1. Initial program 71.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. associate-*l*71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 64.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)} \]
    12. Taylor expanded in b around 0 51.8%

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

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

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

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

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

    if 6.99999999999999966e109 < a < 1.35e116

    1. Initial program 2.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative61.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) \]
      3. *-commutative61.4%

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 50.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)} \]
    12. Taylor expanded in b around inf 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{0} \cdot a\right) + angle \cdot \left(b \cdot \pi\right)\right)\right) \]
      16. mul0-lft50.4%

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

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

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

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

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

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

    if 1.35e116 < a

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    12. Taylor expanded in b around 0 60.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 6.1 \cdot 10^{+29}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+109}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(-a\right)\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.35 \cdot 10^{+116}:\\ \;\;\;\;\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.7% accurate, 20.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5 \cdot 10^{+14}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(2 \cdot \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 5e+14)
    (*
     (+ a_m b_m)
     (* (- b_m a_m) (* 2.0 (* angle_m (* PI 0.005555555555555556)))))
    (* angle_m (* PI (* 0.011111111111111112 (* (+ a_m b_m) (- b_m a_m))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5e+14) {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (((double) M_PI) * 0.005555555555555556))));
	} else {
		tmp = angle_m * (((double) M_PI) * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5e+14) {
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (Math.PI * 0.005555555555555556))));
	} else {
		tmp = angle_m * (Math.PI * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 5e+14:
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (math.pi * 0.005555555555555556))))
	else:
		tmp = angle_m * (math.pi * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 5e+14)
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(b_m - a_m) * Float64(2.0 * Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	else
		tmp = Float64(angle_m * Float64(pi * Float64(0.011111111111111112 * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 5e+14)
		tmp = (a_m + b_m) * ((b_m - a_m) * (2.0 * (angle_m * (pi * 0.005555555555555556))));
	else
		tmp = angle_m * (pi * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5e+14], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(2.0 * N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle$95$m * N[(Pi * N[(0.011111111111111112 * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative81.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) \]
      3. *-commutative81.4%

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

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

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

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

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

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

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

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

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

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

    if 5e14 < angle

    1. Initial program 18.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. Add Preprocessing
    3. Taylor expanded in angle around 0 20.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 58.2% accurate, 23.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 2.4 \cdot 10^{+148}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b\_m \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b_m 2.4e+148)
    (* 0.011111111111111112 (* angle_m (* PI (* (+ a_m b_m) (- b_m a_m)))))
    (* (+ a_m b_m) (* 0.011111111111111112 (* PI (* b_m angle_m)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 2.4e+148) {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((a_m + b_m) * (b_m - a_m))));
	} else {
		tmp = (a_m + b_m) * (0.011111111111111112 * (((double) M_PI) * (b_m * angle_m)));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 2.4e+148) {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((a_m + b_m) * (b_m - a_m))));
	} else {
		tmp = (a_m + b_m) * (0.011111111111111112 * (Math.PI * (b_m * angle_m)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if b_m <= 2.4e+148:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((a_m + b_m) * (b_m - a_m))))
	else:
		tmp = (a_m + b_m) * (0.011111111111111112 * (math.pi * (b_m * angle_m)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (b_m <= 2.4e+148)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))));
	else
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(pi * Float64(b_m * angle_m))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (b_m <= 2.4e+148)
		tmp = 0.011111111111111112 * (angle_m * (pi * ((a_m + b_m) * (b_m - a_m))));
	else
		tmp = (a_m + b_m) * (0.011111111111111112 * (pi * (b_m * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 2.4e+148], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(b$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    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. associate-*l*59.4%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 56.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)} \]

    if 2.39999999999999995e148 < b

    1. Initial program 44.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative72.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) \]
      3. *-commutative72.6%

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

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

      \[\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)} \]
    12. Taylor expanded in b around inf 63.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.4 \cdot 10^{+148}:\\ \;\;\;\;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(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot angle\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 64.6% accurate, 23.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 0.00055:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 0.00055)
    (* (+ a_m b_m) (* 0.011111111111111112 (* angle_m (* (- b_m a_m) PI))))
    (* 0.011111111111111112 (* angle_m (* PI (* (+ a_m b_m) (- b_m a_m))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 0.00055) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 0.00055) {
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 0.00055:
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((a_m + b_m) * (b_m - a_m))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 0.00055)
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m - a_m) * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 0.00055)
		tmp = (a_m + b_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * pi)));
	else
		tmp = 0.011111111111111112 * (angle_m * (pi * ((a_m + b_m) * (b_m - a_m))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 0.00055], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 5.50000000000000033e-4

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.50000000000000033e-4 < angle

    1. Initial program 25.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 22.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.4%

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

Alternative 15: 64.6% accurate, 23.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 0.0052:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\left(b\_m - a\_m\right) \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 0.0052)
    (* (+ a_m b_m) (* 0.011111111111111112 (* (- b_m a_m) (* PI angle_m))))
    (* 0.011111111111111112 (* angle_m (* PI (* (+ a_m b_m) (- b_m a_m))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 0.0052) {
		tmp = (a_m + b_m) * (0.011111111111111112 * ((b_m - a_m) * (((double) M_PI) * angle_m)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 0.0052) {
		tmp = (a_m + b_m) * (0.011111111111111112 * ((b_m - a_m) * (Math.PI * angle_m)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 0.0052:
		tmp = (a_m + b_m) * (0.011111111111111112 * ((b_m - a_m) * (math.pi * angle_m)))
	else:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((a_m + b_m) * (b_m - a_m))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 0.0052)
		tmp = Float64(Float64(a_m + b_m) * Float64(0.011111111111111112 * Float64(Float64(b_m - a_m) * Float64(pi * angle_m))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 0.0052)
		tmp = (a_m + b_m) * (0.011111111111111112 * ((b_m - a_m) * (pi * angle_m)));
	else
		tmp = 0.011111111111111112 * (angle_m * (pi * ((a_m + b_m) * (b_m - a_m))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 0.0052], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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) \]
    13. Simplified74.2%

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

    if 0.0051999999999999998 < angle

    1. Initial program 25.9%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 22.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.4%

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

Alternative 16: 64.6% accurate, 23.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 10^{-8}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m - a\_m\right) \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 1e-8)
    (* (+ a_m b_m) (* (* PI 0.011111111111111112) (* (- b_m a_m) angle_m)))
    (* 0.011111111111111112 (* angle_m (* PI (* (+ a_m b_m) (- b_m a_m))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 1e-8) {
		tmp = (a_m + b_m) * ((((double) M_PI) * 0.011111111111111112) * ((b_m - a_m) * angle_m));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 1e-8) {
		tmp = (a_m + b_m) * ((Math.PI * 0.011111111111111112) * ((b_m - a_m) * angle_m));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 1e-8:
		tmp = (a_m + b_m) * ((math.pi * 0.011111111111111112) * ((b_m - a_m) * angle_m))
	else:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((a_m + b_m) * (b_m - a_m))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 1e-8)
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(pi * 0.011111111111111112) * Float64(Float64(b_m - a_m) * angle_m)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 1e-8)
		tmp = (a_m + b_m) * ((pi * 0.011111111111111112) * ((b_m - a_m) * angle_m));
	else
		tmp = 0.011111111111111112 * (angle_m * (pi * ((a_m + b_m) * (b_m - a_m))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1e-8], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(Pi * 0.011111111111111112), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 74.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)} \]
    12. Step-by-step derivation
      1. pow174.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)}^{1}} \]
      2. associate-*r*74.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)}^{1} \]
      3. *-commutative74.1%

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

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

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

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

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

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

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

    if 1e-8 < angle

    1. Initial program 27.1%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 24.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.4%

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

Alternative 17: 64.7% accurate, 23.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 6 \cdot 10^{-8}:\\ \;\;\;\;\left(a\_m + b\_m\right) \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m - a\_m\right) \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 6e-8)
    (* (+ a_m b_m) (* (* PI 0.011111111111111112) (* (- b_m a_m) angle_m)))
    (* angle_m (* PI (* 0.011111111111111112 (* (+ a_m b_m) (- b_m a_m))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 6e-8) {
		tmp = (a_m + b_m) * ((((double) M_PI) * 0.011111111111111112) * ((b_m - a_m) * angle_m));
	} else {
		tmp = angle_m * (((double) M_PI) * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 6e-8) {
		tmp = (a_m + b_m) * ((Math.PI * 0.011111111111111112) * ((b_m - a_m) * angle_m));
	} else {
		tmp = angle_m * (Math.PI * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	tmp = 0
	if angle_m <= 6e-8:
		tmp = (a_m + b_m) * ((math.pi * 0.011111111111111112) * ((b_m - a_m) * angle_m))
	else:
		tmp = angle_m * (math.pi * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 6e-8)
		tmp = Float64(Float64(a_m + b_m) * Float64(Float64(pi * 0.011111111111111112) * Float64(Float64(b_m - a_m) * angle_m)));
	else
		tmp = Float64(angle_m * Float64(pi * Float64(0.011111111111111112 * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0;
	if (angle_m <= 6e-8)
		tmp = (a_m + b_m) * ((pi * 0.011111111111111112) * ((b_m - a_m) * angle_m));
	else
		tmp = angle_m * (pi * (0.011111111111111112 * ((a_m + b_m) * (b_m - a_m))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 6e-8], N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(N[(Pi * 0.011111111111111112), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle$95$m * N[(Pi * N[(0.011111111111111112 * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 5.99999999999999946e-8

    1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right)\right)}^{1} \]
      5. metadata-eval81.2%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)\right)\right)}^{1} \]
    8. Applied egg-rr81.2%

      \[\leadsto \color{blue}{{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)}^{1}} \]
    9. Step-by-step derivation
      1. unpow181.2%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. +-commutative81.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) \]
      3. *-commutative81.2%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)\right) \]
    10. Simplified81.2%

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
    11. Taylor expanded in angle around 0 74.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)} \]
    12. Step-by-step derivation
      1. pow174.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)}^{1}} \]
      2. associate-*r*74.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)}^{1} \]
      3. *-commutative74.1%

        \[\leadsto \left(a + b\right) \cdot {\left(0.011111111111111112 \cdot \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(b - a\right)\right)\right)}^{1} \]
      4. associate-*l*74.1%

        \[\leadsto \left(a + b\right) \cdot {\left(0.011111111111111112 \cdot \color{blue}{\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)}\right)}^{1} \]
    13. Applied egg-rr74.1%

      \[\leadsto \left(a + b\right) \cdot \color{blue}{{\left(0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right)}^{1}} \]
    14. Step-by-step derivation
      1. unpow174.1%

        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right)} \]
      2. associate-*r*74.2%

        \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)} \]
      3. *-commutative74.2%

        \[\leadsto \left(a + b\right) \cdot \left(\color{blue}{\left(\pi \cdot 0.011111111111111112\right)} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \]
    15. Simplified74.2%

      \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)} \]

    if 5.99999999999999946e-8 < angle

    1. Initial program 27.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. Add Preprocessing
    3. Taylor expanded in angle around 0 25.0%

      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    4. Step-by-step derivation
      1. *-commutative25.0%

        \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot 0.011111111111111112\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*l*25.0%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot 0.011111111111111112\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. associate-*l*25.0%

        \[\leadsto \left(angle \cdot \color{blue}{\left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 0.011111111111111112\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Simplified25.0%

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot 0.011111111111111112\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. unpow227.2%

        \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      2. unpow227.2%

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares27.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Applied egg-rr26.7%

      \[\leadsto \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot 0.011111111111111112\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    8. Taylor expanded in angle around 0 24.1%

      \[\leadsto \left(angle \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\right)\right)\right) \cdot \color{blue}{1} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 6 \cdot 10^{-8}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\pi \cdot \left(0.011111111111111112 \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 39.6% accurate, 38.1× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (* angle_s (* (+ a_m b_m) (* -0.011111111111111112 (* a_m (* PI angle_m))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * (-0.011111111111111112 * (a_m * (((double) M_PI) * angle_m))));
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((a_m + b_m) * (-0.011111111111111112 * (a_m * (Math.PI * angle_m))));
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	return angle_s * ((a_m + b_m) * (-0.011111111111111112 * (a_m * (math.pi * angle_m))))
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	return Float64(angle_s * Float64(Float64(a_m + b_m) * Float64(-0.011111111111111112 * Float64(a_m * Float64(pi * angle_m)))))
end
a_m = abs(a);
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b_m, angle_m)
	tmp = angle_s * ((a_m + b_m) * (-0.011111111111111112 * (a_m * (pi * angle_m))));
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(-0.011111111111111112 * N[(a$95$m * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(a\_m + b\_m\right) \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 57.5%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*57.5%

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    2. *-commutative57.5%

      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. associate-*l*57.5%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  3. Simplified57.5%

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. unpow257.5%

      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    2. unpow257.5%

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. difference-of-squares59.1%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  6. Applied egg-rr59.1%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
  7. Step-by-step derivation
    1. pow159.1%

      \[\leadsto \color{blue}{{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}^{1}} \]
    2. associate-*l*68.9%

      \[\leadsto {\color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)\right)}}^{1} \]
    3. 2-sin68.9%

      \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)}\right)\right)}^{1} \]
    4. div-inv69.4%

      \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right)\right)}^{1} \]
    5. metadata-eval69.4%

      \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)\right)\right)}^{1} \]
  8. Applied egg-rr69.4%

    \[\leadsto \color{blue}{{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)}^{1}} \]
  9. Step-by-step derivation
    1. unpow169.4%

      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. +-commutative69.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) \]
    3. *-commutative69.4%

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)\right) \]
  10. Simplified69.4%

    \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)} \]
  11. Taylor expanded in angle around 0 61.9%

    \[\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)} \]
  12. Taylor expanded in b around 0 39.4%

    \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)} \]
  13. Final simplification39.4%

    \[\leadsto \left(a + b\right) \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \]
  14. Add Preprocessing

Reproduce

?
herbie shell --seed 2024055 
(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)))))