ab-angle->ABCF B

Percentage Accurate: 54.0% → 67.3%
Time: 46.3s
Alternatives: 9
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 9 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: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 67.3% accurate, 1.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 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 2 \cdot 10^{+217}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot t\_0\right)\right) \cdot \left(b\_m + a\right)\\ \mathbf{elif}\;b\_m \leq 1.9 \cdot 10^{+264}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle\_m \cdot \left(b\_m + a\right)\right) \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle\_m}{180}\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))))
   (*
    angle_s
    (if (<= b_m 2e+217)
      (* (* (- b_m a) (sin (* 2.0 t_0))) (+ b_m a))
      (if (<= b_m 1.9e+264)
        (* 0.011111111111111112 (* (* angle_m (+ b_m a)) (* (- b_m a) PI)))
        (*
         (* (* 2.0 (* (- b_m a) (+ b_m a))) (sin (expm1 (log1p t_0))))
         (cos (* 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 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double tmp;
	if (b_m <= 2e+217) {
		tmp = ((b_m - a) * sin((2.0 * t_0))) * (b_m + a);
	} else if (b_m <= 1.9e+264) {
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * ((b_m - a) * ((double) M_PI)));
	} else {
		tmp = ((2.0 * ((b_m - a) * (b_m + a))) * sin(expm1(log1p(t_0)))) * cos((((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 = Math.PI * (angle_m * 0.005555555555555556);
	double tmp;
	if (b_m <= 2e+217) {
		tmp = ((b_m - a) * Math.sin((2.0 * t_0))) * (b_m + a);
	} else if (b_m <= 1.9e+264) {
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * ((b_m - a) * Math.PI));
	} else {
		tmp = ((2.0 * ((b_m - a) * (b_m + a))) * Math.sin(Math.expm1(Math.log1p(t_0)))) * Math.cos((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 = math.pi * (angle_m * 0.005555555555555556)
	tmp = 0
	if b_m <= 2e+217:
		tmp = ((b_m - a) * math.sin((2.0 * t_0))) * (b_m + a)
	elif b_m <= 1.9e+264:
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * ((b_m - a) * math.pi))
	else:
		tmp = ((2.0 * ((b_m - a) * (b_m + a))) * math.sin(math.expm1(math.log1p(t_0)))) * math.cos((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(pi * Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (b_m <= 2e+217)
		tmp = Float64(Float64(Float64(b_m - a) * sin(Float64(2.0 * t_0))) * Float64(b_m + a));
	elseif (b_m <= 1.9e+264)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64(b_m + a)) * Float64(Float64(b_m - a) * pi)));
	else
		tmp = Float64(Float64(Float64(2.0 * Float64(Float64(b_m - a) * Float64(b_m + a))) * sin(expm1(log1p(t_0)))) * cos(Float64(pi * Float64(angle_m / 180.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 * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 2e+217], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 1.9e+264], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle$95$m / 180.0), $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)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 2 \cdot 10^{+217}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot t\_0\right)\right) \cdot \left(b\_m + a\right)\\

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

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right)\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle\_m}{180}\right)\\


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

    1. Initial program 55.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*55.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. *-commutative55.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*55.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. Simplified55.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. unpow255.7%

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

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

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

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

        \[\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(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right)\right)\right) \]
      2. un-div-inv59.3%

        \[\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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    8. Applied egg-rr59.3%

      \[\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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. associate-/r/58.3%

        \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    10. Simplified58.3%

      \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*58.3%

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

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

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

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

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

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

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

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

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

    if 1.99999999999999992e217 < b < 1.9000000000000001e264

    1. Initial program 12.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*12.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. *-commutative12.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*12.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. Simplified12.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. unpow212.1%

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Taylor expanded in angle around 0 57.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)} \]
    8. Step-by-step derivation
      1. associate-*r*57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e264 < b

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.5% 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) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 2.3 \cdot 10^{+221}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(b\_m + a\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{b\_m + a} \cdot \sqrt[3]{\left(b\_m - a\right) \cdot \sin \left(e^{\log \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)}\right)}\right)}^{3}\\ \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
 (*
  angle_s
  (if (<= b_m 2.3e+221)
    (*
     (* (- b_m a) (sin (* 2.0 (* PI (* angle_m 0.005555555555555556)))))
     (+ b_m a))
    (pow
     (*
      (cbrt (+ b_m a))
      (cbrt
       (*
        (- b_m a)
        (sin (exp (log (* PI (* angle_m 0.011111111111111112))))))))
     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 tmp;
	if (b_m <= 2.3e+221) {
		tmp = ((b_m - a) * sin((2.0 * (((double) M_PI) * (angle_m * 0.005555555555555556))))) * (b_m + a);
	} else {
		tmp = pow((cbrt((b_m + a)) * cbrt(((b_m - a) * sin(exp(log((((double) M_PI) * (angle_m * 0.011111111111111112)))))))), 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 tmp;
	if (b_m <= 2.3e+221) {
		tmp = ((b_m - a) * Math.sin((2.0 * (Math.PI * (angle_m * 0.005555555555555556))))) * (b_m + a);
	} else {
		tmp = Math.pow((Math.cbrt((b_m + a)) * Math.cbrt(((b_m - a) * Math.sin(Math.exp(Math.log((Math.PI * (angle_m * 0.011111111111111112)))))))), 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)
	tmp = 0.0
	if (b_m <= 2.3e+221)
		tmp = Float64(Float64(Float64(b_m - a) * sin(Float64(2.0 * Float64(pi * Float64(angle_m * 0.005555555555555556))))) * Float64(b_m + a));
	else
		tmp = Float64(cbrt(Float64(b_m + a)) * cbrt(Float64(Float64(b_m - a) * sin(exp(log(Float64(pi * Float64(angle_m * 0.011111111111111112)))))))) ^ 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_] := N[(angle$95$s * If[LessEqual[b$95$m, 2.3e+221], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(b$95$m + a), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[Exp[N[Log[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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 \begin{array}{l}
\mathbf{if}\;b\_m \leq 2.3 \cdot 10^{+221}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(b\_m + a\right)\\

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


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

    1. Initial program 55.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*55.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. *-commutative55.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*55.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. Simplified55.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. unpow255.7%

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

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

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

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

        \[\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(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right)\right)\right) \]
      2. un-div-inv59.3%

        \[\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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    8. Applied egg-rr59.3%

      \[\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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. associate-/r/58.3%

        \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    10. Simplified58.3%

      \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*58.3%

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

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

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

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

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

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

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

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

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

    if 2.29999999999999987e221 < b

    1. Initial program 29.9%

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

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

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*29.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. Simplified29.9%

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

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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)} \cdot \sqrt[3]{\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)}\right) \cdot \sqrt[3]{\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)}} \]
      2. pow329.9%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}\right)}^{3}} \]
      3. 2-sin29.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\color{blue}{\left(\sqrt[3]{a + b} \cdot \sqrt[3]{\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right)}}^{3} \]
    11. Step-by-step derivation
      1. add-exp-log46.3%

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

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

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

