ab-angle->ABCF B

Percentage Accurate: 54.1% → 67.5%
Time: 56.2s
Alternatives: 13
Speedup: 23.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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.5% accurate, 1.3× speedup?

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

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

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


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

    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-squares59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e213 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 20.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*20.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. *-commutative20.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*20.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. Simplified20.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. unpow220.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. unpow220.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-squares24.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-rr24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.4% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 59.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*59.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. *-commutative59.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*59.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. Simplified59.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. unpow259.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. unpow259.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-squares59.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-rr59.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. pow159.0%

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000016e285 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 39.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*39.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. *-commutative39.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*39.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. Simplified39.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. unpow239.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. unpow239.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-squares48.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-rr48.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. pow148.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.4% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 61.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*61.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. *-commutative61.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*61.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. Simplified61.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. unpow261.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. unpow261.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.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. pow161.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e96 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 39.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*39.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. *-commutative39.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*39.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. Simplified39.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. unpow239.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. unpow239.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-squares46.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-rr46.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. pow146.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.3% accurate, 1.3× speedup?

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

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

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


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

    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-squares59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e213 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 20.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*20.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. *-commutative20.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*20.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. Simplified20.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. unpow220.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. unpow220.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-squares24.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-rr24.8%

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

        \[\leadsto \color{blue}{\sqrt{\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)} \cdot \sqrt{\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)}} \]
      2. sqrt-unprod37.4%

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

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

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

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

