ab-angle->ABCF B

Percentage Accurate: 53.8% → 66.6%
Time: 16.3s
Alternatives: 22
Speedup: 23.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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.8% 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.6% accurate, 0.6× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \sin t\_0\\ t_2 := \cos t\_0\\ t_3 := t\_2 \cdot t\_1\\ \mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+153}:\\ \;\;\;\;2 \cdot \left({b\_m}^{2} \cdot t\_3\right) + a \cdot \left(-2 \cdot \left(t\_3 \cdot a\right) + 2 \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m - b\_m\right)\right)\right)\right)\\ \mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+256}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left({\left(\sqrt{\pi}\right)}^{2} \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{angle}{180} \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (sin t_0))
        (t_2 (cos t_0))
        (t_3 (* t_2 t_1)))
   (if (<= b_m 2.05e+153)
     (+
      (* 2.0 (* (pow b_m 2.0) t_3))
      (* a (+ (* -2.0 (* t_3 a)) (* 2.0 (* t_2 (* t_1 (- b_m b_m)))))))
     (if (<= b_m 5.5e+256)
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))
       (*
        (* (+ b_m a) (- b_m a))
        (*
         2.0
         (*
          (sin (* (pow (sqrt PI) 2.0) (/ angle 180.0)))
          (cos (* (/ angle 180.0) (* (cbrt PI) (pow (cbrt PI) 2.0)))))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = sin(t_0);
	double t_2 = cos(t_0);
	double t_3 = t_2 * t_1;
	double tmp;
	if (b_m <= 2.05e+153) {
		tmp = (2.0 * (pow(b_m, 2.0) * t_3)) + (a * ((-2.0 * (t_3 * a)) + (2.0 * (t_2 * (t_1 * (b_m - b_m))))));
	} else if (b_m <= 5.5e+256) {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	} else {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((pow(sqrt(((double) M_PI)), 2.0) * (angle / 180.0))) * cos(((angle / 180.0) * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.sin(t_0);
	double t_2 = Math.cos(t_0);
	double t_3 = t_2 * t_1;
	double tmp;
	if (b_m <= 2.05e+153) {
		tmp = (2.0 * (Math.pow(b_m, 2.0) * t_3)) + (a * ((-2.0 * (t_3 * a)) + (2.0 * (t_2 * (t_1 * (b_m - b_m))))));
	} else if (b_m <= 5.5e+256) {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	} else {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin((Math.pow(Math.sqrt(Math.PI), 2.0) * (angle / 180.0))) * Math.cos(((angle / 180.0) * (Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0))))));
	}
	return tmp;
}
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = sin(t_0)
	t_2 = cos(t_0)
	t_3 = Float64(t_2 * t_1)
	tmp = 0.0
	if (b_m <= 2.05e+153)
		tmp = Float64(Float64(2.0 * Float64((b_m ^ 2.0) * t_3)) + Float64(a * Float64(Float64(-2.0 * Float64(t_3 * a)) + Float64(2.0 * Float64(t_2 * Float64(t_1 * Float64(b_m - b_m)))))));
	elseif (b_m <= 5.5e+256)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	else
		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64((sqrt(pi) ^ 2.0) * Float64(angle / 180.0))) * cos(Float64(Float64(angle / 180.0) * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)))))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * t$95$1), $MachinePrecision]}, If[LessEqual[b$95$m, 2.05e+153], N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(a * N[(N[(-2.0 * N[(t$95$3 * a), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t$95$2 * N[(t$95$1 * N[(b$95$m - b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5.5e+256], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \sin t\_0\\
t_2 := \cos t\_0\\
t_3 := t\_2 \cdot t\_1\\
\mathbf{if}\;b\_m \leq 2.05 \cdot 10^{+153}:\\
\;\;\;\;2 \cdot \left({b\_m}^{2} \cdot t\_3\right) + a \cdot \left(-2 \cdot \left(t\_3 \cdot a\right) + 2 \cdot \left(t\_2 \cdot \left(t\_1 \cdot \left(b\_m - b\_m\right)\right)\right)\right)\\

\mathbf{elif}\;b\_m \leq 5.5 \cdot 10^{+256}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\

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


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

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

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

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

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

    if 2.05000000000000008e153 < b < 5.4999999999999998e256

    1. Initial program 29.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*29.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. *-commutative29.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*29.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. Simplified29.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. unpow229.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. unpow229.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-squares50.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-rr50.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. add-cube-cbrt47.2%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 54.1%

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

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

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

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

    if 5.4999999999999998e256 < b

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.7% accurate, 0.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+296}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+296)
       (*
        (* (+ b_m a) (- b_m a))
        (*
         2.0
         (*
          (sin (* (/ angle 180.0) (cbrt (pow PI 3.0))))
          (cos (* PI (/ angle 180.0))))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+296) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin(((angle / 180.0) * cbrt(pow(((double) M_PI), 3.0)))) * cos((((double) M_PI) * (angle / 180.0)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+296) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin(((angle / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0)))) * Math.cos((Math.PI * (angle / 180.0)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+296)
		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64(Float64(angle / 180.0) * cbrt((pi ^ 3.0)))) * cos(Float64(pi * Float64(angle / 180.0))))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+296], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|

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

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

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1.99999999999999996e296

    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-squares60.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-rr60.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-cbrt-cube61.2%

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

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

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

    if 1.99999999999999996e296 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.6%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.1%

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

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

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

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

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

Alternative 3: 66.6% accurate, 0.6× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \cos t\_0\\ t_2 := \sin t\_0\\ \mathbf{if}\;b\_m \leq 1.9 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(-2, t\_2 \cdot \left(t\_1 \cdot a\right), 0\right), 2 \cdot \left({b\_m}^{2} \cdot \left(t\_1 \cdot t\_2\right)\right)\right)\\ \mathbf{elif}\;b\_m \leq 2.55 \cdot 10^{+256}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left({\left(\sqrt{\pi}\right)}^{2} \cdot \frac{angle}{180}\right) \cdot \cos \left(\frac{angle}{180} \cdot \left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI)))
        (t_1 (cos t_0))
        (t_2 (sin t_0)))
   (if (<= b_m 1.9e+153)
     (fma
      a
      (fma -2.0 (* t_2 (* t_1 a)) 0.0)
      (* 2.0 (* (pow b_m 2.0) (* t_1 t_2))))
     (if (<= b_m 2.55e+256)
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))
       (*
        (* (+ b_m a) (- b_m a))
        (*
         2.0
         (*
          (sin (* (pow (sqrt PI) 2.0) (/ angle 180.0)))
          (cos (* (/ angle 180.0) (* (cbrt PI) (pow (cbrt PI) 2.0)))))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = cos(t_0);
	double t_2 = sin(t_0);
	double tmp;
	if (b_m <= 1.9e+153) {
		tmp = fma(a, fma(-2.0, (t_2 * (t_1 * a)), 0.0), (2.0 * (pow(b_m, 2.0) * (t_1 * t_2))));
	} else if (b_m <= 2.55e+256) {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	} else {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((pow(sqrt(((double) M_PI)), 2.0) * (angle / 180.0))) * cos(((angle / 180.0) * (cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0))))));
	}
	return tmp;
}
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = cos(t_0)
	t_2 = sin(t_0)
	tmp = 0.0
	if (b_m <= 1.9e+153)
		tmp = fma(a, fma(-2.0, Float64(t_2 * Float64(t_1 * a)), 0.0), Float64(2.0 * Float64((b_m ^ 2.0) * Float64(t_1 * t_2))));
	elseif (b_m <= 2.55e+256)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	else
		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64((sqrt(pi) ^ 2.0) * Float64(angle / 180.0))) * cos(Float64(Float64(angle / 180.0) * Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)))))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, If[LessEqual[b$95$m, 1.9e+153], N[(a * N[(-2.0 * N[(t$95$2 * N[(t$95$1 * a), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision] + N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 2.55e+256], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \cos t\_0\\
t_2 := \sin t\_0\\
\mathbf{if}\;b\_m \leq 1.9 \cdot 10^{+153}:\\
\;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(-2, t\_2 \cdot \left(t\_1 \cdot a\right), 0\right), 2 \cdot \left({b\_m}^{2} \cdot \left(t\_1 \cdot t\_2\right)\right)\right)\\

\mathbf{elif}\;b\_m \leq 2.55 \cdot 10^{+256}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

    if 1.89999999999999983e153 < b < 2.55e256

    1. Initial program 29.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*29.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. *-commutative29.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*29.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. Simplified29.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. unpow229.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. unpow229.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-squares50.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-rr50.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. add-cube-cbrt47.2%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 54.1%

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

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

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

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

    if 2.55e256 < b

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.0% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ t_1 := \frac{angle \cdot \pi}{180}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin t\_1 \cdot \cos t\_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))) (t_1 (/ (* angle PI) 180.0)))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+303)
       (* (* (+ b_m a) (- b_m a)) (* 2.0 (* (sin t_1) (cos t_1))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double t_1 = (angle * ((double) M_PI)) / 180.0;
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin(t_1) * cos(t_1)));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double t_1 = (angle * Math.PI) / 180.0;
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin(t_1) * Math.cos(t_1)));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	t_1 = (angle * math.pi) / 180.0
	tmp = 0
	if t_0 <= -math.inf:
		tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
	elif t_0 <= 2e+303:
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.sin(t_1) * math.cos(t_1)))
	else:
		tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	t_1 = Float64(Float64(angle * pi) / 180.0)
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+303)
		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(t_1) * cos(t_1))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	t_1 = (angle * pi) / 180.0;
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a))));
	elseif (t_0 <= 2e+303)
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin(t_1) * cos(t_1)));
	else
		tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[t$95$1], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \frac{angle \cdot \pi}{180}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin t\_1 \cdot \cos t\_1\right)\right)\\

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.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-squares51.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-rr51.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. add-cube-cbrt53.3%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.7%

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

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

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

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

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

