ab-angle->ABCF B

Percentage Accurate: 54.1% → 67.8%
Time: 34.5s
Alternatives: 13
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 13 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.1% 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.8% accurate, 1.3× speedup?

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

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

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

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

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


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

    1. Initial program 57.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*57.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. *-commutative57.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*57.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. Simplified57.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. unpow257.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. unpow257.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-squares64.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-rr64.6%

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

        \[\leadsto \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)} \]
      2. flip3-+24.6%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/21.3%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr21.3%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative21.3%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*24.7%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*24.8%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 72.2%

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

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle #s(literal 180 binary64)) < 4.0000000000000001e173

    1. Initial program 28.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*28.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. *-commutative28.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*28.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. Simplified28.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. unpow228.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. unpow228.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-squares32.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-rr32.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 25.5%

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

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

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

    if 4.0000000000000001e173 < (/.f64 angle #s(literal 180 binary64)) < 2e229

    1. Initial program 14.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*14.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. *-commutative14.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*14.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. Simplified14.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. unpow214.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. unpow214.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-squares14.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-rr14.5%

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

        \[\leadsto \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)} \]
      2. flip3-+5.0%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/5.1%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr3.5%

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

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*4.6%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*4.5%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 12.9%

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

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

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

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

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

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

    if 2e229 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 17.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*17.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. *-commutative17.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*17.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. Simplified17.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. unpow217.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. unpow217.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-squares17.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-rr17.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. associate-*l*17.1%

        \[\leadsto \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)} \]
      2. flip3-+4.6%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/3.7%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr2.6%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative2.6%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*3.5%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative3.5%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*4.6%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 17.1%

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

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

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

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

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

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

Alternative 2: 65.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -1 \cdot 10^{+274}:\\
\;\;\;\;\left(\left(b\_m - a\_m\right) \cdot \sin \left(angle\_m \cdot \left(\sqrt[3]{{\pi}^{3}} \cdot 0.011111111111111112\right)\right)\right) \cdot \left(b\_m \cdot \left(1 + \frac{a\_m}{b\_m}\right)\right)\\

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


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

    1. Initial program 39.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*39.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. *-commutative39.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*39.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. Simplified39.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. unpow239.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. unpow239.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-squares39.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-rr39.5%

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

        \[\leadsto \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)} \]
      2. flip3-+0.7%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/0.7%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr0.7%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative0.7%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*0.7%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*0.7%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Step-by-step derivation
      1. add-cbrt-cube0.8%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. pow30.8%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
    12. Applied egg-rr0.8%

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
    13. Taylor expanded in b around inf 61.8%

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

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

    1. Initial program 52.2%

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares59.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-rr59.7%

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

        \[\leadsto \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)} \]
      2. flip3-+25.2%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/21.8%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr21.7%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative21.7%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*25.2%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*25.4%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 63.0%

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

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

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

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

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

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

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

Alternative 3: 67.8% accurate, 3.2× speedup?

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

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

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

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


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

    1. Initial program 57.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*57.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. *-commutative57.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*57.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. Simplified57.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. unpow257.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. unpow257.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-squares64.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-rr64.6%

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

        \[\leadsto \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)} \]
      2. flip3-+24.6%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/21.3%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr21.3%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative21.3%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*24.7%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*24.8%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 72.2%

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

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle #s(literal 180 binary64)) < 4.0000000000000001e173

    1. Initial program 28.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*28.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. *-commutative28.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*28.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. Simplified28.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. unpow228.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. unpow228.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-squares32.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-rr32.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 25.5%

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

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

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

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

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

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

    if 4.0000000000000001e173 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 16.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*16.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. *-commutative16.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*16.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. Simplified16.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. unpow216.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. unpow216.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-squares16.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-rr16.0%

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

        \[\leadsto \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)} \]
      2. flip3-+4.8%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/4.3%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr3.0%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative3.0%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*3.9%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative3.9%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*4.6%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 15.3%

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

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

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

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

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

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

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