Alternative 3: 63.3% 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 \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 10^{-292}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle\_m \cdot \left(b\_m + a\right)\right) \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\\ \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
 (*
  angle_s
  (if (<= (pow a 2.0) 1e-292)
    (*
     (* (- b_m a) (+ b_m a))
     (sin (* 2.0 (* angle_m (* PI 0.005555555555555556)))))
    (* 0.011111111111111112 (* (* angle_m (+ b_m a)) (* (- b_m a) PI))))))
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 tmp;
	if (pow(a, 2.0) <= 1e-292) {
		tmp = ((b_m - a) * (b_m + a)) * sin((2.0 * (angle_m * (((double) M_PI) * 0.005555555555555556))));
	} else {
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * ((b_m - a) * ((double) M_PI)));
	}
	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 tmp;
	if (Math.pow(a, 2.0) <= 1e-292) {
		tmp = ((b_m - a) * (b_m + a)) * Math.sin((2.0 * (angle_m * (Math.PI * 0.005555555555555556))));
	} else {
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * ((b_m - a) * Math.PI));
	}
	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):
	tmp = 0
	if math.pow(a, 2.0) <= 1e-292:
		tmp = ((b_m - a) * (b_m + a)) * math.sin((2.0 * (angle_m * (math.pi * 0.005555555555555556))))
	else:
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * ((b_m - a) * math.pi))
	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)
	tmp = 0.0
	if ((a ^ 2.0) <= 1e-292)
		tmp = Float64(Float64(Float64(b_m - a) * Float64(b_m + a)) * sin(Float64(2.0 * Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64(b_m + a)) * Float64(Float64(b_m - a) * pi)));
	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)
	tmp = 0.0;
	if ((a ^ 2.0) <= 1e-292)
		tmp = ((b_m - a) * (b_m + a)) * sin((2.0 * (angle_m * (pi * 0.005555555555555556))));
	else
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * ((b_m - a) * pi));
	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_] := N[(angle$95$s * If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 1e-292], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $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 \begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 10^{-292}:\\
\;\;\;\;\left(\left(b\_m - a\right) \cdot \left(b\_m + a\right)\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a #s(literal 2 binary64)) < 1.0000000000000001e-292

    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. Step-by-step derivation
      1. unpow271.1%

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Step-by-step derivation
      1. clear-num72.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 \cos \left(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right)\right)\right) \]
      2. un-div-inv69.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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    8. Applied egg-rr69.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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. associate-/r/69.9%

        \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    10. Simplified69.9%

      \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*69.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)\right)\right)}^{1}} \]
    12. Applied egg-rr72.4%

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e-292 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 46.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*46.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. *-commutative46.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*46.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. Simplified46.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. unpow246.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(b + a\right)}\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)}^{1} \]
    13. Applied egg-rr65.9%

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

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

