ab-angle->ABCF B

Percentage Accurate: 53.9% → 66.3%
Time: 20.3s
Alternatives: 14
Speedup: 32.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 53.9% accurate, 1.0× speedup?

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

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

Alternative 1: 66.3% accurate, 1.0× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 1.3 \cdot 10^{+208}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot {\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= b_m 1.3e+208)
   (*
    (+ b_m a)
    (*
     (- b_m a)
     (sin
      (*
       2.0
       (* 0.005555555555555556 (* angle (* (cbrt PI) (pow (cbrt PI) 2.0))))))))
   (*
    (+ b_m a)
    (*
     (- b_m a)
     (sin (* 2.0 (pow (cbrt (* 0.005555555555555556 (* angle PI))) 3.0)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 1.3e+208) {
		tmp = (b_m + a) * ((b_m - a) * sin((2.0 * (0.005555555555555556 * (angle * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0)))))));
	} else {
		tmp = (b_m + a) * ((b_m - a) * sin((2.0 * pow(cbrt((0.005555555555555556 * (angle * ((double) M_PI)))), 3.0))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 1.3e+208) {
		tmp = (b_m + a) * ((b_m - a) * Math.sin((2.0 * (0.005555555555555556 * (angle * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0)))))));
	} else {
		tmp = (b_m + a) * ((b_m - a) * Math.sin((2.0 * Math.pow(Math.cbrt((0.005555555555555556 * (angle * Math.PI))), 3.0))));
	}
	return tmp;
}
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (b_m <= 1.3e+208)
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(2.0 * Float64(0.005555555555555556 * Float64(angle * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0))))))));
	else
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(2.0 * (cbrt(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 3.0)))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 1.3e+208], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 * N[(angle * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * N[Power[N[Power[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.3 \cdot 10^{+208}:\\
\;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\right)\\

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


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

    1. Initial program 54.4%

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

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

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

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

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

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

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

        \[\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-sin63.6%

        \[\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-inv63.4%

        \[\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-eval63.4%

        \[\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-rr63.4%

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

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

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

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

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

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

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

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

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

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

    if 1.3e208 < b

    1. Initial program 39.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*39.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. *-commutative39.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*39.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. Simplified39.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. unpow239.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. unpow239.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-squares54.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-rr54.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. pow154.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*76.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-sin76.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-inv80.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-eval80.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-rr80.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. Step-by-step derivation
      1. unpow180.9%

        \[\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. +-commutative80.9%

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

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

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

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

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

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

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

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

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

Alternative 2: 53.0% accurate, 1.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 9000:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left|\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right|\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= b_m 9000.0)
   (*
    (+ b_m a)
    (*
     (- b_m a)
     (sin (* 2.0 (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0)))))))
   (*
    (+ b_m a)
    (* (- b_m a) (fabs (sin (* PI (* angle 0.011111111111111112))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 9000.0) {
		tmp = (b_m + a) * ((b_m - a) * sin((2.0 * (0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0))))));
	} else {
		tmp = (b_m + a) * ((b_m - a) * fabs(sin((((double) M_PI) * (angle * 0.011111111111111112)))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 9000.0) {
		tmp = (b_m + a) * ((b_m - a) * Math.sin((2.0 * (0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0))))));
	} else {
		tmp = (b_m + a) * ((b_m - a) * Math.abs(Math.sin((Math.PI * (angle * 0.011111111111111112)))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if b_m <= 9000.0:
		tmp = (b_m + a) * ((b_m - a) * math.sin((2.0 * (0.005555555555555556 * (angle * math.pow(math.sqrt(math.pi), 2.0))))))
	else:
		tmp = (b_m + a) * ((b_m - a) * math.fabs(math.sin((math.pi * (angle * 0.011111111111111112)))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (b_m <= 9000.0)
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(2.0 * Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))))));
	else
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * abs(sin(Float64(pi * Float64(angle * 0.011111111111111112))))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (b_m <= 9000.0)
		tmp = (b_m + a) * ((b_m - a) * sin((2.0 * (0.005555555555555556 * (angle * (sqrt(pi) ^ 2.0))))));
	else
		tmp = (b_m + a) * ((b_m - a) * abs(sin((pi * (angle * 0.011111111111111112)))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 9000.0], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Abs[N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 9000:\\
\;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\right)\\

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


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

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

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

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

        \[\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*63.6%

        \[\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-sin63.6%

        \[\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-inv62.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-eval62.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-rr62.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. Step-by-step derivation
      1. unpow162.9%

        \[\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. +-commutative62.9%

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

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

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

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

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

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

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

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

    if 9e3 < b

    1. Initial program 44.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*44.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. *-commutative44.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*44.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. Simplified44.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. unpow244.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. unpow244.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-squares49.5%

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

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

        \[\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.0%

        \[\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.0%

        \[\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-inv71.1%

        \[\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-eval71.1%

        \[\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-rr71.1%

      \[\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. unpow171.1%

        \[\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. +-commutative71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 58.4% accurate, 1.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right) \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (*
  (+ b_m a)
  (*
   (- b_m a)
   (sin (* 2.0 (expm1 (log1p (* 0.005555555555555556 (* angle PI)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	return (b_m + a) * ((b_m - a) * sin((2.0 * expm1(log1p((0.005555555555555556 * (angle * ((double) M_PI))))))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	return (b_m + a) * ((b_m - a) * Math.sin((2.0 * Math.expm1(Math.log1p((0.005555555555555556 * (angle * Math.PI)))))));
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	return (b_m + a) * ((b_m - a) * math.sin((2.0 * math.expm1(math.log1p((0.005555555555555556 * (angle * math.pi)))))))
b_m = abs(b)
function code(a, b_m, angle)
	return Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(2.0 * expm1(log1p(Float64(0.005555555555555556 * Float64(angle * pi))))))))
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Exp[N[Log[1 + N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|

\\
\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 53.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*53.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. *-commutative53.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*53.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. Simplified53.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. unpow253.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. unpow253.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-squares55.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-rr55.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. pow155.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*64.6%

      \[\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-sin64.6%

      \[\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-inv64.8%

      \[\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-eval64.8%

      \[\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-rr64.8%

    \[\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. unpow164.8%

      \[\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. +-commutative64.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}\right)\right) \]
  15. Final simplification58.3%

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\right) \]
  16. Add Preprocessing

Alternative 4: 65.0% accurate, 1.9× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-157}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \frac{\pi}{\frac{180}{angle}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= (pow b_m 2.0) 2e-157)
   (* (+ b_m a) (* (- b_m a) (sin (* 2.0 (/ PI (/ 180.0 angle))))))
   (* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (pow(b_m, 2.0) <= 2e-157) {
		tmp = (b_m + a) * ((b_m - a) * sin((2.0 * (((double) M_PI) / (180.0 / angle)))));
	} else {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (Math.pow(b_m, 2.0) <= 2e-157) {
		tmp = (b_m + a) * ((b_m - a) * Math.sin((2.0 * (Math.PI / (180.0 / angle)))));
	} else {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI)));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if math.pow(b_m, 2.0) <= 2e-157:
		tmp = (b_m + a) * ((b_m - a) * math.sin((2.0 * (math.pi / (180.0 / angle)))))
	else:
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if ((b_m ^ 2.0) <= 2e-157)
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(2.0 * Float64(pi / Float64(180.0 / angle))))));
	else
		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if ((b_m ^ 2.0) <= 2e-157)
		tmp = (b_m + a) * ((b_m - a) * sin((2.0 * (pi / (180.0 / angle)))));
	else
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * pi)));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 2e-157], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 62.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*62.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. *-commutative62.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*62.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. Simplified62.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. unpow262.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. unpow262.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-squares62.2%

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

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

        \[\leadsto \color{blue}{{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}^{1}} \]
      2. associate-*l*65.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-sin65.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-inv64.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-eval64.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-rr64.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. unpow164.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. +-commutative64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999989e-157 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 47.7%

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

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

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

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

        \[\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-sin64.3%

        \[\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-inv65.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-eval65.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-rr65.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. Step-by-step derivation
      1. unpow165.0%

        \[\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. +-commutative65.0%

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

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

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

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

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

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

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

Alternative 5: 66.1% accurate, 1.9× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{+131}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= (pow a 2.0) 5e+131)
   (* (- b_m a) (* (+ b_m a) (sin (* (* angle PI) 0.011111111111111112))))
   (* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (pow(a, 2.0) <= 5e+131) {
		tmp = (b_m - a) * ((b_m + a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
	} else {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (Math.pow(a, 2.0) <= 5e+131) {
		tmp = (b_m - a) * ((b_m + a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
	} else {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI)));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if math.pow(a, 2.0) <= 5e+131:
		tmp = (b_m - a) * ((b_m + a) * math.sin(((angle * math.pi) * 0.011111111111111112)))
	else:
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if ((a ^ 2.0) <= 5e+131)
		tmp = Float64(Float64(b_m - a) * Float64(Float64(b_m + a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112))));
	else
		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if ((a ^ 2.0) <= 5e+131)
		tmp = (b_m - a) * ((b_m + a) * sin(((angle * pi) * 0.011111111111111112)));
	else
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * pi)));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 5e+131], N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

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

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

        \[\leadsto \color{blue}{e^{\log \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. associate-*l*38.2%

        \[\leadsto e^{\log \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)}} \]
      3. 2-sin38.2%

        \[\leadsto e^{\log \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)} \]
      4. div-inv39.0%

        \[\leadsto e^{\log \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)} \]
      5. metadata-eval39.0%

        \[\leadsto e^{\log \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)} \]
    8. Applied egg-rr39.0%

      \[\leadsto \color{blue}{e^{\log \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)}} \]
    9. Step-by-step derivation
      1. rem-exp-log64.6%

        \[\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*59.8%

        \[\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. *-commutative59.8%

        \[\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. associate-*l*64.6%

        \[\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)} \]
      5. associate-*r*65.9%

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(angle \cdot \color{blue}{\frac{1}{180}}\right) \cdot \pi + 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \]
      12. div-inv64.6%

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)\right) \]
      17. rem-cbrt-cube64.7%

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

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

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

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

    if 4.99999999999999995e131 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 43.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*43.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. *-commutative43.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*43.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. Simplified43.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. unpow243.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. unpow243.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-squares49.5%

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

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

        \[\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*65.3%

        \[\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-sin65.3%

        \[\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-inv65.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-eval65.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-rr65.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. unpow165.3%

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

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

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

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

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

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

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

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

Alternative 6: 44.2% accurate, 2.0× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left|\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right|\right) \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (*
  (+ b_m a)
  (* (- b_m a) (fabs (sin (* PI (* angle 0.011111111111111112)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	return (b_m + a) * ((b_m - a) * fabs(sin((((double) M_PI) * (angle * 0.011111111111111112)))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	return (b_m + a) * ((b_m - a) * Math.abs(Math.sin((Math.PI * (angle * 0.011111111111111112)))));
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	return (b_m + a) * ((b_m - a) * math.fabs(math.sin((math.pi * (angle * 0.011111111111111112)))))
b_m = abs(b)
function code(a, b_m, angle)
	return Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * abs(sin(Float64(pi * Float64(angle * 0.011111111111111112))))))
end
b_m = abs(b);
function tmp = code(a, b_m, angle)
	tmp = (b_m + a) * ((b_m - a) * abs(sin((pi * (angle * 0.011111111111111112)))));
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Abs[N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|

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

      \[\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-sin64.6%

      \[\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-inv64.8%

      \[\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-eval64.8%

      \[\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-rr64.8%

    \[\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. unpow164.8%

      \[\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. +-commutative64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 62.8% accurate, 3.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 3.3 \cdot 10^{+14}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;angle \leq 1.35 \cdot 10^{+45}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(b\_m \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= angle 3.3e+14)
   (* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))
   (if (<= angle 1.35e+45)
     (* (+ b_m a) (* b_m (sin (* (* angle PI) 0.011111111111111112))))
     (* 0.011111111111111112 (* angle (* PI (* (+ b_m a) (- b_m a))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 3.3e+14) {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI))));
	} else if (angle <= 1.35e+45) {
		tmp = (b_m + a) * (b_m * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 3.3e+14) {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI)));
	} else if (angle <= 1.35e+45) {
		tmp = (b_m + a) * (b_m * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if angle <= 3.3e+14:
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))
	elif angle <= 1.35e+45:
		tmp = (b_m + a) * (b_m * math.sin(((angle * math.pi) * 0.011111111111111112)))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * ((b_m + a) * (b_m - a))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (angle <= 3.3e+14)
		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))));
	elseif (angle <= 1.35e+45)
		tmp = Float64(Float64(b_m + a) * Float64(b_m * sin(Float64(Float64(angle * pi) * 0.011111111111111112))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (angle <= 3.3e+14)
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * pi)));
	elseif (angle <= 1.35e+45)
		tmp = (b_m + a) * (b_m * sin(((angle * pi) * 0.011111111111111112)));
	else
		tmp = 0.011111111111111112 * (angle * (pi * ((b_m + a) * (b_m - a))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[angle, 3.3e+14], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle, 1.35e+45], N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|

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

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

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


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

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

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

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

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

        \[\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*74.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-sin74.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-inv74.8%

        \[\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-eval74.8%

        \[\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-rr74.8%

      \[\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. unpow174.8%

        \[\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. +-commutative74.8%

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

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

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

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

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

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

    if 3.3e14 < angle < 1.34999999999999992e45

    1. Initial program 35.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*35.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. *-commutative35.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*35.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. Simplified35.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. unpow235.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. unpow235.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-squares35.9%

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

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

        \[\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*35.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-sin35.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-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. unpow133.3%

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

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

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

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

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

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

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

    if 1.34999999999999992e45 < angle

    1. Initial program 23.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*23.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. *-commutative23.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*23.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. Simplified23.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. Taylor expanded in angle around 0 24.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow223.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. unpow223.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-squares25.9%

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

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

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

Alternative 8: 65.8% accurate, 3.6× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.011111111111111112\right)\\ \mathbf{if}\;b\_m \leq 5.5 \cdot 10^{+52}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \sin t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot t\_0\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle 0.011111111111111112))))
   (if (<= b_m 5.5e+52)
     (* (- b_m a) (* (+ b_m a) (sin t_0)))
     (* (+ b_m a) (* (- b_m a) t_0)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = ((double) M_PI) * (angle * 0.011111111111111112);
	double tmp;
	if (b_m <= 5.5e+52) {
		tmp = (b_m - a) * ((b_m + a) * sin(t_0));
	} else {
		tmp = (b_m + a) * ((b_m - a) * t_0);
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.PI * (angle * 0.011111111111111112);
	double tmp;
	if (b_m <= 5.5e+52) {
		tmp = (b_m - a) * ((b_m + a) * Math.sin(t_0));
	} else {
		tmp = (b_m + a) * ((b_m - a) * t_0);
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pi * (angle * 0.011111111111111112)
	tmp = 0
	if b_m <= 5.5e+52:
		tmp = (b_m - a) * ((b_m + a) * math.sin(t_0))
	else:
		tmp = (b_m + a) * ((b_m - a) * t_0)
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64(pi * Float64(angle * 0.011111111111111112))
	tmp = 0.0
	if (b_m <= 5.5e+52)
		tmp = Float64(Float64(b_m - a) * Float64(Float64(b_m + a) * sin(t_0)));
	else
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * t_0));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = pi * (angle * 0.011111111111111112);
	tmp = 0.0;
	if (b_m <= 5.5e+52)
		tmp = (b_m - a) * ((b_m + a) * sin(t_0));
	else
		tmp = (b_m + a) * ((b_m - a) * t_0);
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 5.5e+52], N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

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

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

        \[\leadsto \color{blue}{e^{\log \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. associate-*l*37.2%

        \[\leadsto e^{\log \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)}} \]
      3. 2-sin37.2%

        \[\leadsto e^{\log \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)} \]
      4. div-inv36.8%

        \[\leadsto e^{\log \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)} \]
      5. metadata-eval36.8%

        \[\leadsto e^{\log \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)} \]
    8. Applied egg-rr36.8%

      \[\leadsto \color{blue}{e^{\log \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)}} \]
    9. Taylor expanded in angle around inf 56.8%

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

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

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

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

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

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

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

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

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

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

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

    if 5.49999999999999996e52 < b

    1. Initial program 42.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*42.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. *-commutative42.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*42.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. Simplified42.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. unpow242.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. unpow242.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-squares49.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-rr49.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. pow149.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*69.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-sin69.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-inv73.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-eval73.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-rr73.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. unpow173.7%

        \[\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. +-commutative73.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5.5 \cdot 10^{+52}:\\ \;\;\;\;\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 \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.5% accurate, 3.6× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 3.9 \cdot 10^{-137}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(a \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= b_m 3.9e-137)
   (* (+ b_m a) (* a (- (sin (* PI (* angle 0.011111111111111112))))))
   (* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 3.9e-137) {
		tmp = (b_m + a) * (a * -sin((((double) M_PI) * (angle * 0.011111111111111112))));
	} else {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 3.9e-137) {
		tmp = (b_m + a) * (a * -Math.sin((Math.PI * (angle * 0.011111111111111112))));
	} else {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI)));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if b_m <= 3.9e-137:
		tmp = (b_m + a) * (a * -math.sin((math.pi * (angle * 0.011111111111111112))))
	else:
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (b_m <= 3.9e-137)
		tmp = Float64(Float64(b_m + a) * Float64(a * Float64(-sin(Float64(pi * Float64(angle * 0.011111111111111112))))));
	else
		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (b_m <= 3.9e-137)
		tmp = (b_m + a) * (a * -sin((pi * (angle * 0.011111111111111112))));
	else
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * pi)));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 3.9e-137], N[(N[(b$95$m + a), $MachinePrecision] * N[(a * (-N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 55.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*55.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. *-commutative55.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*55.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. Simplified55.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. unpow255.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. unpow255.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-squares57.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-rr57.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. pow157.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*63.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-sin63.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-inv63.8%

        \[\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-eval63.8%

        \[\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-rr63.8%

      \[\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. unpow163.8%

        \[\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. +-commutative63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8999999999999999e-137 < b

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

        \[\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.0%

        \[\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.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-inv66.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-eval66.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-rr66.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. Step-by-step derivation
      1. unpow166.9%

        \[\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. +-commutative66.9%

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

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

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

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

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

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

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

Alternative 10: 62.7% accurate, 23.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 10^{-59}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(\left(b\_m - a\right) \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= angle 1e-59)
   (* (+ b_m a) (* 0.011111111111111112 (* (- b_m a) (* angle PI))))
   (* 0.011111111111111112 (* angle (* PI (* (+ b_m a) (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 1e-59) {
		tmp = (b_m + a) * (0.011111111111111112 * ((b_m - a) * (angle * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 1e-59) {
		tmp = (b_m + a) * (0.011111111111111112 * ((b_m - a) * (angle * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if angle <= 1e-59:
		tmp = (b_m + a) * (0.011111111111111112 * ((b_m - a) * (angle * math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * ((b_m + a) * (b_m - a))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (angle <= 1e-59)
		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(Float64(b_m - a) * Float64(angle * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (angle <= 1e-59)
		tmp = (b_m + a) * (0.011111111111111112 * ((b_m - a) * (angle * pi)));
	else
		tmp = 0.011111111111111112 * (angle * (pi * ((b_m + a) * (b_m - a))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[angle, 1e-59], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 58.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*58.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. *-commutative58.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*58.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. Simplified58.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. unpow258.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. unpow258.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.3%

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

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

        \[\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.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-sin71.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-inv72.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-eval72.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-rr72.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. unpow172.3%

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

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

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

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

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

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

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

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

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

    if 1e-59 < angle

    1. Initial program 40.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*40.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. *-commutative40.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*40.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. Simplified40.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. Taylor expanded in angle around 0 35.6%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow240.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. unpow240.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.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Applied egg-rr41.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. Recombined 2 regimes into one program.
  4. Final simplification64.2%

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

Alternative 11: 62.8% accurate, 23.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 7 \cdot 10^{-58}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= angle 7e-58)
   (* (+ b_m a) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))
   (* 0.011111111111111112 (* angle (* PI (* (+ b_m a) (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 7e-58) {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 7e-58) {
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if angle <= 7e-58:
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * ((b_m + a) * (b_m - a))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (angle <= 7e-58)
		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (angle <= 7e-58)
		tmp = (b_m + a) * (0.011111111111111112 * (angle * ((b_m - a) * pi)));
	else
		tmp = 0.011111111111111112 * (angle * (pi * ((b_m + a) * (b_m - a))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[angle, 7e-58], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 58.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*58.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. *-commutative58.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*58.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. Simplified58.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. unpow258.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. unpow258.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.3%

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

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

        \[\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.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-sin71.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-inv72.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-eval72.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-rr72.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. unpow172.3%

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

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

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

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

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

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

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

    if 6.9999999999999998e-58 < angle

    1. Initial program 40.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*40.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. *-commutative40.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*40.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. Simplified40.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. Taylor expanded in angle around 0 35.6%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow240.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. unpow240.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.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Applied egg-rr41.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. Recombined 2 regimes into one program.
  4. Final simplification64.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 7 \cdot 10^{-58}:\\ \;\;\;\;\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(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 62.6% accurate, 23.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 2.8 \cdot 10^{-58}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m + a\right) \cdot \left(\pi \cdot \left(\left(b\_m - a\right) \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= angle 2.8e-58)
   (* 0.011111111111111112 (* (+ b_m a) (* PI (* (- b_m a) angle))))
   (* 0.011111111111111112 (* angle (* PI (* (+ b_m a) (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 2.8e-58) {
		tmp = 0.011111111111111112 * ((b_m + a) * (((double) M_PI) * ((b_m - a) * angle)));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 2.8e-58) {
		tmp = 0.011111111111111112 * ((b_m + a) * (Math.PI * ((b_m - a) * angle)));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if angle <= 2.8e-58:
		tmp = 0.011111111111111112 * ((b_m + a) * (math.pi * ((b_m - a) * angle)))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * ((b_m + a) * (b_m - a))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (angle <= 2.8e-58)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m + a) * Float64(pi * Float64(Float64(b_m - a) * angle))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (angle <= 2.8e-58)
		tmp = 0.011111111111111112 * ((b_m + a) * (pi * ((b_m - a) * angle)));
	else
		tmp = 0.011111111111111112 * (angle * (pi * ((b_m + a) * (b_m - a))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[angle, 2.8e-58], N[(0.011111111111111112 * N[(N[(b$95$m + a), $MachinePrecision] * N[(Pi * N[(N[(b$95$m - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 58.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*58.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. *-commutative58.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*58.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. Simplified58.0%

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.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. unpow258.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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8000000000000001e-58 < angle

    1. Initial program 40.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*40.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. *-commutative40.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*40.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. Simplified40.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. Taylor expanded in angle around 0 35.6%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow240.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. unpow240.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.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Applied egg-rr41.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. Recombined 2 regimes into one program.
  4. Final simplification63.9%

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

Alternative 13: 62.6% accurate, 23.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 7.2 \cdot 10^{-60}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b\_m - a\right) \cdot angle\right) \cdot \left(\left(b\_m + a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= angle 7.2e-60)
   (* 0.011111111111111112 (* (* (- b_m a) angle) (* (+ b_m a) PI)))
   (* 0.011111111111111112 (* angle (* PI (* (+ b_m a) (- b_m a)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 7.2e-60) {
		tmp = 0.011111111111111112 * (((b_m - a) * angle) * ((b_m + a) * ((double) M_PI)));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 7.2e-60) {
		tmp = 0.011111111111111112 * (((b_m - a) * angle) * ((b_m + a) * Math.PI));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * ((b_m + a) * (b_m - a))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if angle <= 7.2e-60:
		tmp = 0.011111111111111112 * (((b_m - a) * angle) * ((b_m + a) * math.pi))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * ((b_m + a) * (b_m - a))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (angle <= 7.2e-60)
		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(b_m - a) * angle) * Float64(Float64(b_m + a) * pi)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (angle <= 7.2e-60)
		tmp = 0.011111111111111112 * (((b_m - a) * angle) * ((b_m + a) * pi));
	else
		tmp = 0.011111111111111112 * (angle * (pi * ((b_m + a) * (b_m - a))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[angle, 7.2e-60], N[(0.011111111111111112 * N[(N[(N[(b$95$m - a), $MachinePrecision] * angle), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 58.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*58.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. *-commutative58.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*58.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. Simplified58.0%

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.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. unpow258.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.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-60 < angle

    1. Initial program 40.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*40.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. *-commutative40.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*40.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. Simplified40.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. Taylor expanded in angle around 0 35.6%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow240.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. unpow240.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.2%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    7. Applied egg-rr41.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. Recombined 2 regimes into one program.
  4. Final simplification63.9%

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

Alternative 14: 54.0% accurate, 32.2× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right) \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (* 0.011111111111111112 (* angle (* PI (* (+ b_m a) (- b_m a))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	return 0.011111111111111112 * (angle * (((double) M_PI) * ((b_m + a) * (b_m - a))));
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	return 0.011111111111111112 * (angle * (Math.PI * ((b_m + a) * (b_m - a))));
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	return 0.011111111111111112 * (angle * (math.pi * ((b_m + a) * (b_m - a))))
b_m = abs(b)
function code(a, b_m, angle)
	return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b_m + a) * Float64(b_m - a)))))
end
b_m = abs(b);
function tmp = code(a, b_m, angle)
	tmp = 0.011111111111111112 * (angle * (pi * ((b_m + a) * (b_m - a))));
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|

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

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

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
  6. Step-by-step derivation
    1. unpow253.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. unpow253.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-squares55.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. Applied egg-rr56.3%

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

Reproduce

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