ab-angle->ABCF B

Percentage Accurate: 53.9% → 66.5%
Time: 49.7s
Alternatives: 21
Speedup: 27.9×

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 21 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: 66.5% 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 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\ t_2 := \sin t_1 \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+105}:\\ \;\;\;\;2 \cdot \left({\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{t_2}\right)}^{3} \cdot \cos \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+152}:\\ \;\;\;\;2 \cdot \left(\left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_1\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+264}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b_m \cdot t_2 + a_m \cdot t_2\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \pi\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 (* (- b_m a_m) (+ b_m a_m)))
        (t_1 (* PI (* angle_m 0.005555555555555556)))
        (t_2 (* (sin t_1) (+ b_m a_m))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 5e+105)
      (*
       2.0
       (*
        (pow (* (cbrt (- b_m a_m)) (cbrt t_2)) 3.0)
        (cos (* angle_m (* PI 0.005555555555555556)))))
      (if (<= (/ angle_m 180.0) 2e+152)
        (*
         2.0
         (*
          (* t_0 (sin (* (/ angle_m 180.0) (cbrt (pow PI 3.0)))))
          (cos (expm1 (log1p t_1)))))
        (if (<= (/ angle_m 180.0) 5e+264)
          (*
           2.0
           (*
            t_0
            (sin (* (/ angle_m 180.0) (* (cbrt PI) (pow (cbrt PI) 2.0))))))
          (*
           2.0
           (*
            (+ (* b_m t_2) (* a_m t_2))
            (cos (* (/ angle_m 180.0) PI))))))))))
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 = (b_m - a_m) * (b_m + a_m);
	double t_1 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double t_2 = sin(t_1) * (b_m + a_m);
	double tmp;
	if ((angle_m / 180.0) <= 5e+105) {
		tmp = 2.0 * (pow((cbrt((b_m - a_m)) * cbrt(t_2)), 3.0) * cos((angle_m * (((double) M_PI) * 0.005555555555555556))));
	} else if ((angle_m / 180.0) <= 2e+152) {
		tmp = 2.0 * ((t_0 * sin(((angle_m / 180.0) * cbrt(pow(((double) M_PI), 3.0))))) * cos(expm1(log1p(t_1))));
	} else if ((angle_m / 180.0) <= 5e+264) {
		tmp = 2.0 * (t_0 * sin(((angle_m / 180.0) * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0)))));
	} else {
		tmp = 2.0 * (((b_m * t_2) + (a_m * t_2)) * cos(((angle_m / 180.0) * ((double) M_PI))));
	}
	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 = (b_m - a_m) * (b_m + a_m);
	double t_1 = Math.PI * (angle_m * 0.005555555555555556);
	double t_2 = Math.sin(t_1) * (b_m + a_m);
	double tmp;
	if ((angle_m / 180.0) <= 5e+105) {
		tmp = 2.0 * (Math.pow((Math.cbrt((b_m - a_m)) * Math.cbrt(t_2)), 3.0) * Math.cos((angle_m * (Math.PI * 0.005555555555555556))));
	} else if ((angle_m / 180.0) <= 2e+152) {
		tmp = 2.0 * ((t_0 * Math.sin(((angle_m / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0))))) * Math.cos(Math.expm1(Math.log1p(t_1))));
	} else if ((angle_m / 180.0) <= 5e+264) {
		tmp = 2.0 * (t_0 * Math.sin(((angle_m / 180.0) * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0)))));
	} else {
		tmp = 2.0 * (((b_m * t_2) + (a_m * t_2)) * Math.cos(((angle_m / 180.0) * Math.PI)));
	}
	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(b_m - a_m) * Float64(b_m + a_m))
	t_1 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	t_2 = Float64(sin(t_1) * Float64(b_m + a_m))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 5e+105)
		tmp = Float64(2.0 * Float64((Float64(cbrt(Float64(b_m - a_m)) * cbrt(t_2)) ^ 3.0) * cos(Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	elseif (Float64(angle_m / 180.0) <= 2e+152)
		tmp = Float64(2.0 * Float64(Float64(t_0 * sin(Float64(Float64(angle_m / 180.0) * cbrt((pi ^ 3.0))))) * cos(expm1(log1p(t_1)))));
	elseif (Float64(angle_m / 180.0) <= 5e+264)
		tmp = Float64(2.0 * Float64(t_0 * sin(Float64(Float64(angle_m / 180.0) * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))));
	else
		tmp = Float64(2.0 * Float64(Float64(Float64(b_m * t_2) + Float64(a_m * t_2)) * cos(Float64(Float64(angle_m / 180.0) * pi))));
	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[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sin[t$95$1], $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+105], N[(2.0 * N[(N[Power[N[(N[Power[N[(b$95$m - a$95$m), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[t$95$2, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[Cos[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+152], N[(2.0 * N[(N[(t$95$0 * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Exp[N[Log[1 + t$95$1], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+264], N[(2.0 * N[(t$95$0 * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(b$95$m * t$95$2), $MachinePrecision] + N[(a$95$m * t$95$2), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\
t_2 := \sin t_1 \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+105}:\\
\;\;\;\;2 \cdot \left({\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{t_2}\right)}^{3} \cdot \cos \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+152}:\\
\;\;\;\;2 \cdot \left(\left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_1\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b_m \cdot t_2 + a_m \cdot t_2\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\


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

    1. Initial program 53.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*53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000046e105 < (/.f64 angle 180) < 2.0000000000000001e152

    1. Initial program 30.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*30.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e152 < (/.f64 angle 180) < 5.00000000000000033e264

    1. Initial program 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000033e264 < (/.f64 angle 180)

    1. Initial program 57.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*57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 60.9% 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 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ t_1 := {b_m}^{2} - {a_m}^{2}\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;t_1 \leq -5 \cdot 10^{+222}:\\ \;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+299}:\\ \;\;\;\;2 \cdot \left(\cos \left(\frac{angle_m}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\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 (* (- b_m a_m) (+ b_m a_m)))
        (t_1 (- (pow b_m 2.0) (pow a_m 2.0))))
   (*
    angle_s
    (if (<= t_1 -5e+222)
      (* 2.0 (* (* angle_m (* PI 0.005555555555555556)) t_0))
      (if (<= t_1 2e+299)
        (*
         2.0
         (*
          (cos (* (/ angle_m 180.0) PI))
          (* t_0 (sin (* 0.005555555555555556 (* angle_m PI))))))
        (*
         2.0
         (*
          0.005555555555555556
          (pow (* (+ b_m a_m) (sqrt (* angle_m PI))) 2.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 = (b_m - a_m) * (b_m + a_m);
	double t_1 = pow(b_m, 2.0) - pow(a_m, 2.0);
	double tmp;
	if (t_1 <= -5e+222) {
		tmp = 2.0 * ((angle_m * (((double) M_PI) * 0.005555555555555556)) * t_0);
	} else if (t_1 <= 2e+299) {
		tmp = 2.0 * (cos(((angle_m / 180.0) * ((double) M_PI))) * (t_0 * sin((0.005555555555555556 * (angle_m * ((double) M_PI))))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * pow(((b_m + a_m) * sqrt((angle_m * ((double) M_PI)))), 2.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 = (b_m - a_m) * (b_m + a_m);
	double t_1 = Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0);
	double tmp;
	if (t_1 <= -5e+222) {
		tmp = 2.0 * ((angle_m * (Math.PI * 0.005555555555555556)) * t_0);
	} else if (t_1 <= 2e+299) {
		tmp = 2.0 * (Math.cos(((angle_m / 180.0) * Math.PI)) * (t_0 * Math.sin((0.005555555555555556 * (angle_m * Math.PI)))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * Math.pow(((b_m + a_m) * Math.sqrt((angle_m * Math.PI))), 2.0));
	}
	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 = (b_m - a_m) * (b_m + a_m)
	t_1 = math.pow(b_m, 2.0) - math.pow(a_m, 2.0)
	tmp = 0
	if t_1 <= -5e+222:
		tmp = 2.0 * ((angle_m * (math.pi * 0.005555555555555556)) * t_0)
	elif t_1 <= 2e+299:
		tmp = 2.0 * (math.cos(((angle_m / 180.0) * math.pi)) * (t_0 * math.sin((0.005555555555555556 * (angle_m * math.pi)))))
	else:
		tmp = 2.0 * (0.005555555555555556 * math.pow(((b_m + a_m) * math.sqrt((angle_m * math.pi))), 2.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 = Float64(Float64(b_m - a_m) * Float64(b_m + a_m))
	t_1 = Float64((b_m ^ 2.0) - (a_m ^ 2.0))
	tmp = 0.0
	if (t_1 <= -5e+222)
		tmp = Float64(2.0 * Float64(Float64(angle_m * Float64(pi * 0.005555555555555556)) * t_0));
	elseif (t_1 <= 2e+299)
		tmp = Float64(2.0 * Float64(cos(Float64(Float64(angle_m / 180.0) * pi)) * Float64(t_0 * sin(Float64(0.005555555555555556 * Float64(angle_m * pi))))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * (Float64(Float64(b_m + a_m) * sqrt(Float64(angle_m * pi))) ^ 2.0)));
	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 = (b_m - a_m) * (b_m + a_m);
	t_1 = (b_m ^ 2.0) - (a_m ^ 2.0);
	tmp = 0.0;
	if (t_1 <= -5e+222)
		tmp = 2.0 * ((angle_m * (pi * 0.005555555555555556)) * t_0);
	elseif (t_1 <= 2e+299)
		tmp = 2.0 * (cos(((angle_m / 180.0) * pi)) * (t_0 * sin((0.005555555555555556 * (angle_m * pi)))));
	else
		tmp = 2.0 * (0.005555555555555556 * (((b_m + a_m) * sqrt((angle_m * pi))) ^ 2.0));
	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[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$1, -5e+222], N[(2.0 * N[(N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+299], N[(2.0 * N[(N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[Power[N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[Sqrt[N[(angle$95$m * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
t_1 := {b_m}^{2} - {a_m}^{2}\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+222}:\\
\;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\right)\\


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000023e222 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 2.0000000000000001e299

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e299 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 34.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*34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot {\left(\color{blue}{\left(a + b\right)} \cdot \sqrt{angle \cdot \pi}\right)}^{2}\right) \cdot 1\right) \]
    12. Simplified38.9%

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

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

Alternative 3: 61.3% accurate, 0.8× 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 := \sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\\ t_1 := t_0 \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;{b_m}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+260}:\\ \;\;\;\;2 \cdot \left(\left(t_0 \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b_m \cdot t_1 + a_m \cdot t_1\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \pi\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 (sin (* PI (* angle_m 0.005555555555555556))))
        (t_1 (* t_0 (+ b_m a_m))))
   (*
    angle_s
    (if (<= (- (pow b_m 2.0) (pow a_m 2.0)) 2e+260)
      (*
       2.0
       (* (* t_0 (* (- b_m a_m) (+ b_m a_m))) (cos (/ PI (/ 180.0 angle_m)))))
      (*
       2.0
       (* (+ (* b_m t_1) (* a_m t_1)) (cos (* (/ angle_m 180.0) PI))))))))
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 = sin((((double) M_PI) * (angle_m * 0.005555555555555556)));
	double t_1 = t_0 * (b_m + a_m);
	double tmp;
	if ((pow(b_m, 2.0) - pow(a_m, 2.0)) <= 2e+260) {
		tmp = 2.0 * ((t_0 * ((b_m - a_m) * (b_m + a_m))) * cos((((double) M_PI) / (180.0 / angle_m))));
	} else {
		tmp = 2.0 * (((b_m * t_1) + (a_m * t_1)) * cos(((angle_m / 180.0) * ((double) M_PI))));
	}
	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.sin((Math.PI * (angle_m * 0.005555555555555556)));
	double t_1 = t_0 * (b_m + a_m);
	double tmp;
	if ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) <= 2e+260) {
		tmp = 2.0 * ((t_0 * ((b_m - a_m) * (b_m + a_m))) * Math.cos((Math.PI / (180.0 / angle_m))));
	} else {
		tmp = 2.0 * (((b_m * t_1) + (a_m * t_1)) * Math.cos(((angle_m / 180.0) * Math.PI)));
	}
	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 = math.sin((math.pi * (angle_m * 0.005555555555555556)))
	t_1 = t_0 * (b_m + a_m)
	tmp = 0
	if (math.pow(b_m, 2.0) - math.pow(a_m, 2.0)) <= 2e+260:
		tmp = 2.0 * ((t_0 * ((b_m - a_m) * (b_m + a_m))) * math.cos((math.pi / (180.0 / angle_m))))
	else:
		tmp = 2.0 * (((b_m * t_1) + (a_m * t_1)) * math.cos(((angle_m / 180.0) * math.pi)))
	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 = sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))
	t_1 = Float64(t_0 * Float64(b_m + a_m))
	tmp = 0.0
	if (Float64((b_m ^ 2.0) - (a_m ^ 2.0)) <= 2e+260)
		tmp = Float64(2.0 * Float64(Float64(t_0 * Float64(Float64(b_m - a_m) * Float64(b_m + a_m))) * cos(Float64(pi / Float64(180.0 / angle_m)))));
	else
		tmp = Float64(2.0 * Float64(Float64(Float64(b_m * t_1) + Float64(a_m * t_1)) * cos(Float64(Float64(angle_m / 180.0) * pi))));
	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 = sin((pi * (angle_m * 0.005555555555555556)));
	t_1 = t_0 * (b_m + a_m);
	tmp = 0.0;
	if (((b_m ^ 2.0) - (a_m ^ 2.0)) <= 2e+260)
		tmp = 2.0 * ((t_0 * ((b_m - a_m) * (b_m + a_m))) * cos((pi / (180.0 / angle_m))));
	else
		tmp = 2.0 * (((b_m * t_1) + (a_m * t_1)) * cos(((angle_m / 180.0) * pi)));
	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[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 2e+260], N[(2.0 * N[(N[(t$95$0 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(b$95$m * t$95$1), $MachinePrecision] + N[(a$95$m * t$95$1), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $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 := \sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\\
t_1 := t_0 \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;{b_m}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+260}:\\
\;\;\;\;2 \cdot \left(\left(t_0 \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b_m \cdot t_1 + a_m \cdot t_1\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\


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

    1. Initial program 57.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*57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000013e260 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 35.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*35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.5% accurate, 0.8× 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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\ t_2 := \sin t_1\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle_m}{180} \leq 10^{+95}:\\ \;\;\;\;2 \cdot \left({\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{t_2 \cdot \left(b_m + a_m\right)}\right)}^{3} \cdot \cos \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+147}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_1\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 10^{+261}:\\ \;\;\;\;2 \cdot \left(\left(t_2 \cdot t_0\right) \cdot \cos \left(\frac{angle_m}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(\frac{angle_m}{180} \cdot \pi\right) \cdot \left|\sin \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right) \cdot {\left(b_m + a_m\right)}^{2}\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 (* (- b_m a_m) (+ b_m a_m)))
        (t_1 (* PI (* angle_m 0.005555555555555556)))
        (t_2 (sin t_1)))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e+95)
      (*
       2.0
       (*
        (pow (* (cbrt (- b_m a_m)) (cbrt (* t_2 (+ b_m a_m)))) 3.0)
        (cos (* angle_m (* PI 0.005555555555555556)))))
      (if (<= (/ angle_m 180.0) 2e+147)
        (* 2.0 (* t_0 (sin (expm1 (log1p t_1)))))
        (if (<= (/ angle_m 180.0) 1e+261)
          (*
           2.0
           (* (* t_2 t_0) (cos (* (/ angle_m 180.0) (pow (sqrt PI) 2.0)))))
          (*
           2.0
           (*
            (cos (* (/ angle_m 180.0) PI))
            (fabs
             (*
              (sin (* 0.005555555555555556 (* angle_m PI)))
              (pow (+ b_m a_m) 2.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 = (b_m - a_m) * (b_m + a_m);
	double t_1 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double t_2 = sin(t_1);
	double tmp;
	if ((angle_m / 180.0) <= 1e+95) {
		tmp = 2.0 * (pow((cbrt((b_m - a_m)) * cbrt((t_2 * (b_m + a_m)))), 3.0) * cos((angle_m * (((double) M_PI) * 0.005555555555555556))));
	} else if ((angle_m / 180.0) <= 2e+147) {
		tmp = 2.0 * (t_0 * sin(expm1(log1p(t_1))));
	} else if ((angle_m / 180.0) <= 1e+261) {
		tmp = 2.0 * ((t_2 * t_0) * cos(((angle_m / 180.0) * pow(sqrt(((double) M_PI)), 2.0))));
	} else {
		tmp = 2.0 * (cos(((angle_m / 180.0) * ((double) M_PI))) * fabs((sin((0.005555555555555556 * (angle_m * ((double) M_PI)))) * pow((b_m + a_m), 2.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 = (b_m - a_m) * (b_m + a_m);
	double t_1 = Math.PI * (angle_m * 0.005555555555555556);
	double t_2 = Math.sin(t_1);
	double tmp;
	if ((angle_m / 180.0) <= 1e+95) {
		tmp = 2.0 * (Math.pow((Math.cbrt((b_m - a_m)) * Math.cbrt((t_2 * (b_m + a_m)))), 3.0) * Math.cos((angle_m * (Math.PI * 0.005555555555555556))));
	} else if ((angle_m / 180.0) <= 2e+147) {
		tmp = 2.0 * (t_0 * Math.sin(Math.expm1(Math.log1p(t_1))));
	} else if ((angle_m / 180.0) <= 1e+261) {
		tmp = 2.0 * ((t_2 * t_0) * Math.cos(((angle_m / 180.0) * Math.pow(Math.sqrt(Math.PI), 2.0))));
	} else {
		tmp = 2.0 * (Math.cos(((angle_m / 180.0) * Math.PI)) * Math.abs((Math.sin((0.005555555555555556 * (angle_m * Math.PI))) * Math.pow((b_m + a_m), 2.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 = Float64(Float64(b_m - a_m) * Float64(b_m + a_m))
	t_1 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	t_2 = sin(t_1)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e+95)
		tmp = Float64(2.0 * Float64((Float64(cbrt(Float64(b_m - a_m)) * cbrt(Float64(t_2 * Float64(b_m + a_m)))) ^ 3.0) * cos(Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	elseif (Float64(angle_m / 180.0) <= 2e+147)
		tmp = Float64(2.0 * Float64(t_0 * sin(expm1(log1p(t_1)))));
	elseif (Float64(angle_m / 180.0) <= 1e+261)
		tmp = Float64(2.0 * Float64(Float64(t_2 * t_0) * cos(Float64(Float64(angle_m / 180.0) * (sqrt(pi) ^ 2.0)))));
	else
		tmp = Float64(2.0 * Float64(cos(Float64(Float64(angle_m / 180.0) * pi)) * abs(Float64(sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) * (Float64(b_m + a_m) ^ 2.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[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$1], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+95], N[(2.0 * N[(N[Power[N[(N[Power[N[(b$95$m - a$95$m), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(t$95$2 * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[Cos[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+147], N[(2.0 * N[(t$95$0 * N[Sin[N[(Exp[N[Log[1 + t$95$1], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+261], N[(2.0 * N[(N[(t$95$2 * t$95$0), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[Abs[N[(N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Power[N[(b$95$m + a$95$m), $MachinePrecision], 2.0], $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 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\
t_2 := \sin t_1\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle_m}{180} \leq 10^{+95}:\\
\;\;\;\;2 \cdot \left({\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{t_2 \cdot \left(b_m + a_m\right)}\right)}^{3} \cdot \cos \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+147}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_1\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 10^{+261}:\\
\;\;\;\;2 \cdot \left(\left(t_2 \cdot t_0\right) \cdot \cos \left(\frac{angle_m}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos \left(\frac{angle_m}{180} \cdot \pi\right) \cdot \left|\sin \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right) \cdot {\left(b_m + a_m\right)}^{2}\right|\right)\\


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

    1. Initial program 53.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*53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000002e95 < (/.f64 angle 180) < 2e147

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e147 < (/.f64 angle 180) < 9.9999999999999993e260

    1. Initial program 28.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*28.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999993e260 < (/.f64 angle 180)

    1. Initial program 60.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*60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left|\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot {\color{blue}{\left(a + b\right)}}^{2}\right| \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    11. Simplified77.2%

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

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

Alternative 5: 65.0% accurate, 0.8× 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 := \sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;{a_m}^{2} \leq 2 \cdot 10^{-95}:\\ \;\;\;\;2 \cdot \left(\left(b_m \cdot t_0 + a_m \cdot t_0\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{t_0}\right)}^{3}\\ \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 (* (sin (* PI (* angle_m 0.005555555555555556))) (+ b_m a_m))))
   (*
    angle_s
    (if (<= (pow a_m 2.0) 2e-95)
      (* 2.0 (* (+ (* b_m t_0) (* a_m t_0)) (cos (* (/ angle_m 180.0) PI))))
      (* 2.0 (pow (* (cbrt (- b_m a_m)) (cbrt 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 = sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (b_m + a_m);
	double tmp;
	if (pow(a_m, 2.0) <= 2e-95) {
		tmp = 2.0 * (((b_m * t_0) + (a_m * t_0)) * cos(((angle_m / 180.0) * ((double) M_PI))));
	} else {
		tmp = 2.0 * pow((cbrt((b_m - a_m)) * cbrt(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.sin((Math.PI * (angle_m * 0.005555555555555556))) * (b_m + a_m);
	double tmp;
	if (Math.pow(a_m, 2.0) <= 2e-95) {
		tmp = 2.0 * (((b_m * t_0) + (a_m * t_0)) * Math.cos(((angle_m / 180.0) * Math.PI)));
	} else {
		tmp = 2.0 * Math.pow((Math.cbrt((b_m - a_m)) * Math.cbrt(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 = Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(b_m + a_m))
	tmp = 0.0
	if ((a_m ^ 2.0) <= 2e-95)
		tmp = Float64(2.0 * Float64(Float64(Float64(b_m * t_0) + Float64(a_m * t_0)) * cos(Float64(Float64(angle_m / 180.0) * pi))));
	else
		tmp = Float64(2.0 * (Float64(cbrt(Float64(b_m - a_m)) * cbrt(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[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[a$95$m, 2.0], $MachinePrecision], 2e-95], N[(2.0 * N[(N[(N[(b$95$m * t$95$0), $MachinePrecision] + N[(a$95$m * t$95$0), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[Power[N[(b$95$m - a$95$m), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[t$95$0, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 := \sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;{a_m}^{2} \leq 2 \cdot 10^{-95}:\\
\;\;\;\;2 \cdot \left(\left(b_m \cdot t_0 + a_m \cdot t_0\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{t_0}\right)}^{3}\\


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

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 48.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*48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 66.3% accurate, 0.8× 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(2 \cdot \left({\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(b_m + a_m\right)}\right)}^{3} \cdot \cos \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\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
  (*
   2.0
   (*
    (pow
     (*
      (cbrt (- b_m a_m))
      (cbrt (* (sin (* PI (* angle_m 0.005555555555555556))) (+ b_m a_m))))
     3.0)
    (cos (* 0.005555555555555556 (* angle_m PI)))))))
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 * (2.0 * (pow((cbrt((b_m - a_m)) * cbrt((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (b_m + a_m)))), 3.0) * cos((0.005555555555555556 * (angle_m * ((double) M_PI))))));
}
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 * (2.0 * (Math.pow((Math.cbrt((b_m - a_m)) * Math.cbrt((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (b_m + a_m)))), 3.0) * Math.cos((0.005555555555555556 * (angle_m * Math.PI)))));
}
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(2.0 * Float64((Float64(cbrt(Float64(b_m - a_m)) * cbrt(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(b_m + a_m)))) ^ 3.0) * cos(Float64(0.005555555555555556 * Float64(angle_m * pi))))))
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[(2.0 * N[(N[Power[N[(N[Power[N[(b$95$m - a$95$m), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $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(2 \cdot \left({\left(\sqrt[3]{b_m - a_m} \cdot \sqrt[3]{\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(b_m + a_m\right)}\right)}^{3} \cdot \cos \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.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*50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \left({\left(\sqrt[3]{b - a} \cdot \sqrt[3]{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b + a\right)}\right)}^{3} \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
  11. Add Preprocessing

Alternative 7: 61.3% accurate, 0.8× 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}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+299}:\\ \;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot {\left(\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right) \cdot \sqrt{0.005555555555555556}\right)}^{2}\\ \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 b_m 2.0) (pow a_m 2.0)) 2e+299)
    (*
     2.0
     (*
      (*
       (sin (* PI (* angle_m 0.005555555555555556)))
       (* (- b_m a_m) (+ b_m a_m)))
      (cos (/ PI (/ 180.0 angle_m)))))
    (*
     2.0
     (pow
      (* (* (+ b_m a_m) (sqrt (* angle_m PI))) (sqrt 0.005555555555555556))
      2.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 ((pow(b_m, 2.0) - pow(a_m, 2.0)) <= 2e+299) {
		tmp = 2.0 * ((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * cos((((double) M_PI) / (180.0 / angle_m))));
	} else {
		tmp = 2.0 * pow((((b_m + a_m) * sqrt((angle_m * ((double) M_PI)))) * sqrt(0.005555555555555556)), 2.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 ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) <= 2e+299) {
		tmp = 2.0 * ((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * Math.cos((Math.PI / (180.0 / angle_m))));
	} else {
		tmp = 2.0 * Math.pow((((b_m + a_m) * Math.sqrt((angle_m * Math.PI))) * Math.sqrt(0.005555555555555556)), 2.0);
	}
	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(b_m, 2.0) - math.pow(a_m, 2.0)) <= 2e+299:
		tmp = 2.0 * ((math.sin((math.pi * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * math.cos((math.pi / (180.0 / angle_m))))
	else:
		tmp = 2.0 * math.pow((((b_m + a_m) * math.sqrt((angle_m * math.pi))) * math.sqrt(0.005555555555555556)), 2.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 (Float64((b_m ^ 2.0) - (a_m ^ 2.0)) <= 2e+299)
		tmp = Float64(2.0 * Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(Float64(b_m - a_m) * Float64(b_m + a_m))) * cos(Float64(pi / Float64(180.0 / angle_m)))));
	else
		tmp = Float64(2.0 * (Float64(Float64(Float64(b_m + a_m) * sqrt(Float64(angle_m * pi))) * sqrt(0.005555555555555556)) ^ 2.0));
	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.0) - (a_m ^ 2.0)) <= 2e+299)
		tmp = 2.0 * ((sin((pi * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * cos((pi / (180.0 / angle_m))));
	else
		tmp = 2.0 * ((((b_m + a_m) * sqrt((angle_m * pi))) * sqrt(0.005555555555555556)) ^ 2.0);
	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[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 2e+299], N[(2.0 * N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Power[N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[Sqrt[N[(angle$95$m * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sqrt[0.005555555555555556], $MachinePrecision]), $MachinePrecision], 2.0], $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}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+299}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot {\left(\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right) \cdot \sqrt{0.005555555555555556}\right)}^{2}\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e299 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 34.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*34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 61.4% accurate, 1.0× 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}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+299}:\\ \;\;\;\;2 \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right) \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\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 b_m 2.0) (pow a_m 2.0)) 2e+299)
    (*
     2.0
     (*
      (cos (* 0.005555555555555556 (* angle_m PI)))
      (* (* (- b_m a_m) (+ b_m a_m)) (sin (* (/ angle_m 180.0) PI)))))
    (*
     2.0
     (*
      0.005555555555555556
      (pow (* (+ b_m a_m) (sqrt (* angle_m PI))) 2.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 ((pow(b_m, 2.0) - pow(a_m, 2.0)) <= 2e+299) {
		tmp = 2.0 * (cos((0.005555555555555556 * (angle_m * ((double) M_PI)))) * (((b_m - a_m) * (b_m + a_m)) * sin(((angle_m / 180.0) * ((double) M_PI)))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * pow(((b_m + a_m) * sqrt((angle_m * ((double) M_PI)))), 2.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 ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) <= 2e+299) {
		tmp = 2.0 * (Math.cos((0.005555555555555556 * (angle_m * Math.PI))) * (((b_m - a_m) * (b_m + a_m)) * Math.sin(((angle_m / 180.0) * Math.PI))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * Math.pow(((b_m + a_m) * Math.sqrt((angle_m * Math.PI))), 2.0));
	}
	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(b_m, 2.0) - math.pow(a_m, 2.0)) <= 2e+299:
		tmp = 2.0 * (math.cos((0.005555555555555556 * (angle_m * math.pi))) * (((b_m - a_m) * (b_m + a_m)) * math.sin(((angle_m / 180.0) * math.pi))))
	else:
		tmp = 2.0 * (0.005555555555555556 * math.pow(((b_m + a_m) * math.sqrt((angle_m * math.pi))), 2.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 (Float64((b_m ^ 2.0) - (a_m ^ 2.0)) <= 2e+299)
		tmp = Float64(2.0 * Float64(cos(Float64(0.005555555555555556 * Float64(angle_m * pi))) * Float64(Float64(Float64(b_m - a_m) * Float64(b_m + a_m)) * sin(Float64(Float64(angle_m / 180.0) * pi)))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * (Float64(Float64(b_m + a_m) * sqrt(Float64(angle_m * pi))) ^ 2.0)));
	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.0) - (a_m ^ 2.0)) <= 2e+299)
		tmp = 2.0 * (cos((0.005555555555555556 * (angle_m * pi))) * (((b_m - a_m) * (b_m + a_m)) * sin(((angle_m / 180.0) * pi))));
	else
		tmp = 2.0 * (0.005555555555555556 * (((b_m + a_m) * sqrt((angle_m * pi))) ^ 2.0));
	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[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 2e+299], N[(2.0 * N[(N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[Power[N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[Sqrt[N[(angle$95$m * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+299}:\\
\;\;\;\;2 \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right) \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\right)\\


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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e299 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 34.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*34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot {\left(\color{blue}{\left(a + b\right)} \cdot \sqrt{angle \cdot \pi}\right)}^{2}\right) \cdot 1\right) \]
    12. Simplified38.9%

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

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

Alternative 9: 61.2% accurate, 1.0× 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}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+299}:\\ \;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\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 b_m 2.0) (pow a_m 2.0)) 2e+299)
    (*
     2.0
     (*
      (*
       (sin (* PI (* angle_m 0.005555555555555556)))
       (* (- b_m a_m) (+ b_m a_m)))
      (cos (/ PI (/ 180.0 angle_m)))))
    (*
     2.0
     (*
      0.005555555555555556
      (pow (* (+ b_m a_m) (sqrt (* angle_m PI))) 2.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 ((pow(b_m, 2.0) - pow(a_m, 2.0)) <= 2e+299) {
		tmp = 2.0 * ((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * cos((((double) M_PI) / (180.0 / angle_m))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * pow(((b_m + a_m) * sqrt((angle_m * ((double) M_PI)))), 2.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 ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) <= 2e+299) {
		tmp = 2.0 * ((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * Math.cos((Math.PI / (180.0 / angle_m))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * Math.pow(((b_m + a_m) * Math.sqrt((angle_m * Math.PI))), 2.0));
	}
	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(b_m, 2.0) - math.pow(a_m, 2.0)) <= 2e+299:
		tmp = 2.0 * ((math.sin((math.pi * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * math.cos((math.pi / (180.0 / angle_m))))
	else:
		tmp = 2.0 * (0.005555555555555556 * math.pow(((b_m + a_m) * math.sqrt((angle_m * math.pi))), 2.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 (Float64((b_m ^ 2.0) - (a_m ^ 2.0)) <= 2e+299)
		tmp = Float64(2.0 * Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(Float64(b_m - a_m) * Float64(b_m + a_m))) * cos(Float64(pi / Float64(180.0 / angle_m)))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * (Float64(Float64(b_m + a_m) * sqrt(Float64(angle_m * pi))) ^ 2.0)));
	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.0) - (a_m ^ 2.0)) <= 2e+299)
		tmp = 2.0 * ((sin((pi * (angle_m * 0.005555555555555556))) * ((b_m - a_m) * (b_m + a_m))) * cos((pi / (180.0 / angle_m))));
	else
		tmp = 2.0 * (0.005555555555555556 * (((b_m + a_m) * sqrt((angle_m * pi))) ^ 2.0));
	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[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 2e+299], N[(2.0 * N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[Power[N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[Sqrt[N[(angle$95$m * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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}^{2} - {a_m}^{2} \leq 2 \cdot 10^{+299}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\right)\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e299 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 34.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*34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot {\left(\color{blue}{\left(a + b\right)} \cdot \sqrt{angle \cdot \pi}\right)}^{2}\right) \cdot 1\right) \]
    12. Simplified38.9%

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

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

Alternative 10: 60.4% accurate, 1.0× 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}^{2} - {a_m}^{2} \leq 6.5 \cdot 10^{+294}:\\ \;\;\;\;2 \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\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 b_m 2.0) (pow a_m 2.0)) 6.5e+294)
    (* 2.0 (* (* (- b_m a_m) (+ b_m a_m)) (sin (* (/ angle_m 180.0) PI))))
    (*
     2.0
     (*
      0.005555555555555556
      (pow (* (+ b_m a_m) (sqrt (* angle_m PI))) 2.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 ((pow(b_m, 2.0) - pow(a_m, 2.0)) <= 6.5e+294) {
		tmp = 2.0 * (((b_m - a_m) * (b_m + a_m)) * sin(((angle_m / 180.0) * ((double) M_PI))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * pow(((b_m + a_m) * sqrt((angle_m * ((double) M_PI)))), 2.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 ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) <= 6.5e+294) {
		tmp = 2.0 * (((b_m - a_m) * (b_m + a_m)) * Math.sin(((angle_m / 180.0) * Math.PI)));
	} else {
		tmp = 2.0 * (0.005555555555555556 * Math.pow(((b_m + a_m) * Math.sqrt((angle_m * Math.PI))), 2.0));
	}
	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(b_m, 2.0) - math.pow(a_m, 2.0)) <= 6.5e+294:
		tmp = 2.0 * (((b_m - a_m) * (b_m + a_m)) * math.sin(((angle_m / 180.0) * math.pi)))
	else:
		tmp = 2.0 * (0.005555555555555556 * math.pow(((b_m + a_m) * math.sqrt((angle_m * math.pi))), 2.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 (Float64((b_m ^ 2.0) - (a_m ^ 2.0)) <= 6.5e+294)
		tmp = Float64(2.0 * Float64(Float64(Float64(b_m - a_m) * Float64(b_m + a_m)) * sin(Float64(Float64(angle_m / 180.0) * pi))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * (Float64(Float64(b_m + a_m) * sqrt(Float64(angle_m * pi))) ^ 2.0)));
	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.0) - (a_m ^ 2.0)) <= 6.5e+294)
		tmp = 2.0 * (((b_m - a_m) * (b_m + a_m)) * sin(((angle_m / 180.0) * pi)));
	else
		tmp = 2.0 * (0.005555555555555556 * (((b_m + a_m) * sqrt((angle_m * pi))) ^ 2.0));
	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[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], 6.5e+294], N[(2.0 * N[(N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[Power[N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[Sqrt[N[(angle$95$m * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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}^{2} - {a_m}^{2} \leq 6.5 \cdot 10^{+294}:\\
\;\;\;\;2 \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\right)\\


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

    1. Initial program 57.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*57.0%

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

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

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

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

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

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

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

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

    if 6.49999999999999965e294 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 34.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*34.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot {\left(\color{blue}{\left(a + b\right)} \cdot \sqrt{angle \cdot \pi}\right)}^{2}\right) \cdot 1\right) \]
    12. Simplified37.9%

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

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

Alternative 11: 61.4% 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}\;{b_m}^{2} \leq 2 \cdot 10^{+307}:\\ \;\;\;\;2 \cdot \left(\cos \left(\frac{angle_m}{180} \cdot \pi\right) \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \sin \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\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 b_m 2.0) 2e+307)
    (*
     2.0
     (*
      (cos (* (/ angle_m 180.0) PI))
      (*
       (* (- b_m a_m) (+ b_m a_m))
       (sin (* angle_m (* PI 0.005555555555555556))))))
    (*
     2.0
     (*
      0.005555555555555556
      (pow (* (+ b_m a_m) (sqrt (* angle_m PI))) 2.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 (pow(b_m, 2.0) <= 2e+307) {
		tmp = 2.0 * (cos(((angle_m / 180.0) * ((double) M_PI))) * (((b_m - a_m) * (b_m + a_m)) * sin((angle_m * (((double) M_PI) * 0.005555555555555556)))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * pow(((b_m + a_m) * sqrt((angle_m * ((double) M_PI)))), 2.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 (Math.pow(b_m, 2.0) <= 2e+307) {
		tmp = 2.0 * (Math.cos(((angle_m / 180.0) * Math.PI)) * (((b_m - a_m) * (b_m + a_m)) * Math.sin((angle_m * (Math.PI * 0.005555555555555556)))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * Math.pow(((b_m + a_m) * Math.sqrt((angle_m * Math.PI))), 2.0));
	}
	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(b_m, 2.0) <= 2e+307:
		tmp = 2.0 * (math.cos(((angle_m / 180.0) * math.pi)) * (((b_m - a_m) * (b_m + a_m)) * math.sin((angle_m * (math.pi * 0.005555555555555556)))))
	else:
		tmp = 2.0 * (0.005555555555555556 * math.pow(((b_m + a_m) * math.sqrt((angle_m * math.pi))), 2.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 ((b_m ^ 2.0) <= 2e+307)
		tmp = Float64(2.0 * Float64(cos(Float64(Float64(angle_m / 180.0) * pi)) * Float64(Float64(Float64(b_m - a_m) * Float64(b_m + a_m)) * sin(Float64(angle_m * Float64(pi * 0.005555555555555556))))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * (Float64(Float64(b_m + a_m) * sqrt(Float64(angle_m * pi))) ^ 2.0)));
	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.0) <= 2e+307)
		tmp = 2.0 * (cos(((angle_m / 180.0) * pi)) * (((b_m - a_m) * (b_m + a_m)) * sin((angle_m * (pi * 0.005555555555555556)))));
	else
		tmp = 2.0 * (0.005555555555555556 * (((b_m + a_m) * sqrt((angle_m * pi))) ^ 2.0));
	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[b$95$m, 2.0], $MachinePrecision], 2e+307], N[(2.0 * N[(N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[Power[N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[Sqrt[N[(angle$95$m * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $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}^{2} \leq 2 \cdot 10^{+307}:\\
\;\;\;\;2 \cdot \left(\cos \left(\frac{angle_m}{180} \cdot \pi\right) \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \sin \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot {\left(\left(b_m + a_m\right) \cdot \sqrt{angle_m \cdot \pi}\right)}^{2}\right)\\


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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e307 < (pow.f64 b 2)

    1. Initial program 34.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*34.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot {\left(\color{blue}{\left(a + b\right)} \cdot \sqrt{angle \cdot \pi}\right)}^{2}\right) \cdot 1\right) \]
    12. Simplified38.9%

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

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

Alternative 12: 56.5% accurate, 3.2× 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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;b_m \leq 3.8 \cdot 10^{+81}:\\ \;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\ \mathbf{elif}\;b_m \leq 5 \cdot 10^{+204}:\\ \;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(\frac{angle_m}{180} \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\left(b_m - a_m\right) \cdot \left(\pi \cdot \left(b_m + a_m\right)\right)\right)\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 (* (- b_m a_m) (+ b_m a_m))))
   (*
    angle_s
    (if (<= b_m 3.8e+81)
      (* 2.0 (* (sin (* PI (* angle_m 0.005555555555555556))) t_0))
      (if (<= b_m 5e+204)
        (* 2.0 (* (* angle_m (* PI 0.005555555555555556)) t_0))
        (*
         2.0
         (*
          (cos (* (/ angle_m 180.0) PI))
          (*
           0.005555555555555556
           (* angle_m (* (- b_m a_m) (* PI (+ 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 t_0 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (b_m <= 3.8e+81) {
		tmp = 2.0 * (sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * t_0);
	} else if (b_m <= 5e+204) {
		tmp = 2.0 * ((angle_m * (((double) M_PI) * 0.005555555555555556)) * t_0);
	} else {
		tmp = 2.0 * (cos(((angle_m / 180.0) * ((double) M_PI))) * (0.005555555555555556 * (angle_m * ((b_m - a_m) * (((double) M_PI) * (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 t_0 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (b_m <= 3.8e+81) {
		tmp = 2.0 * (Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * t_0);
	} else if (b_m <= 5e+204) {
		tmp = 2.0 * ((angle_m * (Math.PI * 0.005555555555555556)) * t_0);
	} else {
		tmp = 2.0 * (Math.cos(((angle_m / 180.0) * Math.PI)) * (0.005555555555555556 * (angle_m * ((b_m - a_m) * (Math.PI * (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):
	t_0 = (b_m - a_m) * (b_m + a_m)
	tmp = 0
	if b_m <= 3.8e+81:
		tmp = 2.0 * (math.sin((math.pi * (angle_m * 0.005555555555555556))) * t_0)
	elif b_m <= 5e+204:
		tmp = 2.0 * ((angle_m * (math.pi * 0.005555555555555556)) * t_0)
	else:
		tmp = 2.0 * (math.cos(((angle_m / 180.0) * math.pi)) * (0.005555555555555556 * (angle_m * ((b_m - a_m) * (math.pi * (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)
	t_0 = Float64(Float64(b_m - a_m) * Float64(b_m + a_m))
	tmp = 0.0
	if (b_m <= 3.8e+81)
		tmp = Float64(2.0 * Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * t_0));
	elseif (b_m <= 5e+204)
		tmp = Float64(2.0 * Float64(Float64(angle_m * Float64(pi * 0.005555555555555556)) * t_0));
	else
		tmp = Float64(2.0 * Float64(cos(Float64(Float64(angle_m / 180.0) * pi)) * Float64(0.005555555555555556 * Float64(angle_m * Float64(Float64(b_m - a_m) * Float64(pi * 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)
	t_0 = (b_m - a_m) * (b_m + a_m);
	tmp = 0.0;
	if (b_m <= 3.8e+81)
		tmp = 2.0 * (sin((pi * (angle_m * 0.005555555555555556))) * t_0);
	elseif (b_m <= 5e+204)
		tmp = 2.0 * ((angle_m * (pi * 0.005555555555555556)) * t_0);
	else
		tmp = 2.0 * (cos(((angle_m / 180.0) * pi)) * (0.005555555555555556 * (angle_m * ((b_m - a_m) * (pi * (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_] := Block[{t$95$0 = N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 3.8e+81], N[(2.0 * N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5e+204], N[(2.0 * N[(N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(0.005555555555555556 * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * N[(b$95$m + a$95$m), $MachinePrecision]), $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 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;b_m \leq 3.8 \cdot 10^{+81}:\\
\;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\

\mathbf{elif}\;b_m \leq 5 \cdot 10^{+204}:\\
\;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos \left(\frac{angle_m}{180} \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\left(b_m - a_m\right) \cdot \left(\pi \cdot \left(b_m + a_m\right)\right)\right)\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 3.8e81

    1. Initial program 55.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*55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8e81 < b < 5.00000000000000008e204

    1. Initial program 34.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*34.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000008e204 < b

    1. Initial program 34.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*34.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot \left(b + a\right) - a \cdot \left(b + a\right)\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      6. distribute-rgt-out--68.6%

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

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

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

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

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

Alternative 13: 56.4% 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) \\ \begin{array}{l} t_0 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;b_m \leq 3.8 \cdot 10^{+81}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\ \mathbf{elif}\;b_m \leq 9.6 \cdot 10^{+203}:\\ \;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{\pi}{\frac{180}{angle_m}}\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 (* (- b_m a_m) (+ b_m a_m))))
   (*
    angle_s
    (if (<= b_m 3.8e+81)
      (* 2.0 (* t_0 (sin (* (/ angle_m 180.0) PI))))
      (if (<= b_m 9.6e+203)
        (* 2.0 (* (* angle_m (* PI 0.005555555555555556)) t_0))
        (* 2.0 (* t_0 (sin (/ PI (/ 180.0 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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (b_m <= 3.8e+81) {
		tmp = 2.0 * (t_0 * sin(((angle_m / 180.0) * ((double) M_PI))));
	} else if (b_m <= 9.6e+203) {
		tmp = 2.0 * ((angle_m * (((double) M_PI) * 0.005555555555555556)) * t_0);
	} else {
		tmp = 2.0 * (t_0 * sin((((double) M_PI) / (180.0 / 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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (b_m <= 3.8e+81) {
		tmp = 2.0 * (t_0 * Math.sin(((angle_m / 180.0) * Math.PI)));
	} else if (b_m <= 9.6e+203) {
		tmp = 2.0 * ((angle_m * (Math.PI * 0.005555555555555556)) * t_0);
	} else {
		tmp = 2.0 * (t_0 * Math.sin((Math.PI / (180.0 / 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 = (b_m - a_m) * (b_m + a_m)
	tmp = 0
	if b_m <= 3.8e+81:
		tmp = 2.0 * (t_0 * math.sin(((angle_m / 180.0) * math.pi)))
	elif b_m <= 9.6e+203:
		tmp = 2.0 * ((angle_m * (math.pi * 0.005555555555555556)) * t_0)
	else:
		tmp = 2.0 * (t_0 * math.sin((math.pi / (180.0 / 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(b_m - a_m) * Float64(b_m + a_m))
	tmp = 0.0
	if (b_m <= 3.8e+81)
		tmp = Float64(2.0 * Float64(t_0 * sin(Float64(Float64(angle_m / 180.0) * pi))));
	elseif (b_m <= 9.6e+203)
		tmp = Float64(2.0 * Float64(Float64(angle_m * Float64(pi * 0.005555555555555556)) * t_0));
	else
		tmp = Float64(2.0 * Float64(t_0 * sin(Float64(pi / Float64(180.0 / 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 = (b_m - a_m) * (b_m + a_m);
	tmp = 0.0;
	if (b_m <= 3.8e+81)
		tmp = 2.0 * (t_0 * sin(((angle_m / 180.0) * pi)));
	elseif (b_m <= 9.6e+203)
		tmp = 2.0 * ((angle_m * (pi * 0.005555555555555556)) * t_0);
	else
		tmp = 2.0 * (t_0 * sin((pi / (180.0 / 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[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 3.8e+81], N[(2.0 * N[(t$95$0 * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9.6e+203], N[(2.0 * N[(N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$0 * N[Sin[N[(Pi / N[(180.0 / 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)

\\
\begin{array}{l}
t_0 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;b_m \leq 3.8 \cdot 10^{+81}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\

\mathbf{elif}\;b_m \leq 9.6 \cdot 10^{+203}:\\
\;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 3.8e81

    1. Initial program 55.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*55.4%

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

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

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

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

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

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

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

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

    if 3.8e81 < b < 9.6000000000000004e203

    1. Initial program 35.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*35.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.6000000000000004e203 < b

    1. Initial program 33.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*33.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 56.4% 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) \\ \begin{array}{l} t_0 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;b_m \leq 3.6 \cdot 10^{+81}:\\ \;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\ \mathbf{elif}\;b_m \leq 8 \cdot 10^{+203}:\\ \;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{\pi}{\frac{180}{angle_m}}\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 (* (- b_m a_m) (+ b_m a_m))))
   (*
    angle_s
    (if (<= b_m 3.6e+81)
      (* 2.0 (* (sin (* PI (* angle_m 0.005555555555555556))) t_0))
      (if (<= b_m 8e+203)
        (* 2.0 (* (* angle_m (* PI 0.005555555555555556)) t_0))
        (* 2.0 (* t_0 (sin (/ PI (/ 180.0 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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (b_m <= 3.6e+81) {
		tmp = 2.0 * (sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * t_0);
	} else if (b_m <= 8e+203) {
		tmp = 2.0 * ((angle_m * (((double) M_PI) * 0.005555555555555556)) * t_0);
	} else {
		tmp = 2.0 * (t_0 * sin((((double) M_PI) / (180.0 / 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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (b_m <= 3.6e+81) {
		tmp = 2.0 * (Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * t_0);
	} else if (b_m <= 8e+203) {
		tmp = 2.0 * ((angle_m * (Math.PI * 0.005555555555555556)) * t_0);
	} else {
		tmp = 2.0 * (t_0 * Math.sin((Math.PI / (180.0 / 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 = (b_m - a_m) * (b_m + a_m)
	tmp = 0
	if b_m <= 3.6e+81:
		tmp = 2.0 * (math.sin((math.pi * (angle_m * 0.005555555555555556))) * t_0)
	elif b_m <= 8e+203:
		tmp = 2.0 * ((angle_m * (math.pi * 0.005555555555555556)) * t_0)
	else:
		tmp = 2.0 * (t_0 * math.sin((math.pi / (180.0 / 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(b_m - a_m) * Float64(b_m + a_m))
	tmp = 0.0
	if (b_m <= 3.6e+81)
		tmp = Float64(2.0 * Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * t_0));
	elseif (b_m <= 8e+203)
		tmp = Float64(2.0 * Float64(Float64(angle_m * Float64(pi * 0.005555555555555556)) * t_0));
	else
		tmp = Float64(2.0 * Float64(t_0 * sin(Float64(pi / Float64(180.0 / 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 = (b_m - a_m) * (b_m + a_m);
	tmp = 0.0;
	if (b_m <= 3.6e+81)
		tmp = 2.0 * (sin((pi * (angle_m * 0.005555555555555556))) * t_0);
	elseif (b_m <= 8e+203)
		tmp = 2.0 * ((angle_m * (pi * 0.005555555555555556)) * t_0);
	else
		tmp = 2.0 * (t_0 * sin((pi / (180.0 / 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[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 3.6e+81], N[(2.0 * N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 8e+203], N[(2.0 * N[(N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$0 * N[Sin[N[(Pi / N[(180.0 / 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)

\\
\begin{array}{l}
t_0 := \left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;b_m \leq 3.6 \cdot 10^{+81}:\\
\;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\

\mathbf{elif}\;b_m \leq 8 \cdot 10^{+203}:\\
\;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot t_0\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{\pi}{\frac{180}{angle_m}}\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 3.60000000000000005e81

    1. Initial program 55.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*55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.60000000000000005e81 < b < 7.9999999999999999e203

    1. Initial program 35.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*35.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.9999999999999999e203 < b

    1. Initial program 33.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*33.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 56.2% accurate, 3.5× 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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;a_m \leq 3.1 \cdot 10^{+204}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot t_0\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 (* (- b_m a_m) (+ b_m a_m))))
   (*
    angle_s
    (if (<= a_m 3.1e+204)
      (* 2.0 (* t_0 (sin (* 0.005555555555555556 (* angle_m PI)))))
      (* 2.0 (* 0.005555555555555556 (* angle_m (* PI t_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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (a_m <= 3.1e+204) {
		tmp = 2.0 * (t_0 * sin((0.005555555555555556 * (angle_m * ((double) M_PI)))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (((double) M_PI) * t_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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (a_m <= 3.1e+204) {
		tmp = 2.0 * (t_0 * Math.sin((0.005555555555555556 * (angle_m * Math.PI))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (Math.PI * t_0)));
	}
	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 = (b_m - a_m) * (b_m + a_m)
	tmp = 0
	if a_m <= 3.1e+204:
		tmp = 2.0 * (t_0 * math.sin((0.005555555555555556 * (angle_m * math.pi))))
	else:
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (math.pi * t_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 = Float64(Float64(b_m - a_m) * Float64(b_m + a_m))
	tmp = 0.0
	if (a_m <= 3.1e+204)
		tmp = Float64(2.0 * Float64(t_0 * sin(Float64(0.005555555555555556 * Float64(angle_m * pi)))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(pi * t_0))));
	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 = (b_m - a_m) * (b_m + a_m);
	tmp = 0.0;
	if (a_m <= 3.1e+204)
		tmp = 2.0 * (t_0 * sin((0.005555555555555556 * (angle_m * pi))));
	else
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (pi * t_0)));
	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[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a$95$m, 3.1e+204], N[(2.0 * N[(t$95$0 * N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(Pi * t$95$0), $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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;a_m \leq 3.1 \cdot 10^{+204}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot t_0\right)\right)\right)\\


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

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

    if 3.1000000000000002e204 < a

    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(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*l*48.9%

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

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

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

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

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

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

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

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

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

Alternative 16: 56.2% accurate, 3.5× 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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;a_m \leq 3 \cdot 10^{+204}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot t_0\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 (* (- b_m a_m) (+ b_m a_m))))
   (*
    angle_s
    (if (<= a_m 3e+204)
      (* 2.0 (* t_0 (sin (* (/ angle_m 180.0) PI))))
      (* 2.0 (* 0.005555555555555556 (* angle_m (* PI t_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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (a_m <= 3e+204) {
		tmp = 2.0 * (t_0 * sin(((angle_m / 180.0) * ((double) M_PI))));
	} else {
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (((double) M_PI) * t_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 = (b_m - a_m) * (b_m + a_m);
	double tmp;
	if (a_m <= 3e+204) {
		tmp = 2.0 * (t_0 * Math.sin(((angle_m / 180.0) * Math.PI)));
	} else {
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (Math.PI * t_0)));
	}
	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 = (b_m - a_m) * (b_m + a_m)
	tmp = 0
	if a_m <= 3e+204:
		tmp = 2.0 * (t_0 * math.sin(((angle_m / 180.0) * math.pi)))
	else:
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (math.pi * t_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 = Float64(Float64(b_m - a_m) * Float64(b_m + a_m))
	tmp = 0.0
	if (a_m <= 3e+204)
		tmp = Float64(2.0 * Float64(t_0 * sin(Float64(Float64(angle_m / 180.0) * pi))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(pi * t_0))));
	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 = (b_m - a_m) * (b_m + a_m);
	tmp = 0.0;
	if (a_m <= 3e+204)
		tmp = 2.0 * (t_0 * sin(((angle_m / 180.0) * pi)));
	else
		tmp = 2.0 * (0.005555555555555556 * (angle_m * (pi * t_0)));
	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[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a$95$m, 3e+204], N[(2.0 * N[(t$95$0 * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(Pi * t$95$0), $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(b_m - a_m\right) \cdot \left(b_m + a_m\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;a_m \leq 3 \cdot 10^{+204}:\\
\;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \pi\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot t_0\right)\right)\right)\\


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

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

    if 2.99999999999999983e204 < a

    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(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*l*48.9%

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

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

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

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

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

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

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

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

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

Alternative 17: 54.6% 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}\;angle_m \leq 3.4 \cdot 10^{+257}:\\ \;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot \left(b_m \cdot \left(b_m + a_m\right)\right) + \pi \cdot \left(a_m \cdot \left(b_m + a_m\right)\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 3.4e+257)
    (*
     2.0
     (* (* angle_m (* PI 0.005555555555555556)) (* (- b_m a_m) (+ b_m a_m))))
    (*
     2.0
     (*
      0.005555555555555556
      (*
       angle_m
       (+ (* PI (* b_m (+ b_m a_m))) (* PI (* a_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 <= 3.4e+257) {
		tmp = 2.0 * ((angle_m * (((double) M_PI) * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_m)));
	} else {
		tmp = 2.0 * (0.005555555555555556 * (angle_m * ((((double) M_PI) * (b_m * (b_m + a_m))) + (((double) M_PI) * (a_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 <= 3.4e+257) {
		tmp = 2.0 * ((angle_m * (Math.PI * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_m)));
	} else {
		tmp = 2.0 * (0.005555555555555556 * (angle_m * ((Math.PI * (b_m * (b_m + a_m))) + (Math.PI * (a_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 <= 3.4e+257:
		tmp = 2.0 * ((angle_m * (math.pi * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_m)))
	else:
		tmp = 2.0 * (0.005555555555555556 * (angle_m * ((math.pi * (b_m * (b_m + a_m))) + (math.pi * (a_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 <= 3.4e+257)
		tmp = Float64(2.0 * Float64(Float64(angle_m * Float64(pi * 0.005555555555555556)) * Float64(Float64(b_m - a_m) * Float64(b_m + a_m))));
	else
		tmp = Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(Float64(pi * Float64(b_m * Float64(b_m + a_m))) + Float64(pi * Float64(a_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 <= 3.4e+257)
		tmp = 2.0 * ((angle_m * (pi * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_m)));
	else
		tmp = 2.0 * (0.005555555555555556 * (angle_m * ((pi * (b_m * (b_m + a_m))) + (pi * (a_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, 3.4e+257], N[(2.0 * N[(N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(N[(Pi * N[(b$95$m * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * N[(a$95$m * N[(b$95$m + a$95$m), $MachinePrecision]), $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}\;angle_m \leq 3.4 \cdot 10^{+257}:\\
\;\;\;\;2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot \left(b_m \cdot \left(b_m + a_m\right)\right) + \pi \cdot \left(a_m \cdot \left(b_m + a_m\right)\right)\right)\right)\right)\\


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

    1. Initial program 50.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*50.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4000000000000002e257 < angle

    1. Initial program 60.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*60.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b + \left(-a\right)\right)}\right)\right)\right)\right) \cdot 1\right) \]
      3. distribute-lft-out33.8%

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot \left(angle \cdot \left(\left(b \cdot \left(b + a\right)\right) \cdot \pi + \color{blue}{\left(\left(-a\right) \cdot \left(b + a\right)\right)} \cdot \pi\right)\right)\right) \cdot 1\right) \]
      7. add-sqr-sqrt8.5%

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

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

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

        \[\leadsto 2 \cdot \left(\left(0.005555555555555556 \cdot \left(angle \cdot \left(\left(b \cdot \left(b + a\right)\right) \cdot \pi + \left(\color{blue}{\left(\sqrt{a} \cdot \sqrt{a}\right)} \cdot \left(b + a\right)\right) \cdot \pi\right)\right)\right) \cdot 1\right) \]
      11. add-sqr-sqrt50.4%

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

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

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

Alternative 18: 54.6% accurate, 27.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 \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\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
  (*
   2.0
   (* 0.005555555555555556 (* angle_m (* PI (* (- b_m a_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) {
	return angle_s * (2.0 * (0.005555555555555556 * (angle_m * (((double) M_PI) * ((b_m - a_m) * (b_m + a_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 * (2.0 * (0.005555555555555556 * (angle_m * (Math.PI * ((b_m - a_m) * (b_m + a_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 * (2.0 * (0.005555555555555556 * (angle_m * (math.pi * ((b_m - a_m) * (b_m + a_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(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(pi * Float64(Float64(b_m - a_m) * Float64(b_m + a_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 * (2.0 * (0.005555555555555556 * (angle_m * (pi * ((b_m - a_m) * (b_m + a_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[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(Pi * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $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(2 \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \left(\pi \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.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*50.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\right) \]
  10. Add Preprocessing

Alternative 19: 54.6% accurate, 27.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 \left(2 \cdot \left(\left(angle_m \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\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
  (*
   2.0
   (* (* angle_m 0.005555555555555556) (* PI (* (- b_m a_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) {
	return angle_s * (2.0 * ((angle_m * 0.005555555555555556) * (((double) M_PI) * ((b_m - a_m) * (b_m + a_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 * (2.0 * ((angle_m * 0.005555555555555556) * (Math.PI * ((b_m - a_m) * (b_m + a_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 * (2.0 * ((angle_m * 0.005555555555555556) * (math.pi * ((b_m - a_m) * (b_m + a_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(2.0 * Float64(Float64(angle_m * 0.005555555555555556) * Float64(pi * Float64(Float64(b_m - a_m) * Float64(b_m + a_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 * (2.0 * ((angle_m * 0.005555555555555556) * (pi * ((b_m - a_m) * (b_m + a_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[(2.0 * N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[(Pi * N[(N[(b$95$m - a$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 \left(2 \cdot \left(\left(angle_m \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.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*50.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \]
  12. Add Preprocessing

Alternative 20: 54.7% accurate, 27.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 \left(2 \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\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
  (*
   2.0
   (* (* (- b_m a_m) (+ b_m a_m)) (* 0.005555555555555556 (* angle_m PI))))))
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 * (2.0 * (((b_m - a_m) * (b_m + a_m)) * (0.005555555555555556 * (angle_m * ((double) M_PI)))));
}
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 * (2.0 * (((b_m - a_m) * (b_m + a_m)) * (0.005555555555555556 * (angle_m * Math.PI))));
}
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 * (2.0 * (((b_m - a_m) * (b_m + a_m)) * (0.005555555555555556 * (angle_m * math.pi))))
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(2.0 * Float64(Float64(Float64(b_m - a_m) * Float64(b_m + a_m)) * Float64(0.005555555555555556 * Float64(angle_m * pi)))))
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 * (2.0 * (((b_m - a_m) * (b_m + a_m)) * (0.005555555555555556 * (angle_m * pi))));
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[(2.0 * N[(N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$95$m), $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * N[(angle$95$m * Pi), $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(2 \cdot \left(\left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle_m \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.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*50.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
  10. Add Preprocessing

Alternative 21: 54.7% accurate, 27.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 \left(2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_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
  (*
   2.0
   (* (* angle_m (* PI 0.005555555555555556)) (* (- b_m a_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) {
	return angle_s * (2.0 * ((angle_m * (((double) M_PI) * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_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 * (2.0 * ((angle_m * (Math.PI * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_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 * (2.0 * ((angle_m * (math.pi * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_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(2.0 * Float64(Float64(angle_m * Float64(pi * 0.005555555555555556)) * Float64(Float64(b_m - a_m) * Float64(b_m + a_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 * (2.0 * ((angle_m * (pi * 0.005555555555555556)) * ((b_m - a_m) * (b_m + a_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[(2.0 * N[(N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(b$95$m + a$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(2 \cdot \left(\left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b_m - a_m\right) \cdot \left(b_m + a_m\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.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*50.8%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \left(\left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \]
  12. Add Preprocessing

Reproduce

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