Alternative 5: 66.8% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+296}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\cos \left(\frac{angle \cdot \pi}{180}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+296)
       (*
        (* (+ b_m a) (- b_m a))
        (*
         2.0
         (*
          (cos (/ (* angle PI) 180.0))
          (sin (* PI (* 0.005555555555555556 angle))))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+296) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos(((angle * ((double) M_PI)) / 180.0)) * sin((((double) M_PI) * (0.005555555555555556 * angle)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+296) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.cos(((angle * Math.PI) / 180.0)) * Math.sin((Math.PI * (0.005555555555555556 * angle)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
	elif t_0 <= 2e+296:
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.cos(((angle * math.pi) / 180.0)) * math.sin((math.pi * (0.005555555555555556 * angle)))))
	else:
		tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+296)
		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(cos(Float64(Float64(angle * pi) / 180.0)) * sin(Float64(pi * Float64(0.005555555555555556 * angle))))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a))));
	elseif (t_0 <= 2e+296)
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos(((angle * pi) / 180.0)) * sin((pi * (0.005555555555555556 * angle)))));
	else
		tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+296], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|

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

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

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1.99999999999999996e296

    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-squares60.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-rr60.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-cube-cbrt60.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999996e296 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.6%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.1%

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

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

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

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

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

Alternative 6: 66.9% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+303)
       (*
        (* (+ b_m a) (- b_m a))
        (*
         2.0
         (*
          (cos (* PI (/ angle 180.0)))
          (sin (* PI (* 0.005555555555555556 angle))))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos((((double) M_PI) * (angle / 180.0))) * sin((((double) M_PI) * (0.005555555555555556 * angle)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.cos((Math.PI * (angle / 180.0))) * Math.sin((Math.PI * (0.005555555555555556 * angle)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
	elif t_0 <= 2e+303:
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.cos((math.pi * (angle / 180.0))) * math.sin((math.pi * (0.005555555555555556 * angle)))))
	else:
		tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+303)
		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(cos(Float64(pi * Float64(angle / 180.0))) * sin(Float64(pi * Float64(0.005555555555555556 * angle))))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a))));
	elseif (t_0 <= 2e+303)
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (cos((pi * (angle / 180.0))) * sin((pi * (0.005555555555555556 * angle)))));
	else
		tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|

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

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

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303

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

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

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

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

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

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

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

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

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.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-squares51.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-rr51.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. add-cube-cbrt53.3%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.7%

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

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

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

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

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