Alternative 4: 62.7% 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 \pi\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3.8 \cdot 10^{+64}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle\_m \cdot \left(b\_m + a\right)\right) \cdot t\_0\right)\\ \mathbf{elif}\;angle\_m \leq 2.2 \cdot 10^{+270}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\right) \cdot \left(a \cdot \left(-\pi\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\right) \cdot \left|t\_0\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 (* (- b_m a) PI)))
   (*
    angle_s
    (if (<= angle_m 3.8e+64)
      (* 0.011111111111111112 (* (* angle_m (+ b_m a)) t_0))
      (if (<= angle_m 2.2e+270)
        (* 0.011111111111111112 (* angle_m (* (+ b_m a) (* a (- PI)))))
        (* 0.011111111111111112 (* angle_m (* (+ b_m a) (fabs 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) * ((double) M_PI);
	double tmp;
	if (angle_m <= 3.8e+64) {
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * t_0);
	} else if (angle_m <= 2.2e+270) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * fabs(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) * Math.PI;
	double tmp;
	if (angle_m <= 3.8e+64) {
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * t_0);
	} else if (angle_m <= 2.2e+270) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * Math.abs(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) * math.pi
	tmp = 0
	if angle_m <= 3.8e+64:
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * t_0)
	elif angle_m <= 2.2e+270:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * math.fabs(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) * pi)
	tmp = 0.0
	if (angle_m <= 3.8e+64)
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64(b_m + a)) * t_0));
	elseif (angle_m <= 2.2e+270)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a) * Float64(a * Float64(-pi)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a) * abs(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) * pi;
	tmp = 0.0;
	if (angle_m <= 3.8e+64)
		tmp = 0.011111111111111112 * ((angle_m * (b_m + a)) * t_0);
	elseif (angle_m <= 2.2e+270)
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -pi)));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * abs(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] * Pi), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 3.8e+64], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 2.2e+270], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a), $MachinePrecision] * N[(a * (-Pi)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a), $MachinePrecision] * N[Abs[t$95$0], $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 \pi\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 3.8 \cdot 10^{+64}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle\_m \cdot \left(b\_m + a\right)\right) \cdot t\_0\right)\\

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

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


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

    1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000001e64 < angle < 2.2000000000000001e270

    1. Initial program 30.4%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({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.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*30.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. Simplified30.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. unpow230.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2000000000000001e270 < angle

    1. Initial program 51.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*51.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. *-commutative51.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*51.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. Simplified51.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. unpow251.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

        \[\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(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right)\right)\right) \]
      2. un-div-inv59.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 \cos \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    8. Applied egg-rr59.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 \cos \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. associate-/r/60.0%

        \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    10. Simplified60.0%

      \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999992e-145 < a

    1. Initial program 49.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*49.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. *-commutative49.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*49.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. Simplified49.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. unpow249.4%

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

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares55.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) \]
    6. Applied egg-rr55.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. Taylor expanded in angle around 0 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(b + a\right)}\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)}^{1} \]
    13. Applied egg-rr64.9%

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

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

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

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


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

    1. Initial program 55.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*55.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. *-commutative55.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*55.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. Simplified55.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. unpow255.7%

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

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

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

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

        \[\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(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right)\right)\right) \]
      2. un-div-inv59.3%

        \[\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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    8. Applied egg-rr59.3%

      \[\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 \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. associate-/r/58.3%

        \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    10. Simplified58.3%

      \[\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 \color{blue}{\left(\frac{\pi}{180} \cdot angle\right)}\right)\right) \]
    11. Step-by-step derivation
      1. associate-*r*58.3%

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

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

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

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

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

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

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

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

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

    if 1.99999999999999992e217 < b

    1. Initial program 29.9%

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

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

        \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. associate-*l*29.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. Simplified29.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(b + a\right)}\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)}^{1} \]
    13. Applied egg-rr70.5%

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

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