Alternative 5: 67.0% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot {\left(\sqrt[3]{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\right)}^{3}\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
  (*
   (+ b_m a_m)
   (*
    (- b_m a_m)
    (sin (* 2.0 (pow (cbrt (* PI (* angle_m 0.005555555555555556))) 3.0)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	return angle_s * ((b_m + a_m) * ((b_m - a_m) * sin((2.0 * pow(cbrt((((double) M_PI) * (angle_m * 0.005555555555555556))), 3.0)))));
}
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) * ((b_m - a_m) * Math.sin((2.0 * Math.pow(Math.cbrt((Math.PI * (angle_m * 0.005555555555555556))), 3.0)))));
}
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(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * (cbrt(Float64(pi * Float64(angle_m * 0.005555555555555556))) ^ 3.0))))))
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[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[Power[N[Power[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot {\left(\sqrt[3]{\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 53.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*53.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. *-commutative53.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*53.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. Simplified53.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. unpow253.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. unpow253.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-squares56.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-rr56.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. pow156.4%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 66.3% 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) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{-13}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+213}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\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 180.0) 2e-13)
    (* (+ b_m a_m) (* 0.011111111111111112 (* angle_m (* (- b_m a_m) PI))))
    (if (<= (/ angle_m 180.0) 2e+213)
      (*
       (* (+ b_m a_m) (- b_m a_m))
       (sin (* 2.0 (* 0.005555555555555556 (* PI angle_m)))))
      (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 2e-13) {
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * ((double) M_PI))));
	} else if ((angle_m / 180.0) <= 2e+213) {
		tmp = ((b_m + a_m) * (b_m - a_m)) * sin((2.0 * (0.005555555555555556 * (((double) M_PI) * angle_m))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((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 / 180.0) <= 2e-13) {
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * Math.PI)));
	} else if ((angle_m / 180.0) <= 2e+213) {
		tmp = ((b_m + a_m) * (b_m - a_m)) * Math.sin((2.0 * (0.005555555555555556 * (Math.PI * angle_m))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 / 180.0) <= 2e-13:
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * math.pi)))
	elif (angle_m / 180.0) <= 2e+213:
		tmp = ((b_m + a_m) * (b_m - a_m)) * math.sin((2.0 * (0.005555555555555556 * (math.pi * angle_m))))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 (Float64(angle_m / 180.0) <= 2e-13)
		tmp = Float64(Float64(b_m + a_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m - a_m) * pi))));
	elseif (Float64(angle_m / 180.0) <= 2e+213)
		tmp = Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * sin(Float64(2.0 * Float64(0.005555555555555556 * Float64(pi * angle_m)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * 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 / 180.0) <= 2e-13)
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * pi)));
	elseif ((angle_m / 180.0) <= 2e+213)
		tmp = ((b_m + a_m) * (b_m - a_m)) * sin((2.0 * (0.005555555555555556 * (pi * angle_m))));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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[N[(angle$95$m / 180.0), $MachinePrecision], 2e-13], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+213], N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

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


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

    1. Initial program 60.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*60.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. *-commutative60.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*60.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. Simplified60.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. unpow260.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. unpow260.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-squares62.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-rr62.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. pow162.7%

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

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

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

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

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

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

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

    if 2.0000000000000001e-13 < (/.f64 angle #s(literal 180 binary64)) < 1.99999999999999997e213

    1. Initial program 43.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*43.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. *-commutative43.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*43.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. Simplified43.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. unpow243.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. unpow243.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-squares43.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-rr43.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e213 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 20.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*20.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. *-commutative20.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*20.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. Simplified20.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. unpow220.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. unpow220.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-squares24.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-rr24.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.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 66.5% 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}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+213}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\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 180.0) 2e+213)
    (*
     (+ b_m a_m)
     (* (- b_m a_m) (sin (* PI (* angle_m 0.011111111111111112)))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 2e+213) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((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 / 180.0) <= 2e+213) {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 / 180.0) <= 2e+213:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((math.pi * (angle_m * 0.011111111111111112))))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 (Float64(angle_m / 180.0) <= 2e+213)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * 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 / 180.0) <= 2e+213)
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((pi * (angle_m * 0.011111111111111112))));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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[N[(angle$95$m / 180.0), $MachinePrecision], 2e+213], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    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-squares59.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e213 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 20.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*20.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. *-commutative20.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*20.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. Simplified20.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. unpow220.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. unpow220.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-squares24.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-rr24.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.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 62.5% accurate, 16.1× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999976e270 < angle

    1. Initial program 18.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*18.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. *-commutative18.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*18.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. Simplified18.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. unpow218.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. unpow218.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-squares18.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-rr18.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 28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 54.0% 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.4 \cdot 10^{+270}:\\ \;\;\;\;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}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\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 5.4e+270)
    (* 0.011111111111111112 (* angle_m (* PI (* (+ b_m a_m) (- b_m a_m)))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5.4e+270) {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((b_m + a_m) * (b_m - a_m))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((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 <= 5.4e+270) {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((b_m + a_m) * (b_m - a_m))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 <= 5.4e+270:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((b_m + a_m) * (b_m - a_m))))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 <= 5.4e+270)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(b_m + a_m) * Float64(b_m - a_m)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * 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 <= 5.4e+270)
		tmp = 0.011111111111111112 * (angle_m * (pi * ((b_m + a_m) * (b_m - a_m))));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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, 5.4e+270], 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[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.4 \cdot 10^{+270}:\\
\;\;\;\;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}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\\


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

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

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

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

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

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

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

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

    if 5.3999999999999998e270 < angle

    1. Initial program 18.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*18.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. *-commutative18.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*18.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. Simplified18.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. unpow218.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. unpow218.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-squares18.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-rr18.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 28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 54.0% 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.4 \cdot 10^{+270}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\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 5.4e+270)
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* (- b_m a_m) PI))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5.4e+270) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * ((b_m - a_m) * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((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 <= 5.4e+270) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * ((b_m - a_m) * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 <= 5.4e+270:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * ((b_m - a_m) * math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 <= 5.4e+270)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * 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 <= 5.4e+270)
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * ((b_m - a_m) * pi)));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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, 5.4e+270], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.3999999999999998e270 < angle

    1. Initial program 18.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*18.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. *-commutative18.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*18.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. Simplified18.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. unpow218.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. unpow218.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-squares18.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-rr18.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 28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.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^{+270}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\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+270)
    (* (+ b_m a_m) (* 0.011111111111111112 (* angle_m (* (- b_m a_m) PI))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 5e+270) {
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((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 <= 5e+270) {
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 <= 5e+270:
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 <= 5e+270)
		tmp = Float64(Float64(b_m + a_m) * Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m - a_m) * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * 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 <= 5e+270)
		tmp = (b_m + a_m) * (0.011111111111111112 * (angle_m * ((b_m - a_m) * pi)));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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, 5e+270], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

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

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

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

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

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

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

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

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

    if 4.99999999999999976e270 < angle

    1. Initial program 18.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*18.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. *-commutative18.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*18.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. Simplified18.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. unpow218.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. unpow218.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-squares18.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-rr18.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 28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 48.0% accurate, 24.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 2.55 \cdot 10^{-13}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(a\_m \cdot \left(-\pi\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\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 2.55e-13)
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* a_m (- PI)))))
    (* 0.011111111111111112 (* angle_m (* (+ b_m a_m) (* b_m PI)))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 2.55e-13) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (a_m * -((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * ((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 (b_m <= 2.55e-13) {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (a_m * -Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 b_m <= 2.55e-13:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (a_m * -math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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 (b_m <= 2.55e-13)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(a_m * Float64(-pi)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b_m + a_m) * Float64(b_m * 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 (b_m <= 2.55e-13)
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (a_m * -pi)));
	else
		tmp = 0.011111111111111112 * (angle_m * ((b_m + a_m) * (b_m * 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[b$95$m, 2.55e-13], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(a$95$m * (-Pi)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.55e-13 < b

    1. Initial program 50.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*50.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. *-commutative50.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*50.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. Simplified50.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. unpow250.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. unpow250.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-squares52.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-rr52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 36.5% accurate, 38.1× speedup?

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

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 53.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*53.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. *-commutative53.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*53.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. Simplified53.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. unpow253.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. unpow253.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-squares56.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-rr56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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