ab-angle->ABCF B

Percentage Accurate: 53.7% → 64.9%
Time: 35.4s
Alternatives: 14
Speedup: 32.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 53.7% 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: 64.9% accurate, 0.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \cos t\_0\\ t_2 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\ t_3 := \cos t\_2\\ t_4 := \sin t\_2\\ t_5 := \sqrt{{\left(\left({b\_m}^{2} - {a}^{2}\right) \cdot t\_4\right)}^{2}}\\ t_6 := 0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+49}:\\ \;\;\;\;2 \cdot \left(t\_1 \cdot \left(\left(b\_m - a\right) \cdot \left(t\_4 \cdot \left(b\_m + a\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+157}:\\ \;\;\;\;2 \cdot \left(t\_5 \cdot \cos t\_6\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+262}:\\ \;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(a \cdot -2, t\_3 \cdot t\_6, 0\right), 2 \cdot \left({b\_m}^{2} \cdot \left(t\_3 \cdot \sin \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+276}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \left(2 \cdot \left(\sin t\_0 \cdot \cos \left(\frac{angle\_m}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t\_1 \cdot t\_5\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (cos t_0))
        (t_2 (* PI (* angle_m 0.005555555555555556)))
        (t_3 (cos t_2))
        (t_4 (sin t_2))
        (t_5 (sqrt (pow (* (- (pow b_m 2.0) (pow a 2.0)) t_4) 2.0)))
        (t_6 (* 0.005555555555555556 (* PI angle_m))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e+49)
      (* 2.0 (* t_1 (* (- b_m a) (* t_4 (+ b_m a)))))
      (if (<= (/ angle_m 180.0) 5e+157)
        (* 2.0 (* t_5 (cos t_6)))
        (if (<= (/ angle_m 180.0) 4e+262)
          (fma
           a
           (fma (* a -2.0) (* t_3 t_6) 0.0)
           (*
            2.0
            (*
             (pow b_m 2.0)
             (*
              t_3
              (sin
               (* (* angle_m 0.005555555555555556) (cbrt (pow PI 3.0))))))))
          (if (<= (/ angle_m 180.0) 2e+276)
            (*
             (* (- b_m a) (+ b_m a))
             (*
              2.0
              (* (sin t_0) (cos (* (/ angle_m 180.0) (pow (sqrt PI) 2.0))))))
            (* 2.0 (* t_1 t_5)))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = cos(t_0);
	double t_2 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double t_3 = cos(t_2);
	double t_4 = sin(t_2);
	double t_5 = sqrt(pow(((pow(b_m, 2.0) - pow(a, 2.0)) * t_4), 2.0));
	double t_6 = 0.005555555555555556 * (((double) M_PI) * angle_m);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = 2.0 * (t_1 * ((b_m - a) * (t_4 * (b_m + a))));
	} else if ((angle_m / 180.0) <= 5e+157) {
		tmp = 2.0 * (t_5 * cos(t_6));
	} else if ((angle_m / 180.0) <= 4e+262) {
		tmp = fma(a, fma((a * -2.0), (t_3 * t_6), 0.0), (2.0 * (pow(b_m, 2.0) * (t_3 * sin(((angle_m * 0.005555555555555556) * cbrt(pow(((double) M_PI), 3.0))))))));
	} else if ((angle_m / 180.0) <= 2e+276) {
		tmp = ((b_m - a) * (b_m + a)) * (2.0 * (sin(t_0) * cos(((angle_m / 180.0) * pow(sqrt(((double) M_PI)), 2.0)))));
	} else {
		tmp = 2.0 * (t_1 * t_5);
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = cos(t_0)
	t_2 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	t_3 = cos(t_2)
	t_4 = sin(t_2)
	t_5 = sqrt((Float64(Float64((b_m ^ 2.0) - (a ^ 2.0)) * t_4) ^ 2.0))
	t_6 = Float64(0.005555555555555556 * Float64(pi * angle_m))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e+49)
		tmp = Float64(2.0 * Float64(t_1 * Float64(Float64(b_m - a) * Float64(t_4 * Float64(b_m + a)))));
	elseif (Float64(angle_m / 180.0) <= 5e+157)
		tmp = Float64(2.0 * Float64(t_5 * cos(t_6)));
	elseif (Float64(angle_m / 180.0) <= 4e+262)
		tmp = fma(a, fma(Float64(a * -2.0), Float64(t_3 * t_6), 0.0), Float64(2.0 * Float64((b_m ^ 2.0) * Float64(t_3 * sin(Float64(Float64(angle_m * 0.005555555555555556) * cbrt((pi ^ 3.0))))))));
	elseif (Float64(angle_m / 180.0) <= 2e+276)
		tmp = Float64(Float64(Float64(b_m - a) * Float64(b_m + a)) * Float64(2.0 * Float64(sin(t_0) * cos(Float64(Float64(angle_m / 180.0) * (sqrt(pi) ^ 2.0))))));
	else
		tmp = Float64(2.0 * Float64(t_1 * t_5));
	end
	return Float64(angle_s * tmp)
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[Sqrt[N[Power[N[(N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$6 = N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+49], N[(2.0 * N[(t$95$1 * N[(N[(b$95$m - a), $MachinePrecision] * N[(t$95$4 * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+157], N[(2.0 * N[(t$95$5 * N[Cos[t$95$6], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 4e+262], N[(a * N[(N[(a * -2.0), $MachinePrecision] * N[(t$95$3 * t$95$6), $MachinePrecision] + 0.0), $MachinePrecision] + N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * N[(t$95$3 * N[Sin[N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+276], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[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]), $MachinePrecision], N[(2.0 * N[(t$95$1 * t$95$5), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \cos t\_0\\
t_2 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\
t_3 := \cos t\_2\\
t_4 := \sin t\_2\\
t_5 := \sqrt{{\left(\left({b\_m}^{2} - {a}^{2}\right) \cdot t\_4\right)}^{2}}\\
t_6 := 0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+49}:\\
\;\;\;\;2 \cdot \left(t\_1 \cdot \left(\left(b\_m - a\right) \cdot \left(t\_4 \cdot \left(b\_m + a\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+157}:\\
\;\;\;\;2 \cdot \left(t\_5 \cdot \cos t\_6\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+262}:\\
\;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(a \cdot -2, t\_3 \cdot t\_6, 0\right), 2 \cdot \left({b\_m}^{2} \cdot \left(t\_3 \cdot \sin \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+276}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \left(2 \cdot \left(\sin t\_0 \cdot \cos \left(\frac{angle\_m}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_1 \cdot t\_5\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999946e48

    1. Initial program 58.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*59.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*59.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. Simplified59.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-sqrt33.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod36.2%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow236.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{{\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)}^{\left(\frac{2}{2}\right)}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. metadata-eval62.8%

        \[\leadsto 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)}^{\color{blue}{1}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. pow162.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\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(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. *-commutative62.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\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) \]
      5. *-commutative62.8%

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

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

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

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle #s(literal 180 binary64)) < 4.99999999999999976e157

    1. Initial program 32.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*32.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*32.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. Simplified32.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-sqrt18.2%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod35.2%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow235.2%

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

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

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

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

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

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

    if 4.99999999999999976e157 < (/.f64 angle #s(literal 180 binary64)) < 4.0000000000000001e262

    1. Initial program 16.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*16.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. add-cbrt-cube24.1%

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
      2. pow324.1%

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    11. Applied egg-rr24.1%

      \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    12. Taylor expanded in angle around 0 40.6%

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

    if 4.0000000000000001e262 < (/.f64 angle #s(literal 180 binary64)) < 2.0000000000000001e276

    1. Initial program 24.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*24.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e276 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 19.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*19.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*19.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. Simplified19.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-sqrt17.6%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod50.3%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow250.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+49}:\\ \;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+157}:\\ \;\;\;\;2 \cdot \left(\sqrt{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}} \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 4 \cdot 10^{+262}:\\ \;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(a \cdot -2, \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), 0\right), 2 \cdot \left({b}^{2} \cdot \left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+276}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{angle}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \sqrt{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{2}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 65.3% accurate, 0.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\ t_1 := \pi \cdot \frac{angle\_m}{180}\\ t_2 := \cos t\_1\\ t_3 := \sin t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_1\right) \cdot t\_2 \leq 10^{+107}:\\ \;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(a \cdot -2, \cos t\_0 \cdot t\_3, 0\right), 2 \cdot \left({b\_m}^{2} \cdot \left(\cos \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot {\left(\sqrt{\pi}\right)}^{2}\right) \cdot \sin \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t\_2 \cdot \left(\mathsf{hypot}\left(b\_m, a\right) \cdot \left(t\_3 \cdot \mathsf{hypot}\left(b\_m, a\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (* angle_m 0.005555555555555556)))
        (t_1 (* PI (/ angle_m 180.0)))
        (t_2 (cos t_1))
        (t_3 (sin t_0)))
   (*
    angle_s
    (if (<= (* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_1)) t_2) 1e+107)
      (fma
       a
       (fma (* a -2.0) (* (cos t_0) t_3) 0.0)
       (*
        2.0
        (*
         (pow b_m 2.0)
         (*
          (cos (* (* angle_m 0.005555555555555556) (pow (sqrt PI) 2.0)))
          (sin (* (* angle_m 0.005555555555555556) (cbrt (pow PI 3.0))))))))
      (* 2.0 (* t_2 (* (hypot b_m a) (* t_3 (hypot b_m a)))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double t_1 = ((double) M_PI) * (angle_m / 180.0);
	double t_2 = cos(t_1);
	double t_3 = sin(t_0);
	double tmp;
	if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_1)) * t_2) <= 1e+107) {
		tmp = fma(a, fma((a * -2.0), (cos(t_0) * t_3), 0.0), (2.0 * (pow(b_m, 2.0) * (cos(((angle_m * 0.005555555555555556) * pow(sqrt(((double) M_PI)), 2.0))) * sin(((angle_m * 0.005555555555555556) * cbrt(pow(((double) M_PI), 3.0))))))));
	} else {
		tmp = 2.0 * (t_2 * (hypot(b_m, a) * (t_3 * hypot(b_m, a))));
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	t_1 = Float64(pi * Float64(angle_m / 180.0))
	t_2 = cos(t_1)
	t_3 = sin(t_0)
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_1)) * t_2) <= 1e+107)
		tmp = fma(a, fma(Float64(a * -2.0), Float64(cos(t_0) * t_3), 0.0), Float64(2.0 * Float64((b_m ^ 2.0) * Float64(cos(Float64(Float64(angle_m * 0.005555555555555556) * (sqrt(pi) ^ 2.0))) * sin(Float64(Float64(angle_m * 0.005555555555555556) * cbrt((pi ^ 3.0))))))));
	else
		tmp = Float64(2.0 * Float64(t_2 * Float64(hypot(b_m, a) * Float64(t_3 * hypot(b_m, a)))));
	end
	return Float64(angle_s * tmp)
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$1], $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$0], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 1e+107], N[(a * N[(N[(a * -2.0), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * t$95$3), $MachinePrecision] + 0.0), $MachinePrecision] + N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * N[(N[Cos[N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$2 * N[(N[Sqrt[b$95$m ^ 2 + a ^ 2], $MachinePrecision] * N[(t$95$3 * N[Sqrt[b$95$m ^ 2 + a ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\
t_1 := \pi \cdot \frac{angle\_m}{180}\\
t_2 := \cos t\_1\\
t_3 := \sin t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_1\right) \cdot t\_2 \leq 10^{+107}:\\
\;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(a \cdot -2, \cos t\_0 \cdot t\_3, 0\right), 2 \cdot \left({b\_m}^{2} \cdot \left(\cos \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot {\left(\sqrt{\pi}\right)}^{2}\right) \cdot \sin \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_2 \cdot \left(\mathsf{hypot}\left(b\_m, a\right) \cdot \left(t\_3 \cdot \mathsf{hypot}\left(b\_m, a\right)\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 9.9999999999999997e106

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right)} \]
    10. Step-by-step derivation
      1. add-cbrt-cube59.2%

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
      2. pow359.2%

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    11. Applied egg-rr59.2%

      \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    12. Step-by-step derivation
      1. add-sqr-sqrt57.2%

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

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

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

    if 9.9999999999999997e106 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 40.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*41.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*41.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. Simplified41.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-sqrt29.5%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod38.6%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow238.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.7% accurate, 0.6× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := {b\_m}^{2} - {a}^{2}\\ t_2 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\ t_3 := \sqrt{{\left(t\_1 \cdot t\_2\right)}^{2}}\\ t_4 := \cos t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+49}:\\ \;\;\;\;2 \cdot \left(t\_4 \cdot \left(\left(b\_m - a\right) \cdot \left(t\_2 \cdot \left(b\_m + a\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+160}:\\ \;\;\;\;2 \cdot \left(t\_3 \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+253}:\\ \;\;\;\;\sqrt{{t\_1}^{2}} \cdot \left(2 \cdot \left(\sin t\_0 \cdot t\_4\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+281}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \left(2 \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(t\_2\right)\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t\_4 \cdot t\_3\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (- (pow b_m 2.0) (pow a 2.0)))
        (t_2 (sin (* PI (* angle_m 0.005555555555555556))))
        (t_3 (sqrt (pow (* t_1 t_2) 2.0)))
        (t_4 (cos t_0)))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e+49)
      (* 2.0 (* t_4 (* (- b_m a) (* t_2 (+ b_m a)))))
      (if (<= (/ angle_m 180.0) 1e+160)
        (* 2.0 (* t_3 (cos (* 0.005555555555555556 (* PI angle_m)))))
        (if (<= (/ angle_m 180.0) 2e+253)
          (* (sqrt (pow t_1 2.0)) (* 2.0 (* (sin t_0) t_4)))
          (if (<= (/ angle_m 180.0) 1e+281)
            (*
             (* (- b_m a) (+ b_m a))
             (*
              2.0
              (*
               (log1p (expm1 t_2))
               (cos (* (/ angle_m 180.0) (cbrt (pow PI 3.0)))))))
            (* 2.0 (* t_4 t_3)))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = pow(b_m, 2.0) - pow(a, 2.0);
	double t_2 = sin((((double) M_PI) * (angle_m * 0.005555555555555556)));
	double t_3 = sqrt(pow((t_1 * t_2), 2.0));
	double t_4 = cos(t_0);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = 2.0 * (t_4 * ((b_m - a) * (t_2 * (b_m + a))));
	} else if ((angle_m / 180.0) <= 1e+160) {
		tmp = 2.0 * (t_3 * cos((0.005555555555555556 * (((double) M_PI) * angle_m))));
	} else if ((angle_m / 180.0) <= 2e+253) {
		tmp = sqrt(pow(t_1, 2.0)) * (2.0 * (sin(t_0) * t_4));
	} else if ((angle_m / 180.0) <= 1e+281) {
		tmp = ((b_m - a) * (b_m + a)) * (2.0 * (log1p(expm1(t_2)) * cos(((angle_m / 180.0) * cbrt(pow(((double) M_PI), 3.0))))));
	} else {
		tmp = 2.0 * (t_4 * t_3);
	}
	return angle_s * tmp;
}
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, double b_m, double angle_m) {
	double t_0 = Math.PI * (angle_m / 180.0);
	double t_1 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double t_2 = Math.sin((Math.PI * (angle_m * 0.005555555555555556)));
	double t_3 = Math.sqrt(Math.pow((t_1 * t_2), 2.0));
	double t_4 = Math.cos(t_0);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = 2.0 * (t_4 * ((b_m - a) * (t_2 * (b_m + a))));
	} else if ((angle_m / 180.0) <= 1e+160) {
		tmp = 2.0 * (t_3 * Math.cos((0.005555555555555556 * (Math.PI * angle_m))));
	} else if ((angle_m / 180.0) <= 2e+253) {
		tmp = Math.sqrt(Math.pow(t_1, 2.0)) * (2.0 * (Math.sin(t_0) * t_4));
	} else if ((angle_m / 180.0) <= 1e+281) {
		tmp = ((b_m - a) * (b_m + a)) * (2.0 * (Math.log1p(Math.expm1(t_2)) * Math.cos(((angle_m / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0))))));
	} else {
		tmp = 2.0 * (t_4 * t_3);
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	t_2 = sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))
	t_3 = sqrt((Float64(t_1 * t_2) ^ 2.0))
	t_4 = cos(t_0)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e+49)
		tmp = Float64(2.0 * Float64(t_4 * Float64(Float64(b_m - a) * Float64(t_2 * Float64(b_m + a)))));
	elseif (Float64(angle_m / 180.0) <= 1e+160)
		tmp = Float64(2.0 * Float64(t_3 * cos(Float64(0.005555555555555556 * Float64(pi * angle_m)))));
	elseif (Float64(angle_m / 180.0) <= 2e+253)
		tmp = Float64(sqrt((t_1 ^ 2.0)) * Float64(2.0 * Float64(sin(t_0) * t_4)));
	elseif (Float64(angle_m / 180.0) <= 1e+281)
		tmp = Float64(Float64(Float64(b_m - a) * Float64(b_m + a)) * Float64(2.0 * Float64(log1p(expm1(t_2)) * cos(Float64(Float64(angle_m / 180.0) * cbrt((pi ^ 3.0)))))));
	else
		tmp = Float64(2.0 * Float64(t_4 * t_3));
	end
	return Float64(angle_s * tmp)
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[Power[N[(t$95$1 * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$0], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+49], N[(2.0 * N[(t$95$4 * N[(N[(b$95$m - a), $MachinePrecision] * N[(t$95$2 * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+160], N[(2.0 * N[(t$95$3 * N[Cos[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+253], N[(N[Sqrt[N[Power[t$95$1, 2.0], $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[Sin[t$95$0], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+281], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Log[1 + N[(Exp[t$95$2] - 1), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$4 * t$95$3), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := {b\_m}^{2} - {a}^{2}\\
t_2 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\
t_3 := \sqrt{{\left(t\_1 \cdot t\_2\right)}^{2}}\\
t_4 := \cos t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+49}:\\
\;\;\;\;2 \cdot \left(t\_4 \cdot \left(\left(b\_m - a\right) \cdot \left(t\_2 \cdot \left(b\_m + a\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+160}:\\
\;\;\;\;2 \cdot \left(t\_3 \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+253}:\\
\;\;\;\;\sqrt{{t\_1}^{2}} \cdot \left(2 \cdot \left(\sin t\_0 \cdot t\_4\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+281}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \left(2 \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(t\_2\right)\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_4 \cdot t\_3\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999946e48

    1. Initial program 58.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*59.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*59.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. Simplified59.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-sqrt33.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod36.2%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow236.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{{\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)}^{\left(\frac{2}{2}\right)}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. metadata-eval62.8%

        \[\leadsto 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)}^{\color{blue}{1}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. pow162.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\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(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. *-commutative62.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\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) \]
      5. *-commutative62.8%

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

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

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

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000001e160

    1. Initial program 31.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*31.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*31.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. Simplified31.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-sqr-sqrt17.6%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod34.0%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow234.0%

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

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

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

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

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

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

    if 1.00000000000000001e160 < (/.f64 angle #s(literal 180 binary64)) < 1.9999999999999999e253

    1. Initial program 14.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*14.1%

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

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

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

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

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

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

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

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

    if 1.9999999999999999e253 < (/.f64 angle #s(literal 180 binary64)) < 1e281

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
      2. pow332.8%

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    10. Applied egg-rr42.6%

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

    if 1e281 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 19.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*19.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*19.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. Simplified19.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-sqrt17.6%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod50.3%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow250.3%

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

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

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

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

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

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

Alternative 4: 65.9% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \sin t\_0\\ t_2 := {b\_m}^{2} - {a}^{2}\\ t_3 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\ t_4 := \cos t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+49}:\\ \;\;\;\;2 \cdot \left(t\_4 \cdot \left(\left(b\_m - a\right) \cdot \left(t\_3 \cdot \left(b\_m + a\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+160}:\\ \;\;\;\;2 \cdot \left(\sqrt{{\left(t\_2 \cdot t\_3\right)}^{2}} \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+253}:\\ \;\;\;\;\sqrt{{t\_2}^{2}} \cdot \left(2 \cdot \left(t\_1 \cdot t\_4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \left(2 \cdot \left(t\_1 \cdot \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1 (sin t_0))
        (t_2 (- (pow b_m 2.0) (pow a 2.0)))
        (t_3 (sin (* PI (* angle_m 0.005555555555555556))))
        (t_4 (cos t_0)))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e+49)
      (* 2.0 (* t_4 (* (- b_m a) (* t_3 (+ b_m a)))))
      (if (<= (/ angle_m 180.0) 1e+160)
        (*
         2.0
         (*
          (sqrt (pow (* t_2 t_3) 2.0))
          (cos (* 0.005555555555555556 (* PI angle_m)))))
        (if (<= (/ angle_m 180.0) 4e+253)
          (* (sqrt (pow t_2 2.0)) (* 2.0 (* t_1 t_4)))
          (*
           (* (- b_m a) (+ b_m a))
           (*
            2.0
            (*
             t_1
             (cos
              (*
               0.005555555555555556
               (* angle_m (cbrt (pow PI 3.0))))))))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = sin(t_0);
	double t_2 = pow(b_m, 2.0) - pow(a, 2.0);
	double t_3 = sin((((double) M_PI) * (angle_m * 0.005555555555555556)));
	double t_4 = cos(t_0);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = 2.0 * (t_4 * ((b_m - a) * (t_3 * (b_m + a))));
	} else if ((angle_m / 180.0) <= 1e+160) {
		tmp = 2.0 * (sqrt(pow((t_2 * t_3), 2.0)) * cos((0.005555555555555556 * (((double) M_PI) * angle_m))));
	} else if ((angle_m / 180.0) <= 4e+253) {
		tmp = sqrt(pow(t_2, 2.0)) * (2.0 * (t_1 * t_4));
	} else {
		tmp = ((b_m - a) * (b_m + a)) * (2.0 * (t_1 * cos((0.005555555555555556 * (angle_m * cbrt(pow(((double) M_PI), 3.0)))))));
	}
	return angle_s * tmp;
}
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, double b_m, double angle_m) {
	double t_0 = Math.PI * (angle_m / 180.0);
	double t_1 = Math.sin(t_0);
	double t_2 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double t_3 = Math.sin((Math.PI * (angle_m * 0.005555555555555556)));
	double t_4 = Math.cos(t_0);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = 2.0 * (t_4 * ((b_m - a) * (t_3 * (b_m + a))));
	} else if ((angle_m / 180.0) <= 1e+160) {
		tmp = 2.0 * (Math.sqrt(Math.pow((t_2 * t_3), 2.0)) * Math.cos((0.005555555555555556 * (Math.PI * angle_m))));
	} else if ((angle_m / 180.0) <= 4e+253) {
		tmp = Math.sqrt(Math.pow(t_2, 2.0)) * (2.0 * (t_1 * t_4));
	} else {
		tmp = ((b_m - a) * (b_m + a)) * (2.0 * (t_1 * Math.cos((0.005555555555555556 * (angle_m * Math.cbrt(Math.pow(Math.PI, 3.0)))))));
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = sin(t_0)
	t_2 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	t_3 = sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))
	t_4 = cos(t_0)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e+49)
		tmp = Float64(2.0 * Float64(t_4 * Float64(Float64(b_m - a) * Float64(t_3 * Float64(b_m + a)))));
	elseif (Float64(angle_m / 180.0) <= 1e+160)
		tmp = Float64(2.0 * Float64(sqrt((Float64(t_2 * t_3) ^ 2.0)) * cos(Float64(0.005555555555555556 * Float64(pi * angle_m)))));
	elseif (Float64(angle_m / 180.0) <= 4e+253)
		tmp = Float64(sqrt((t_2 ^ 2.0)) * Float64(2.0 * Float64(t_1 * t_4)));
	else
		tmp = Float64(Float64(Float64(b_m - a) * Float64(b_m + a)) * Float64(2.0 * Float64(t_1 * cos(Float64(0.005555555555555556 * Float64(angle_m * cbrt((pi ^ 3.0))))))));
	end
	return Float64(angle_s * tmp)
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Cos[t$95$0], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+49], N[(2.0 * N[(t$95$4 * N[(N[(b$95$m - a), $MachinePrecision] * N[(t$95$3 * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+160], N[(2.0 * N[(N[Sqrt[N[Power[N[(t$95$2 * t$95$3), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 4e+253], N[(N[Sqrt[N[Power[t$95$2, 2.0], $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(t$95$1 * N[Cos[N[(0.005555555555555556 * N[(angle$95$m * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \sin t\_0\\
t_2 := {b\_m}^{2} - {a}^{2}\\
t_3 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\
t_4 := \cos t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+49}:\\
\;\;\;\;2 \cdot \left(t\_4 \cdot \left(\left(b\_m - a\right) \cdot \left(t\_3 \cdot \left(b\_m + a\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+160}:\\
\;\;\;\;2 \cdot \left(\sqrt{{\left(t\_2 \cdot t\_3\right)}^{2}} \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+253}:\\
\;\;\;\;\sqrt{{t\_2}^{2}} \cdot \left(2 \cdot \left(t\_1 \cdot t\_4\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999946e48

    1. Initial program 58.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*59.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*59.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. Simplified59.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-sqrt33.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod36.2%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow236.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{{\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)}^{\left(\frac{2}{2}\right)}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. metadata-eval62.8%

        \[\leadsto 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)}^{\color{blue}{1}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. pow162.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\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(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. *-commutative62.8%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\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) \]
      5. *-commutative62.8%

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

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

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

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000001e160

    1. Initial program 31.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*31.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*31.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. Simplified31.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-sqr-sqrt17.6%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod34.0%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow234.0%

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

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

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

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

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

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

    if 1.00000000000000001e160 < (/.f64 angle #s(literal 180 binary64)) < 3.9999999999999997e253

    1. Initial program 14.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*14.1%

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

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

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

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

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

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

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

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

    if 3.9999999999999997e253 < (/.f64 angle #s(literal 180 binary64))

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
      2. pow327.6%

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    9. Applied egg-rr46.7%

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

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

Alternative 5: 61.7% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+273}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+279}:\\ \;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b\_m, \left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(b\_m \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (*
    angle_s
    (if (<= t_0 -5e+273)
      (*
       0.011111111111111112
       (- (* angle_m (* (pow b_m 2.0) PI)) (* a (* a (* PI angle_m)))))
      (if (<= t_0 5e+279)
        (*
         2.0
         (*
          (cos (* PI (/ angle_m 180.0)))
          (*
           (* (- b_m a) (+ b_m a))
           (sin (* 0.005555555555555556 (* PI angle_m))))))
        (fma
         b_m
         (* (* angle_m 0.011111111111111112) (* b_m PI))
         (* -0.011111111111111112 (* (pow a 2.0) (* PI angle_m)))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -5e+273) {
		tmp = 0.011111111111111112 * ((angle_m * (pow(b_m, 2.0) * ((double) M_PI))) - (a * (a * (((double) M_PI) * angle_m))));
	} else if (t_0 <= 5e+279) {
		tmp = 2.0 * (cos((((double) M_PI) * (angle_m / 180.0))) * (((b_m - a) * (b_m + a)) * sin((0.005555555555555556 * (((double) M_PI) * angle_m)))));
	} else {
		tmp = fma(b_m, ((angle_m * 0.011111111111111112) * (b_m * ((double) M_PI))), (-0.011111111111111112 * (pow(a, 2.0) * (((double) M_PI) * angle_m))));
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= -5e+273)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64((b_m ^ 2.0) * pi)) - Float64(a * Float64(a * Float64(pi * angle_m)))));
	elseif (t_0 <= 5e+279)
		tmp = Float64(2.0 * Float64(cos(Float64(pi * Float64(angle_m / 180.0))) * Float64(Float64(Float64(b_m - a) * Float64(b_m + a)) * sin(Float64(0.005555555555555556 * Float64(pi * angle_m))))));
	else
		tmp = fma(b_m, Float64(Float64(angle_m * 0.011111111111111112) * Float64(b_m * pi)), Float64(-0.011111111111111112 * Float64((a ^ 2.0) * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, -5e+273], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+279], N[(2.0 * N[(N[Cos[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b$95$m * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision] + N[(-0.011111111111111112 * N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+279}:\\
\;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b\_m, \left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(b\_m \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.99999999999999961e273

    1. Initial program 45.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*45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \color{blue}{\mathsf{fma}\left(angle \cdot \pi, b + -1 \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot a\right) \]
      6. distribute-rgt1-in69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{\left(-1 + 1\right) \cdot b}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      7. metadata-eval69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0} \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      8. mul0-lft69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      9. mul-1-neg69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, 0, \color{blue}{-a \cdot \left(angle \cdot \pi\right)}\right) \cdot a\right) \]
      10. fma-neg69.3%

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

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

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

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

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

    if -4.99999999999999961e273 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5.0000000000000002e279

    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. add-sqr-sqrt36.3%

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod36.1%

        \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow236.1%

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

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

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

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

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

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

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

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

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

      \[\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) \]
    10. Step-by-step derivation
      1. +-commutative56.9%

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

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

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

    if 5.0000000000000002e279 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 42.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*42.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, 0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right) + 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a + -1 \cdot a\right)\right)\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right)} \]
      3. associate-*r*62.9%

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

        \[\leadsto \mathsf{fma}\left(b, \left(0.011111111111111112 \cdot angle\right) \cdot \left(b \cdot \pi\right) + \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(a + -1 \cdot a\right)\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      5. distribute-lft-out62.9%

        \[\leadsto \mathsf{fma}\left(b, \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(b \cdot \pi + \pi \cdot \left(a + -1 \cdot a\right)\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      6. *-commutative62.9%

        \[\leadsto \mathsf{fma}\left(b, \color{blue}{\left(angle \cdot 0.011111111111111112\right)} \cdot \left(b \cdot \pi + \pi \cdot \left(a + -1 \cdot a\right)\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      7. *-commutative62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \color{blue}{\left(a + -1 \cdot a\right) \cdot \pi}\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      8. distribute-rgt1-in62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \color{blue}{\left(\left(-1 + 1\right) \cdot a\right)} \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      9. metadata-eval62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \left(\color{blue}{0} \cdot a\right) \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      10. mul0-lft62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \color{blue}{0} \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      11. distribute-rgt-out62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \color{blue}{\left(\pi \cdot \left(b + 0\right)\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      12. +-rgt-identity62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \color{blue}{b}\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      13. *-commutative62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \color{blue}{\left(b \cdot \pi\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      14. *-commutative62.9%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right), \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \cdot -0.011111111111111112}\right) \]
    10. Simplified62.9%

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

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

Alternative 6: 61.9% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+273}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+292}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(b\_m, \left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(b\_m \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (*
    angle_s
    (if (<= t_0 -5e+273)
      (*
       0.011111111111111112
       (- (* angle_m (* (pow b_m 2.0) PI)) (* a (* a (* PI angle_m)))))
      (if (<= t_0 5e+292)
        (*
         (* (- b_m a) (+ b_m a))
         (sin (* (* PI angle_m) 0.011111111111111112)))
        (fma
         b_m
         (* (* angle_m 0.011111111111111112) (* b_m PI))
         (* -0.011111111111111112 (* (pow a 2.0) (* PI angle_m)))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -5e+273) {
		tmp = 0.011111111111111112 * ((angle_m * (pow(b_m, 2.0) * ((double) M_PI))) - (a * (a * (((double) M_PI) * angle_m))));
	} else if (t_0 <= 5e+292) {
		tmp = ((b_m - a) * (b_m + a)) * sin(((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = fma(b_m, ((angle_m * 0.011111111111111112) * (b_m * ((double) M_PI))), (-0.011111111111111112 * (pow(a, 2.0) * (((double) M_PI) * angle_m))));
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= -5e+273)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64((b_m ^ 2.0) * pi)) - Float64(a * Float64(a * Float64(pi * angle_m)))));
	elseif (t_0 <= 5e+292)
		tmp = Float64(Float64(Float64(b_m - a) * Float64(b_m + a)) * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = fma(b_m, Float64(Float64(angle_m * 0.011111111111111112) * Float64(b_m * pi)), Float64(-0.011111111111111112 * Float64((a ^ 2.0) * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, -5e+273], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+292], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(b$95$m * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision] + N[(-0.011111111111111112 * N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b\_m, \left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(b\_m \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.99999999999999961e273

    1. Initial program 45.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*45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \color{blue}{\mathsf{fma}\left(angle \cdot \pi, b + -1 \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot a\right) \]
      6. distribute-rgt1-in69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{\left(-1 + 1\right) \cdot b}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      7. metadata-eval69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0} \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      8. mul0-lft69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      9. mul-1-neg69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, 0, \color{blue}{-a \cdot \left(angle \cdot \pi\right)}\right) \cdot a\right) \]
      10. fma-neg69.3%

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

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

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

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

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

    if -4.99999999999999961e273 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.9999999999999996e292

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999996e292 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 42.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*42.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(b, 0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right) + 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(a + -1 \cdot a\right)\right)\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right)} \]
      3. associate-*r*63.1%

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

        \[\leadsto \mathsf{fma}\left(b, \left(0.011111111111111112 \cdot angle\right) \cdot \left(b \cdot \pi\right) + \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(a + -1 \cdot a\right)\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      5. distribute-lft-out63.1%

        \[\leadsto \mathsf{fma}\left(b, \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(b \cdot \pi + \pi \cdot \left(a + -1 \cdot a\right)\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      6. *-commutative63.1%

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

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \color{blue}{\left(a + -1 \cdot a\right) \cdot \pi}\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      8. distribute-rgt1-in63.1%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \color{blue}{\left(\left(-1 + 1\right) \cdot a\right)} \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      9. metadata-eval63.1%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \left(\color{blue}{0} \cdot a\right) \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      10. mul0-lft63.1%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi + \color{blue}{0} \cdot \pi\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      11. distribute-rgt-out63.1%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \color{blue}{\left(\pi \cdot \left(b + 0\right)\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      12. +-rgt-identity63.1%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \color{blue}{b}\right), -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      13. *-commutative63.1%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \color{blue}{\left(b \cdot \pi\right)}, -0.011111111111111112 \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      14. *-commutative63.1%

        \[\leadsto \mathsf{fma}\left(b, \left(angle \cdot 0.011111111111111112\right) \cdot \left(b \cdot \pi\right), \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \cdot -0.011111111111111112}\right) \]
    10. Simplified63.1%

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

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

Alternative 7: 61.1% accurate, 0.8× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -5 \cdot 10^{+273}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+292}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left({a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right) + b\_m \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right) + 0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (*
    angle_s
    (if (<= t_0 -5e+273)
      (*
       0.011111111111111112
       (- (* angle_m (* (pow b_m 2.0) PI)) (* a (* a (* PI angle_m)))))
      (if (<= t_0 5e+292)
        (*
         (* (- b_m a) (+ b_m a))
         (sin (* (* PI angle_m) 0.011111111111111112)))
        (+
         (* -0.011111111111111112 (* (pow a 2.0) (* PI angle_m)))
         (*
          b_m
          (+
           (* 0.011111111111111112 (* angle_m (* b_m PI)))
           (* 0.011111111111111112 (* angle_m (* PI (- a a))))))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -5e+273) {
		tmp = 0.011111111111111112 * ((angle_m * (pow(b_m, 2.0) * ((double) M_PI))) - (a * (a * (((double) M_PI) * angle_m))));
	} else if (t_0 <= 5e+292) {
		tmp = ((b_m - a) * (b_m + a)) * sin(((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = (-0.011111111111111112 * (pow(a, 2.0) * (((double) M_PI) * angle_m))) + (b_m * ((0.011111111111111112 * (angle_m * (b_m * ((double) M_PI)))) + (0.011111111111111112 * (angle_m * (((double) M_PI) * (a - a))))));
	}
	return angle_s * tmp;
}
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, double b_m, double angle_m) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_0 <= -5e+273) {
		tmp = 0.011111111111111112 * ((angle_m * (Math.pow(b_m, 2.0) * Math.PI)) - (a * (a * (Math.PI * angle_m))));
	} else if (t_0 <= 5e+292) {
		tmp = ((b_m - a) * (b_m + a)) * Math.sin(((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = (-0.011111111111111112 * (Math.pow(a, 2.0) * (Math.PI * angle_m))) + (b_m * ((0.011111111111111112 * (angle_m * (b_m * Math.PI))) + (0.011111111111111112 * (angle_m * (Math.PI * (a - a))))));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	tmp = 0
	if t_0 <= -5e+273:
		tmp = 0.011111111111111112 * ((angle_m * (math.pow(b_m, 2.0) * math.pi)) - (a * (a * (math.pi * angle_m))))
	elif t_0 <= 5e+292:
		tmp = ((b_m - a) * (b_m + a)) * math.sin(((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = (-0.011111111111111112 * (math.pow(a, 2.0) * (math.pi * angle_m))) + (b_m * ((0.011111111111111112 * (angle_m * (b_m * math.pi))) + (0.011111111111111112 * (angle_m * (math.pi * (a - a))))))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= -5e+273)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64((b_m ^ 2.0) * pi)) - Float64(a * Float64(a * Float64(pi * angle_m)))));
	elseif (t_0 <= 5e+292)
		tmp = Float64(Float64(Float64(b_m - a) * Float64(b_m + a)) * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(Float64(-0.011111111111111112 * Float64((a ^ 2.0) * Float64(pi * angle_m))) + Float64(b_m * Float64(Float64(0.011111111111111112 * Float64(angle_m * Float64(b_m * pi))) + Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(a - a)))))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -5e+273)
		tmp = 0.011111111111111112 * ((angle_m * ((b_m ^ 2.0) * pi)) - (a * (a * (pi * angle_m))));
	elseif (t_0 <= 5e+292)
		tmp = ((b_m - a) * (b_m + a)) * sin(((pi * angle_m) * 0.011111111111111112));
	else
		tmp = (-0.011111111111111112 * ((a ^ 2.0) * (pi * angle_m))) + (b_m * ((0.011111111111111112 * (angle_m * (b_m * pi))) + (0.011111111111111112 * (angle_m * (pi * (a - a))))));
	end
	tmp_2 = angle_s * tmp;
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, -5e+273], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+292], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b$95$m * N[(N[(0.011111111111111112 * N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(a - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -4.99999999999999961e273

    1. Initial program 45.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*45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \color{blue}{\mathsf{fma}\left(angle \cdot \pi, b + -1 \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot a\right) \]
      6. distribute-rgt1-in69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{\left(-1 + 1\right) \cdot b}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      7. metadata-eval69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0} \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      8. mul0-lft69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      9. mul-1-neg69.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, 0, \color{blue}{-a \cdot \left(angle \cdot \pi\right)}\right) \cdot a\right) \]
      10. fma-neg69.3%

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

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

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

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

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

    if -4.99999999999999961e273 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.9999999999999996e292

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999996e292 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 42.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*42.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 67.9% accurate, 1.9× speedup?

\[\begin{array}{l} 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(\cos \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(b\_m - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(b\_m + a\right)\right)\right)\right)\right) \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (*
  angle_s
  (*
   2.0
   (*
    (cos (* PI (/ angle_m 180.0)))
    (*
     (- b_m a)
     (* (sin (* PI (* angle_m 0.005555555555555556))) (+ b_m a)))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	return angle_s * (2.0 * (cos((((double) M_PI) * (angle_m / 180.0))) * ((b_m - a) * (sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (b_m + 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, double b_m, double angle_m) {
	return angle_s * (2.0 * (Math.cos((Math.PI * (angle_m / 180.0))) * ((b_m - a) * (Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (b_m + a)))));
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	return angle_s * (2.0 * (math.cos((math.pi * (angle_m / 180.0))) * ((b_m - a) * (math.sin((math.pi * (angle_m * 0.005555555555555556))) * (b_m + a)))))
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	return Float64(angle_s * Float64(2.0 * Float64(cos(Float64(pi * Float64(angle_m / 180.0))) * Float64(Float64(b_m - a) * Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(b_m + a))))))
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b_m, angle_m)
	tmp = angle_s * (2.0 * (cos((pi * (angle_m / 180.0))) * ((b_m - a) * (sin((pi * (angle_m * 0.005555555555555556))) * (b_m + a)))));
end
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_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(2.0 * N[(N[Cos[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
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(\cos \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(b\_m - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(b\_m + a\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.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*50.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*50.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. Simplified50.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. add-sqr-sqrt28.5%

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\sqrt{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \sqrt{\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. sqrt-unprod34.4%

      \[\leadsto 2 \cdot \left(\color{blue}{\sqrt{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \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. pow234.4%

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\color{blue}{{\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)}^{\left(\frac{2}{2}\right)}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    2. metadata-eval54.6%

      \[\leadsto 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)}^{\color{blue}{1}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    3. pow154.6%

      \[\leadsto 2 \cdot \left(\color{blue}{\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(\pi \cdot \frac{angle}{180}\right)\right) \]
    4. *-commutative54.6%

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\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) \]
    5. *-commutative54.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) \]
    6. associate-*l*63.7%

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

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

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

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

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

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

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

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

Alternative 9: 60.4% accurate, 3.0× speedup?

\[\begin{array}{l} 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\right) \cdot \left(b\_m + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{-272}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{-129}:\\ \;\;\;\;0.011111111111111112 \cdot \left(b\_m \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right) + angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+73}:\\ \;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (- b_m a) (+ b_m a))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 2e-272)
      (*
       0.011111111111111112
       (- (* angle_m (* (pow b_m 2.0) PI)) (* a (* a (* PI angle_m)))))
      (if (<= (/ angle_m 180.0) 5e-129)
        (*
         0.011111111111111112
         (-
          (* b_m (+ (* angle_m (* b_m PI)) (* angle_m (* PI (- a a)))))
          (* (pow a 2.0) (* PI angle_m))))
        (if (<= (/ angle_m 180.0) 1e+73)
          (* t_0 (sin (* (* PI angle_m) 0.011111111111111112)))
          (* t_0 (* 2.0 (sin (* PI (/ angle_m 180.0)))))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if ((angle_m / 180.0) <= 2e-272) {
		tmp = 0.011111111111111112 * ((angle_m * (pow(b_m, 2.0) * ((double) M_PI))) - (a * (a * (((double) M_PI) * angle_m))));
	} else if ((angle_m / 180.0) <= 5e-129) {
		tmp = 0.011111111111111112 * ((b_m * ((angle_m * (b_m * ((double) M_PI))) + (angle_m * (((double) M_PI) * (a - a))))) - (pow(a, 2.0) * (((double) M_PI) * angle_m)));
	} else if ((angle_m / 180.0) <= 1e+73) {
		tmp = t_0 * sin(((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = t_0 * (2.0 * sin((((double) M_PI) * (angle_m / 180.0))));
	}
	return angle_s * tmp;
}
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, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if ((angle_m / 180.0) <= 2e-272) {
		tmp = 0.011111111111111112 * ((angle_m * (Math.pow(b_m, 2.0) * Math.PI)) - (a * (a * (Math.PI * angle_m))));
	} else if ((angle_m / 180.0) <= 5e-129) {
		tmp = 0.011111111111111112 * ((b_m * ((angle_m * (b_m * Math.PI)) + (angle_m * (Math.PI * (a - a))))) - (Math.pow(a, 2.0) * (Math.PI * angle_m)));
	} else if ((angle_m / 180.0) <= 1e+73) {
		tmp = t_0 * Math.sin(((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = t_0 * (2.0 * Math.sin((Math.PI * (angle_m / 180.0))));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = (b_m - a) * (b_m + a)
	tmp = 0
	if (angle_m / 180.0) <= 2e-272:
		tmp = 0.011111111111111112 * ((angle_m * (math.pow(b_m, 2.0) * math.pi)) - (a * (a * (math.pi * angle_m))))
	elif (angle_m / 180.0) <= 5e-129:
		tmp = 0.011111111111111112 * ((b_m * ((angle_m * (b_m * math.pi)) + (angle_m * (math.pi * (a - a))))) - (math.pow(a, 2.0) * (math.pi * angle_m)))
	elif (angle_m / 180.0) <= 1e+73:
		tmp = t_0 * math.sin(((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = t_0 * (2.0 * math.sin((math.pi * (angle_m / 180.0))))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(b_m - a) * Float64(b_m + a))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 2e-272)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64((b_m ^ 2.0) * pi)) - Float64(a * Float64(a * Float64(pi * angle_m)))));
	elseif (Float64(angle_m / 180.0) <= 5e-129)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * Float64(Float64(angle_m * Float64(b_m * pi)) + Float64(angle_m * Float64(pi * Float64(a - a))))) - Float64((a ^ 2.0) * Float64(pi * angle_m))));
	elseif (Float64(angle_m / 180.0) <= 1e+73)
		tmp = Float64(t_0 * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(t_0 * Float64(2.0 * sin(Float64(pi * Float64(angle_m / 180.0)))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (b_m - a) * (b_m + a);
	tmp = 0.0;
	if ((angle_m / 180.0) <= 2e-272)
		tmp = 0.011111111111111112 * ((angle_m * ((b_m ^ 2.0) * pi)) - (a * (a * (pi * angle_m))));
	elseif ((angle_m / 180.0) <= 5e-129)
		tmp = 0.011111111111111112 * ((b_m * ((angle_m * (b_m * pi)) + (angle_m * (pi * (a - a))))) - ((a ^ 2.0) * (pi * angle_m)));
	elseif ((angle_m / 180.0) <= 1e+73)
		tmp = t_0 * sin(((pi * angle_m) * 0.011111111111111112));
	else
		tmp = t_0 * (2.0 * sin((pi * (angle_m / 180.0))));
	end
	tmp_2 = angle_s * tmp;
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e-272], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e-129], N[(0.011111111111111112 * N[(N[(b$95$m * N[(N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(Pi * N[(a - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+73], N[(t$95$0 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(2.0 * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
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\right) \cdot \left(b\_m + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{-272}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+73}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 1.99999999999999986e-272

    1. Initial program 47.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*47.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \color{blue}{\mathsf{fma}\left(angle \cdot \pi, b + -1 \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot a\right) \]
      6. distribute-rgt1-in54.2%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{\left(-1 + 1\right) \cdot b}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      7. metadata-eval54.2%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0} \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      8. mul0-lft54.2%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      9. mul-1-neg54.2%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, 0, \color{blue}{-a \cdot \left(angle \cdot \pi\right)}\right) \cdot a\right) \]
      10. fma-neg54.2%

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

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

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

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

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

    if 1.99999999999999986e-272 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000027e-129

    1. Initial program 71.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*71.1%

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000027e-129 < (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999983e72

    1. Initial program 77.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*77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999983e72 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 60.8% accurate, 3.2× speedup?

\[\begin{array}{l} 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\right) \cdot \left(b\_m + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{-56}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+73}:\\ \;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (- b_m a) (+ b_m a))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 5e-56)
      (*
       0.011111111111111112
       (- (* angle_m (* (pow b_m 2.0) PI)) (* a (* a (* PI angle_m)))))
      (if (<= (/ angle_m 180.0) 1e+73)
        (* t_0 (sin (* (* PI angle_m) 0.011111111111111112)))
        (* t_0 (* 2.0 (sin (* PI (/ angle_m 180.0))))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if ((angle_m / 180.0) <= 5e-56) {
		tmp = 0.011111111111111112 * ((angle_m * (pow(b_m, 2.0) * ((double) M_PI))) - (a * (a * (((double) M_PI) * angle_m))));
	} else if ((angle_m / 180.0) <= 1e+73) {
		tmp = t_0 * sin(((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = t_0 * (2.0 * sin((((double) M_PI) * (angle_m / 180.0))));
	}
	return angle_s * tmp;
}
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, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if ((angle_m / 180.0) <= 5e-56) {
		tmp = 0.011111111111111112 * ((angle_m * (Math.pow(b_m, 2.0) * Math.PI)) - (a * (a * (Math.PI * angle_m))));
	} else if ((angle_m / 180.0) <= 1e+73) {
		tmp = t_0 * Math.sin(((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = t_0 * (2.0 * Math.sin((Math.PI * (angle_m / 180.0))));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = (b_m - a) * (b_m + a)
	tmp = 0
	if (angle_m / 180.0) <= 5e-56:
		tmp = 0.011111111111111112 * ((angle_m * (math.pow(b_m, 2.0) * math.pi)) - (a * (a * (math.pi * angle_m))))
	elif (angle_m / 180.0) <= 1e+73:
		tmp = t_0 * math.sin(((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = t_0 * (2.0 * math.sin((math.pi * (angle_m / 180.0))))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(b_m - a) * Float64(b_m + a))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 5e-56)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64((b_m ^ 2.0) * pi)) - Float64(a * Float64(a * Float64(pi * angle_m)))));
	elseif (Float64(angle_m / 180.0) <= 1e+73)
		tmp = Float64(t_0 * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(t_0 * Float64(2.0 * sin(Float64(pi * Float64(angle_m / 180.0)))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (b_m - a) * (b_m + a);
	tmp = 0.0;
	if ((angle_m / 180.0) <= 5e-56)
		tmp = 0.011111111111111112 * ((angle_m * ((b_m ^ 2.0) * pi)) - (a * (a * (pi * angle_m))));
	elseif ((angle_m / 180.0) <= 1e+73)
		tmp = t_0 * sin(((pi * angle_m) * 0.011111111111111112));
	else
		tmp = t_0 * (2.0 * sin((pi * (angle_m / 180.0))));
	end
	tmp_2 = angle_s * tmp;
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e-56], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+73], N[(t$95$0 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(2.0 * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
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\right) \cdot \left(b\_m + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{-56}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+73}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 4.99999999999999997e-56

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \color{blue}{\mathsf{fma}\left(angle \cdot \pi, b + -1 \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot a\right) \]
      6. distribute-rgt1-in63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{\left(-1 + 1\right) \cdot b}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      7. metadata-eval63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0} \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      8. mul0-lft63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      9. mul-1-neg63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, 0, \color{blue}{-a \cdot \left(angle \cdot \pi\right)}\right) \cdot a\right) \]
      10. fma-neg63.6%

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

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

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

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

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

    if 4.99999999999999997e-56 < (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999983e72

    1. Initial program 61.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*61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999983e72 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 59.9% accurate, 3.4× speedup?

\[\begin{array}{l} 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\right) \cdot \left(b\_m + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 8 \cdot 10^{-51}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 5.2 \cdot 10^{+163}:\\ \;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot t\_0\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (- b_m a) (+ b_m a))))
   (*
    angle_s
    (if (<= angle_m 8e-51)
      (*
       0.011111111111111112
       (- (* angle_m (* (pow b_m 2.0) PI)) (* a (* a (* PI angle_m)))))
      (if (<= angle_m 5.2e+163)
        (* t_0 (sin (* (* PI angle_m) 0.011111111111111112)))
        (* 0.011111111111111112 (* angle_m (* PI t_0))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if (angle_m <= 8e-51) {
		tmp = 0.011111111111111112 * ((angle_m * (pow(b_m, 2.0) * ((double) M_PI))) - (a * (a * (((double) M_PI) * angle_m))));
	} else if (angle_m <= 5.2e+163) {
		tmp = t_0 * sin(((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * t_0));
	}
	return angle_s * tmp;
}
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, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if (angle_m <= 8e-51) {
		tmp = 0.011111111111111112 * ((angle_m * (Math.pow(b_m, 2.0) * Math.PI)) - (a * (a * (Math.PI * angle_m))));
	} else if (angle_m <= 5.2e+163) {
		tmp = t_0 * Math.sin(((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * t_0));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = (b_m - a) * (b_m + a)
	tmp = 0
	if angle_m <= 8e-51:
		tmp = 0.011111111111111112 * ((angle_m * (math.pow(b_m, 2.0) * math.pi)) - (a * (a * (math.pi * angle_m))))
	elif angle_m <= 5.2e+163:
		tmp = t_0 * math.sin(((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * t_0))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(b_m - a) * Float64(b_m + a))
	tmp = 0.0
	if (angle_m <= 8e-51)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64((b_m ^ 2.0) * pi)) - Float64(a * Float64(a * Float64(pi * angle_m)))));
	elseif (angle_m <= 5.2e+163)
		tmp = Float64(t_0 * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * t_0)));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (b_m - a) * (b_m + a);
	tmp = 0.0;
	if (angle_m <= 8e-51)
		tmp = 0.011111111111111112 * ((angle_m * ((b_m ^ 2.0) * pi)) - (a * (a * (pi * angle_m))));
	elseif (angle_m <= 5.2e+163)
		tmp = t_0 * sin(((pi * angle_m) * 0.011111111111111112));
	else
		tmp = 0.011111111111111112 * (angle_m * (pi * t_0));
	end
	tmp_2 = angle_s * tmp;
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 8e-51], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] - N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 5.2e+163], N[(t$95$0 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
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\right) \cdot \left(b\_m + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 8 \cdot 10^{-51}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left({b\_m}^{2} \cdot \pi\right) - a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

\mathbf{elif}\;angle\_m \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot t\_0\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 8.0000000000000001e-51

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \color{blue}{\mathsf{fma}\left(angle \cdot \pi, b + -1 \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)} \cdot a\right) \]
      6. distribute-rgt1-in63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{\left(-1 + 1\right) \cdot b}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      7. metadata-eval63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0} \cdot b, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      8. mul0-lft63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, \color{blue}{0}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
      9. mul-1-neg63.6%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left({b}^{2} \cdot \pi\right) + \mathsf{fma}\left(angle \cdot \pi, 0, \color{blue}{-a \cdot \left(angle \cdot \pi\right)}\right) \cdot a\right) \]
      10. fma-neg63.6%

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

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

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

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

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

    if 8.0000000000000001e-51 < angle < 5.2000000000000003e163

    1. Initial program 47.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*47.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000003e163 < angle

    1. Initial program 19.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*19.0%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 56.7% accurate, 3.6× speedup?

\[\begin{array}{l} 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\right) \cdot \left(b\_m + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+163}:\\ \;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot t\_0\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (- b_m a) (+ b_m a))))
   (*
    angle_s
    (if (<= angle_m 5.2e+163)
      (* t_0 (sin (* (* PI angle_m) 0.011111111111111112)))
      (* 0.011111111111111112 (* angle_m (* PI t_0)))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if (angle_m <= 5.2e+163) {
		tmp = t_0 * sin(((((double) M_PI) * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * t_0));
	}
	return angle_s * tmp;
}
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, double b_m, double angle_m) {
	double t_0 = (b_m - a) * (b_m + a);
	double tmp;
	if (angle_m <= 5.2e+163) {
		tmp = t_0 * Math.sin(((Math.PI * angle_m) * 0.011111111111111112));
	} else {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * t_0));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = (b_m - a) * (b_m + a)
	tmp = 0
	if angle_m <= 5.2e+163:
		tmp = t_0 * math.sin(((math.pi * angle_m) * 0.011111111111111112))
	else:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * t_0))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(b_m - a) * Float64(b_m + a))
	tmp = 0.0
	if (angle_m <= 5.2e+163)
		tmp = Float64(t_0 * sin(Float64(Float64(pi * angle_m) * 0.011111111111111112)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * t_0)));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (b_m - a) * (b_m + a);
	tmp = 0.0;
	if (angle_m <= 5.2e+163)
		tmp = t_0 * sin(((pi * angle_m) * 0.011111111111111112));
	else
		tmp = 0.011111111111111112 * (angle_m * (pi * t_0));
	end
	tmp_2 = angle_s * tmp;
end
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_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 5.2e+163], N[(t$95$0 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
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\right) \cdot \left(b\_m + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot t\_0\right)\right)\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000003e163 < angle

    1. Initial program 19.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*19.0%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 54.1% accurate, 32.2× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)\right)\right)\right) \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (*
  angle_s
  (* 0.011111111111111112 (* angle_m (* PI (* (- b_m a) (+ b_m a)))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (((double) M_PI) * ((b_m - a) * (b_m + 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, double b_m, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (Math.PI * ((b_m - a) * (b_m + a)))));
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	return angle_s * (0.011111111111111112 * (angle_m * (math.pi * ((b_m - a) * (b_m + a)))))
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(b_m - a) * Float64(b_m + a))))))
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b_m, angle_m)
	tmp = angle_s * (0.011111111111111112 * (angle_m * (pi * ((b_m - a) * (b_m + a)))));
end
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_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 54.1% accurate, 32.2× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)\right)\right) \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (*
  angle_s
  (* (* angle_m 0.011111111111111112) (* PI (* (- b_m a) (+ b_m a))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	return angle_s * ((angle_m * 0.011111111111111112) * (((double) M_PI) * ((b_m - a) * (b_m + 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, double b_m, double angle_m) {
	return angle_s * ((angle_m * 0.011111111111111112) * (Math.PI * ((b_m - a) * (b_m + a))));
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	return angle_s * ((angle_m * 0.011111111111111112) * (math.pi * ((b_m - a) * (b_m + a))))
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	return Float64(angle_s * Float64(Float64(angle_m * 0.011111111111111112) * Float64(pi * Float64(Float64(b_m - a) * Float64(b_m + a)))))
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b_m, angle_m)
	tmp = angle_s * ((angle_m * 0.011111111111111112) * (pi * ((b_m - a) * (b_m + a))));
end
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_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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