Alternative 4: 67.9% accurate, 3.2× speedup?

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

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

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

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


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

    1. Initial program 57.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*57.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. *-commutative57.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*57.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. Simplified57.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. unpow257.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. unpow257.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-squares64.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-rr64.6%

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

        \[\leadsto \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)} \]
      2. flip3-+24.6%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/21.3%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr21.3%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative21.3%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*24.7%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*24.8%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 72.2%

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

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle #s(literal 180 binary64)) < 4.0000000000000001e173

    1. Initial program 28.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*28.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. *-commutative28.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*28.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. Simplified28.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. unpow228.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. unpow228.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-squares32.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-rr32.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 25.5%

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

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

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

    if 4.0000000000000001e173 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 16.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*16.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. *-commutative16.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*16.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. Simplified16.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. unpow216.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. unpow216.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-squares16.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-rr16.0%

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

        \[\leadsto \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)} \]
      2. flip3-+4.8%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/4.3%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr3.0%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative3.0%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*3.9%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative3.9%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*4.6%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 15.3%

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

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

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

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

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

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

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

Alternative 5: 62.8% accurate, 3.5× speedup?

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

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

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

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


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

    1. Initial program 56.6%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({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.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*56.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. Simplified56.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. unpow256.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. unpow256.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-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. Step-by-step derivation
      1. associate-*l*70.2%

        \[\leadsto \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)} \]
      2. flip3-+24.0%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/20.7%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr20.7%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative20.7%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*23.9%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative23.9%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*24.1%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 70.9%

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

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

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

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

    if 2.9000000000000001e92 < angle < 1.8500000000000001e223

    1. Initial program 23.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*23.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. *-commutative23.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*23.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. Simplified23.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. unpow223.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. unpow223.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-squares27.2%

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

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

        \[\leadsto \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)} \]
      2. flip3-+3.9%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/3.9%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr4.8%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative4.8%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*5.3%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative5.3%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*4.5%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 23.6%

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

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

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

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

    if 1.8500000000000001e223 < angle

    1. Initial program 15.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 67.8% accurate, 3.6× speedup?

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

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

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


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

    1. Initial program 57.3%

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

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

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

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

        \[\leadsto \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)} \]
      2. flip3-+27.1%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/23.4%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr23.4%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative23.4%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*27.1%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*27.0%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 71.8%

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

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

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

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

    if 4.79999999999999982e-34 < angle

    1. Initial program 33.8%

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

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

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

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

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

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

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

        \[\leadsto \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)} \]
      2. flip3-+5.9%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/5.3%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr5.1%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative5.1%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*5.9%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative5.9%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*6.5%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 39.0%

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

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

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

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

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

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

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

Alternative 7: 68.2% accurate, 3.6× speedup?

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

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

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


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

    1. Initial program 54.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*54.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. *-commutative54.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*54.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. Simplified54.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. unpow254.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. unpow254.4%

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

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

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

        \[\leadsto \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)} \]
      2. flip3-+22.5%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/19.5%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr19.5%

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

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*22.5%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative22.5%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*22.7%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 67.8%

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

    if 2e164 < angle

    1. Initial program 17.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*17.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. *-commutative17.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*17.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. Simplified17.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. unpow217.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. unpow217.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-squares17.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-rr17.6%

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

        \[\leadsto \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)} \]
      2. flip3-+4.5%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/4.1%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr3.3%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative3.3%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*4.2%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*4.7%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 17.4%

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

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

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

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

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

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

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

Alternative 8: 65.5% accurate, 3.6× speedup?

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

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

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


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

    1. Initial program 50.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*50.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. *-commutative50.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*50.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. Simplified50.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. unpow250.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. unpow250.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-squares56.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-rr56.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. associate-*l*61.6%

        \[\leadsto \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)} \]
      2. flip3-+21.1%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/18.1%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr18.1%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative18.1%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*21.2%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*21.4%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 44.5%

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

    if 3.0000000000000001e-86 < b

    1. Initial program 46.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*46.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. *-commutative46.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*46.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. Simplified46.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. unpow246.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. unpow246.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-squares53.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-rr53.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. associate-*l*59.1%

        \[\leadsto \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)} \]
      2. flip3-+17.7%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/15.7%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr15.5%

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

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*17.4%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative17.4%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*17.6%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 60.5%

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

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

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

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

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