Alternative 7: 66.8% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 1.99999999999999996e296

    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-squares60.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-rr60.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-cube-cbrt60.2%

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

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

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

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

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

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

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

    if 1.99999999999999996e296 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.6%

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

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.1%

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

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

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

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

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

Alternative 8: 66.9% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+303)
       (*
        (* (+ b_m a) (- b_m a))
        (*
         2.0
         (*
          (sin (* PI (/ angle 180.0)))
          (cos (* PI (* 0.005555555555555556 angle))))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((((double) M_PI) * (angle / 180.0))) * cos((((double) M_PI) * (0.005555555555555556 * angle)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (Math.sin((Math.PI * (angle / 180.0))) * Math.cos((Math.PI * (0.005555555555555556 * angle)))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
	elif t_0 <= 2e+303:
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (math.sin((math.pi * (angle / 180.0))) * math.cos((math.pi * (0.005555555555555556 * angle)))))
	else:
		tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+303)
		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * Float64(2.0 * Float64(sin(Float64(pi * Float64(angle / 180.0))) * cos(Float64(pi * Float64(0.005555555555555556 * angle))))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a))));
	elseif (t_0 <= 2e+303)
		tmp = ((b_m + a) * (b_m - a)) * (2.0 * (sin((pi * (angle / 180.0))) * cos((pi * (0.005555555555555556 * angle)))));
	else
		tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|

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

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

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303

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

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

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

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

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

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

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

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

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.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-squares51.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-rr51.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. add-cube-cbrt53.3%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\left(\left(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 \left(0.005555555555555556 \cdot angle\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(1 - \frac{a}{b}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 66.9% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+303)
       (*
        (cos (* PI (* 0.005555555555555556 angle)))
        (* (sin (* PI (/ angle 180.0))) (* 2.0 (* (+ b_m a) (- b_m a)))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = cos((((double) M_PI) * (0.005555555555555556 * angle))) * (sin((((double) M_PI) * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = Math.cos((Math.PI * (0.005555555555555556 * angle))) * (Math.sin((Math.PI * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
	elif t_0 <= 2e+303:
		tmp = math.cos((math.pi * (0.005555555555555556 * angle))) * (math.sin((math.pi * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a))))
	else:
		tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+303)
		tmp = Float64(cos(Float64(pi * Float64(0.005555555555555556 * angle))) * Float64(sin(Float64(pi * Float64(angle / 180.0))) * Float64(2.0 * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a))));
	elseif (t_0 <= 2e+303)
		tmp = cos((pi * (0.005555555555555556 * angle))) * (sin((pi * (angle / 180.0))) * (2.0 * ((b_m + a) * (b_m - a))));
	else
		tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[Cos[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
b_m = \left|b\right|

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

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

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303

    1. Initial program 60.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around inf 60.2%

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

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

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

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

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

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

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

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.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-squares51.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-rr51.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. add-cube-cbrt53.3%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.7%

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

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

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

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

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

Alternative 10: 66.9% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ t_1 := \pi \cdot \frac{angle}{180}\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))) (t_1 (* PI (/ angle 180.0))))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+303)
       (* (cos t_1) (* (sin t_1) (* 2.0 (* (+ b_m a) (- b_m a)))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double t_1 = ((double) M_PI) * (angle / 180.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = cos(t_1) * (sin(t_1) * (2.0 * ((b_m + a) * (b_m - a))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double t_1 = Math.PI * (angle / 180.0);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = Math.cos(t_1) * (Math.sin(t_1) * (2.0 * ((b_m + a) * (b_m - a))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	t_1 = math.pi * (angle / 180.0)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
	elif t_0 <= 2e+303:
		tmp = math.cos(t_1) * (math.sin(t_1) * (2.0 * ((b_m + a) * (b_m - a))))
	else:
		tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	t_1 = Float64(pi * Float64(angle / 180.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+303)
		tmp = Float64(cos(t_1) * Float64(sin(t_1) * Float64(2.0 * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	t_1 = pi * (angle / 180.0);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a))));
	elseif (t_0 <= 2e+303)
		tmp = cos(t_1) * (sin(t_1) * (2.0 * ((b_m + a) * (b_m - a))));
	else
		tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[(2.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := \pi \cdot \frac{angle}{180}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(2 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303

    1. Initial program 60.0%

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

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

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

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

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.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-squares51.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-rr51.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. add-cube-cbrt53.3%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.7%

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

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

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

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

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

Alternative 11: 67.0% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;2 \cdot \left(\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b\_m \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b\_m + a\right)\right) \cdot \left(1 - \frac{a}{b\_m}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0)))
        (t_1 (* 0.005555555555555556 (* angle PI))))
   (if (<= t_0 (- INFINITY))
     (* 0.011111111111111112 (* a (* angle (* PI (- b_m a)))))
     (if (<= t_0 2e+303)
       (* 2.0 (* (cos t_1) (* (sin t_1) (* (+ b_m a) (- b_m a)))))
       (*
        0.011111111111111112
        (* (* b_m angle) (* (* PI (+ b_m a)) (- 1.0 (/ a b_m)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
	double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = 0.011111111111111112 * (a * (angle * (((double) M_PI) * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = 2.0 * (cos(t_1) * (sin(t_1) * ((b_m + a) * (b_m - a))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((((double) M_PI) * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a, 2.0);
	double t_1 = 0.005555555555555556 * (angle * Math.PI);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * (a * (angle * (Math.PI * (b_m - a))));
	} else if (t_0 <= 2e+303) {
		tmp = 2.0 * (Math.cos(t_1) * (Math.sin(t_1) * ((b_m + a) * (b_m - a))));
	} else {
		tmp = 0.011111111111111112 * ((b_m * angle) * ((Math.PI * (b_m + a)) * (1.0 - (a / b_m))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.pow(b_m, 2.0) - math.pow(a, 2.0)
	t_1 = 0.005555555555555556 * (angle * math.pi)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = 0.011111111111111112 * (a * (angle * (math.pi * (b_m - a))))
	elif t_0 <= 2e+303:
		tmp = 2.0 * (math.cos(t_1) * (math.sin(t_1) * ((b_m + a) * (b_m - a))))
	else:
		tmp = 0.011111111111111112 * ((b_m * angle) * ((math.pi * (b_m + a)) * (1.0 - (a / b_m))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
	t_1 = Float64(0.005555555555555556 * Float64(angle * pi))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(angle * Float64(pi * Float64(b_m - a)))));
	elseif (t_0 <= 2e+303)
		tmp = Float64(2.0 * Float64(cos(t_1) * Float64(sin(t_1) * Float64(Float64(b_m + a) * Float64(b_m - a)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b_m * angle) * Float64(Float64(pi * Float64(b_m + a)) * Float64(1.0 - Float64(a / b_m)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = (b_m ^ 2.0) - (a ^ 2.0);
	t_1 = 0.005555555555555556 * (angle * pi);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = 0.011111111111111112 * (a * (angle * (pi * (b_m - a))));
	elseif (t_0 <= 2e+303)
		tmp = 2.0 * (cos(t_1) * (sin(t_1) * ((b_m + a) * (b_m - a))));
	else
		tmp = 0.011111111111111112 * ((b_m * angle) * ((pi * (b_m + a)) * (1.0 - (a / b_m))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.011111111111111112 * N[(a * N[(angle * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+303], N[(2.0 * N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[Sin[t$95$1], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b$95$m * angle), $MachinePrecision] * N[(N[(Pi * N[(b$95$m + a), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[(a / b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a}^{2}\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \left(\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\right)\\

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303

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

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

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

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

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

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.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-squares51.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-rr51.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. add-cube-cbrt53.3%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.7%

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

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

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

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

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

Alternative 12: 67.0% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 50.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 58.9%

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

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

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

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

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

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e303

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 33.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*33.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. *-commutative33.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*33.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. Simplified33.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. unpow233.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. unpow233.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-squares51.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-rr51.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. add-cube-cbrt53.3%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 57.7%

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

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

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

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

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

Alternative 13: 62.9% accurate, 3.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.25000000000000005e154 < b

    1. Initial program 34.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*34.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. *-commutative34.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*34.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. Simplified34.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. unpow234.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. unpow234.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-squares55.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-rr55.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. add-cube-cbrt55.9%

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 58.6%

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

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

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

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

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

Alternative 14: 60.1% accurate, 19.0× speedup?

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

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

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


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

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000004e127 < b

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(b \cdot \left(1 - \frac{a}{b}\right)\right)}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \sqrt[3]{\pi}\right) \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Taylor expanded in angle around 0 59.7%

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

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

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

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

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

Alternative 15: 56.7% accurate, 23.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.29999999999999994e154

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

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

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

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

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

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

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

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

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

    if 1.29999999999999994e154 < a

    1. Initial program 25.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 46.0%

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

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

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

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

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

Alternative 16: 56.7% accurate, 23.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.4600000000000001e153

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

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

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

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

    if 1.4600000000000001e153 < a

    1. Initial program 25.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 46.0%

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

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

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

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

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

Alternative 17: 56.7% accurate, 23.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 6.00000000000000037e153

    1. Initial program 54.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. Add Preprocessing
    3. Taylor expanded in angle around 0 51.8%

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

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

      \[\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) \]

    if 6.00000000000000037e153 < a

    1. Initial program 25.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 46.0%

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

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

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

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

Alternative 18: 44.3% accurate, 26.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 2.20000000000000008e23

    1. Initial program 55.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. Add Preprocessing
    3. Taylor expanded in angle around 0 53.4%

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

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

      \[\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) \]
    6. Taylor expanded in b around inf 40.4%

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

    if 2.20000000000000008e23 < a

    1. Initial program 38.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 43.3%

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

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

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

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

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

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

Alternative 19: 38.1% accurate, 27.9× speedup?

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

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

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


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

    1. Initial program 54.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. Add Preprocessing
    3. Taylor expanded in angle around 0 54.0%

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

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

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

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

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

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

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

    if 1.8499999999999999e151 < b

    1. Initial program 34.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. Add Preprocessing
    3. Taylor expanded in angle around 0 34.2%

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

      \[\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) \]
    6. Taylor expanded in b around 0 23.5%

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

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

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

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

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

Alternative 20: 21.2% accurate, 29.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 4.9999999999999999e184

    1. Initial program 53.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. Add Preprocessing
    3. Taylor expanded in angle around 0 51.0%

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

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

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

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

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

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

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

    if 4.9999999999999999e184 < a

    1. Initial program 31.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. Add Preprocessing
    3. Taylor expanded in angle around 0 52.9%

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

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

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

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

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

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

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

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

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

Alternative 21: 41.8% accurate, 38.1× speedup?

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

\\
0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.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. Add Preprocessing
  3. Taylor expanded in angle around 0 51.1%

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

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

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

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

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

Alternative 22: 20.7% accurate, 46.6× speedup?

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

\\
0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b\_m \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.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. Add Preprocessing
  3. Taylor expanded in angle around 0 51.1%

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

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

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

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

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

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

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

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

Reproduce

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