Alternative 7: 42.5% accurate, 24.6× 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 \begin{array}{l} \mathbf{if}\;a \leq 7.6 \cdot 10^{-7}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\right) \cdot \left(a \cdot \left(-\pi\right)\right)\right)\right)\\ \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
 (*
  angle_s
  (if (<= a 7.6e-7)
    (* 0.011111111111111112 (* angle_m (* (+ b_m a) (* b_m PI))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a) (* a (- PI))))))))
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 tmp;
	if (a <= 7.6e-7) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (b_m * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -((double) M_PI))));
	}
	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 tmp;
	if (a <= 7.6e-7) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (b_m * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -Math.PI)));
	}
	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):
	tmp = 0
	if a <= 7.6e-7:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (b_m * math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -math.pi)))
	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)
	tmp = 0.0
	if (a <= 7.6e-7)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a) * Float64(b_m * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a) * Float64(a * Float64(-pi)))));
	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)
	tmp = 0.0;
	if (a <= 7.6e-7)
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (b_m * pi)));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a) * (a * -pi)));
	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_] := N[(angle$95$s * If[LessEqual[a, 7.6e-7], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a), $MachinePrecision] * N[(a * (-Pi)), $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 \begin{array}{l}
\mathbf{if}\;a \leq 7.6 \cdot 10^{-7}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\

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


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

    1. Initial program 55.4%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({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.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. Simplified55.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. unpow255.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.60000000000000029e-7 < a

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*50.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. *-commutative50.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*50.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. Simplified50.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. unpow250.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 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 54.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*54.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. *-commutative54.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*54.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. Simplified54.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. unpow254.0%

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. difference-of-squares58.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) \]
  6. Applied egg-rr58.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. Taylor expanded in angle around 0 54.8%

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

    \[\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 9: 37.1% accurate, 38.1× 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(\left(b\_m + a\right) \cdot \left(b\_m \cdot \pi\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 (* (+ b_m a) (* b_m PI))))))
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 * ((b_m + a) * (b_m * ((double) M_PI)))));
}
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 * ((b_m + a) * (b_m * Math.PI))));
}
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 * ((b_m + a) * (b_m * math.pi))))
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(Float64(b_m + a) * Float64(b_m * pi)))))
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 * ((b_m + a) * (b_m * pi))));
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[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m * Pi), $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(\left(b\_m + a\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.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*54.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. *-commutative54.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*54.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. Simplified54.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. unpow254.0%

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. difference-of-squares58.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) \]
  6. Applied egg-rr58.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. Taylor expanded in angle around 0 54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right) \]
  15. Final simplification37.7%

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

Reproduce

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