Alternative 9: 62.6% accurate, 3.7× speedup?

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

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

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


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

    1. Initial program 54.8%

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares61.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-rr61.4%

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

        \[\leadsto \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)} \]
      2. flip3-+23.0%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/19.9%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr19.9%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative19.9%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*23.0%

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

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*23.2%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 68.5%

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

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

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

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

    if 1.3999999999999999e145 < angle

    1. Initial program 21.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*21.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. *-commutative21.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*21.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. Simplified21.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. unpow221.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. unpow221.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-squares23.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-rr23.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 26.5%

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

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

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

Alternative 10: 67.7% accurate, 3.7× speedup?

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

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

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*49.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. *-commutative49.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*49.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. Simplified49.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. unpow249.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. unpow249.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-squares55.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-rr55.5%

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

      \[\leadsto \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)} \]
    2. flip3-+20.1%

      \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
    3. associate-*l/17.5%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
  8. Applied egg-rr17.4%

    \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
  9. Step-by-step derivation
    1. *-commutative17.4%

      \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
    2. associate-/l*20.1%

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

      \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
    4. associate-*l*20.3%

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

    \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
  11. Taylor expanded in b around 0 61.1%

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

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

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

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

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

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

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

Alternative 11: 64.6% accurate, 23.3× speedup?

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

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

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


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

    1. Initial program 56.5%

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

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

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

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

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

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

        \[\leadsto \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)} \]
      2. flip3-+26.9%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/23.2%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr23.2%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative23.2%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*26.9%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative26.9%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*26.9%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 71.3%

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

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

    if 4.9999999999999999e-49 < angle

    1. Initial program 36.0%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({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. *-commutative36.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*36.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. Simplified36.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. unpow236.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. unpow236.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-squares42.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-rr42.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 37.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 \color{blue}{1}\right)\right) \]
    8. Taylor expanded in angle around 0 34.2%

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

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

Alternative 12: 63.2% accurate, 23.3× speedup?

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

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

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


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

    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-squares57.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-rr57.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 54.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 \color{blue}{1}\right)\right) \]
    8. Taylor expanded in angle around 0 53.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)} \]

    if 1.9999999999999999e-151 < b

    1. Initial program 45.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*45.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. *-commutative45.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*45.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. Simplified45.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. unpow245.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. unpow245.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-squares51.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-rr51.4%

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

        \[\leadsto \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)} \]
      2. flip3-+20.8%

        \[\leadsto \color{blue}{\frac{{b}^{3} + {a}^{3}}{b \cdot b + \left(a \cdot a - b \cdot 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) \]
      3. associate-*l/19.2%

        \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\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)}{b \cdot b + \left(a \cdot a - b \cdot a\right)}} \]
    8. Applied egg-rr18.9%

      \[\leadsto \color{blue}{\frac{\left({b}^{3} + {a}^{3}\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    9. Step-by-step derivation
      1. *-commutative18.9%

        \[\leadsto \frac{\color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left({b}^{3} + {a}^{3}\right)}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      2. associate-/l*20.5%

        \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
      3. *-commutative20.5%

        \[\leadsto \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \pi\right)} \cdot 0.011111111111111112\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)} \]
      4. associate-*l*21.1%

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

      \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \cdot \frac{{b}^{3} + {a}^{3}}{\mathsf{fma}\left(b, b, a \cdot \left(a - b\right)\right)}} \]
    11. Taylor expanded in b around 0 57.2%

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

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

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

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

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

Alternative 13: 54.7% accurate, 32.2× speedup?

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

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

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Step-by-step derivation
    1. associate-*l*49.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. *-commutative49.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*49.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. Simplified49.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. unpow249.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. unpow249.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-squares55.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-rr55.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 54.2%

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

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

Reproduce

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