ab-angle->ABCF B

Percentage Accurate: 53.4% → 68.0%
Time: 6.0s
Alternatives: 18
Speedup: 6.6×

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}

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 18 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.4% 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: 68.0% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 3.45 \cdot 10^{+174}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\right) \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;2 \cdot t\_0\\


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

    1. Initial program 57.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. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      4. lower-cos.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      9. lift-PI.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      10. lower-*.f64N/A

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

      \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
      4. lift-PI.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
      7. lift-+.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      8. lift--.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      10. lower-*.f64N/A

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

      \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    7. Step-by-step derivation
      1. lift-cos.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
      3. lift-PI.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      5. sin-+PI/2-revN/A

        \[\leadsto \left(2 \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \left(2 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(2 \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      8. lower-sin.f64N/A

        \[\leadsto \left(2 \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(2 \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      10. lower-fma.f64N/A

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
      11. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      12. lift-PI.f64N/A

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      13. lower-/.f64N/A

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      14. lift-PI.f6465.0

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
    8. Applied rewrites65.0%

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

    if 3.4500000000000001e174 < b

    1. Initial program 38.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. Taylor expanded in angle around inf

      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    3. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      4. lower-cos.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      6. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      8. lower-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      9. lift-PI.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
      10. lower-*.f64N/A

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

      \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
      4. lift-PI.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
      5. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
      6. lift-*.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
      7. lift-+.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      8. lift--.f64N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      9. associate-*r*N/A

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      10. lower-*.f64N/A

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

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

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

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
    9. Recombined 2 regimes into one program.
    10. Add Preprocessing

    Alternative 2: 67.7% accurate, 1.2× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.15 \cdot 10^{+62}:\\ \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (let* ((t_0 (* (* 0.005555555555555556 angle_m) PI)))
       (*
        angle_s
        (if (<= angle_m 1.15e+62)
          (* (* 2.0 (cos t_0)) (* (* (sin t_0) (+ a b_m)) (- b_m a)))
          (*
           (* 2.0 (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))))
           (*
            (sin (* (* PI angle_m) 0.005555555555555556))
            (* (+ b_m a) (- b_m a))))))))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	double t_0 = (0.005555555555555556 * angle_m) * ((double) M_PI);
    	double tmp;
    	if (angle_m <= 1.15e+62) {
    		tmp = (2.0 * cos(t_0)) * ((sin(t_0) * (a + b_m)) * (b_m - a));
    	} else {
    		tmp = (2.0 * sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0)))) * (sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * ((b_m + a) * (b_m - a)));
    	}
    	return angle_s * tmp;
    }
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	t_0 = Float64(Float64(0.005555555555555556 * angle_m) * pi)
    	tmp = 0.0
    	if (angle_m <= 1.15e+62)
    		tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(sin(t_0) * Float64(a + b_m)) * Float64(b_m - a)));
    	else
    		tmp = Float64(Float64(2.0 * sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0)))) * Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(Float64(b_m + a) * Float64(b_m - a))));
    	end
    	return Float64(angle_s * tmp)
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 1.15e+62], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    \begin{array}{l}
    t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 1.15 \cdot 10^{+62}:\\
    \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 1.14999999999999992e62

      1. Initial program 69.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. Taylor expanded in angle around inf

        \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      3. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-cos.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        6. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        9. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        10. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
        4. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        5. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        7. lift-+.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        8. lift--.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        9. associate-*r*N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        10. lower-*.f64N/A

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

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        2. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(2 \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        7. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        8. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6490.8

          \[\leadsto \left(2 \cdot \cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      8. Applied rewrites90.8%

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

      if 1.14999999999999992e62 < angle

      1. Initial program 29.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. Taylor expanded in angle around inf

        \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      3. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-cos.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        6. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        9. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        10. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Step-by-step derivation
        1. lift-cos.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        2. sin-+PI/2-revN/A

          \[\leadsto \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        3. lower-sin.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        4. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(2 \cdot \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(2 \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        9. associate-*r*N/A

          \[\leadsto \left(2 \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        10. lower-fma.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        11. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        12. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        13. lower-/.f64N/A

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        14. lift-PI.f6432.6

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
      6. Applied rewrites32.6%

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 3: 67.4% accurate, 1.2× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\ t_1 := \left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3.8 \cdot 10^{+42}:\\ \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot t\_1\\ \mathbf{else}:\\ \;\;\;\;2 \cdot t\_1\\ \end{array} \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (let* ((t_0 (* (* 0.005555555555555556 angle_m) PI))
            (t_1 (* (* (sin t_0) (+ a b_m)) (- b_m a))))
       (*
        angle_s
        (if (<= angle_m 3.8e+42) (* (* 2.0 (cos t_0)) t_1) (* 2.0 t_1)))))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	double t_0 = (0.005555555555555556 * angle_m) * ((double) M_PI);
    	double t_1 = (sin(t_0) * (a + b_m)) * (b_m - a);
    	double tmp;
    	if (angle_m <= 3.8e+42) {
    		tmp = (2.0 * cos(t_0)) * t_1;
    	} else {
    		tmp = 2.0 * t_1;
    	}
    	return angle_s * tmp;
    }
    
    b_m = Math.abs(b);
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b_m, double angle_m) {
    	double t_0 = (0.005555555555555556 * angle_m) * Math.PI;
    	double t_1 = (Math.sin(t_0) * (a + b_m)) * (b_m - a);
    	double tmp;
    	if (angle_m <= 3.8e+42) {
    		tmp = (2.0 * Math.cos(t_0)) * t_1;
    	} else {
    		tmp = 2.0 * t_1;
    	}
    	return angle_s * tmp;
    }
    
    b_m = math.fabs(b)
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b_m, angle_m):
    	t_0 = (0.005555555555555556 * angle_m) * math.pi
    	t_1 = (math.sin(t_0) * (a + b_m)) * (b_m - a)
    	tmp = 0
    	if angle_m <= 3.8e+42:
    		tmp = (2.0 * math.cos(t_0)) * t_1
    	else:
    		tmp = 2.0 * t_1
    	return angle_s * tmp
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	t_0 = Float64(Float64(0.005555555555555556 * angle_m) * pi)
    	t_1 = Float64(Float64(sin(t_0) * Float64(a + b_m)) * Float64(b_m - a))
    	tmp = 0.0
    	if (angle_m <= 3.8e+42)
    		tmp = Float64(Float64(2.0 * cos(t_0)) * t_1);
    	else
    		tmp = Float64(2.0 * t_1);
    	end
    	return Float64(angle_s * tmp)
    end
    
    b_m = abs(b);
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp_2 = code(angle_s, a, b_m, angle_m)
    	t_0 = (0.005555555555555556 * angle_m) * pi;
    	t_1 = (sin(t_0) * (a + b_m)) * (b_m - a);
    	tmp = 0.0;
    	if (angle_m <= 3.8e+42)
    		tmp = (2.0 * cos(t_0)) * t_1;
    	else
    		tmp = 2.0 * t_1;
    	end
    	tmp_2 = angle_s * tmp;
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 3.8e+42], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], N[(2.0 * t$95$1), $MachinePrecision]]), $MachinePrecision]]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    \begin{array}{l}
    t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\
    t_1 := \left(\sin t\_0 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 3.8 \cdot 10^{+42}:\\
    \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;2 \cdot t\_1\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 3.7999999999999998e42

      1. Initial program 71.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. Taylor expanded in angle around inf

        \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      3. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-cos.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        6. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        9. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        10. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
        4. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        5. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        7. lift-+.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        8. lift--.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        9. associate-*r*N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        10. lower-*.f64N/A

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

        \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        2. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(2 \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \left(\frac{1}{180} \cdot angle\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        7. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
        8. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        9. lift-PI.f6493.9

          \[\leadsto \left(2 \cdot \cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      8. Applied rewrites93.9%

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

      if 3.7999999999999998e42 < angle

      1. Initial program 29.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. Taylor expanded in angle around inf

        \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      3. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-cos.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        6. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        9. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        10. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

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

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
        4. lift-PI.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        5. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        7. lift-+.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        8. lift--.f64N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        9. associate-*r*N/A

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        10. lower-*.f64N/A

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

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

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

          \[\leadsto 2 \cdot \left(\color{blue}{\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
      9. Recombined 2 regimes into one program.
      10. Add Preprocessing

      Alternative 4: 67.1% accurate, 1.3× speedup?

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

        1. Initial program 55.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. Taylor expanded in angle around inf

          \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        3. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-cos.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          9. lift-PI.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          10. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

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

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
          4. lift-PI.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
          6. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          7. lift-+.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          8. lift--.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
          9. associate-*r*N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
          10. lower-*.f64N/A

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

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

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

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot b\right) \cdot \left(b - a\right)\right) \]

          if 5.2000000000000003e-192 < a

          1. Initial program 50.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. Taylor expanded in angle around inf

            \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          3. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            3. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            4. lower-cos.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            6. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            8. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            9. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            10. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

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

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
            3. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
            4. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
            5. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
            6. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
            7. lift-+.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
            8. lift--.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
            10. lower-*.f64N/A

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

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

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

              \[\leadsto 2 \cdot \left(\color{blue}{\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
          9. Recombined 2 regimes into one program.
          10. Add Preprocessing

          Alternative 5: 66.5% accurate, 1.3× speedup?

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

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

            \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          3. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            3. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            4. lower-cos.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            6. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            8. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            9. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            10. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

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

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
            3. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
            4. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
            5. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
            6. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
            7. lift-+.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
            8. lift--.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
            10. lower-*.f64N/A

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

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

          Alternative 6: 66.1% accurate, 2.3× speedup?

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

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

            \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          3. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            3. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            4. lower-cos.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            6. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            8. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            9. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            10. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
          5. Step-by-step derivation
            1. lift-*.f64N/A

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

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
            3. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
            4. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
            5. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
            6. lift-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
            7. lift-+.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
            8. lift--.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
            9. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
            10. lower-*.f64N/A

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

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

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

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

            Alternative 7: 62.9% accurate, 2.1× speedup?

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

              1. Initial program 71.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. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              3. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                3. associate-*r*N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                5. *-commutativeN/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                8. unpow2N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                9. unpow2N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                10. difference-of-squaresN/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                12. lower-+.f64N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                13. lower--.f6473.2

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              4. Applied rewrites73.2%

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

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                2. lift-*.f64N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                3. lift-+.f64N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                4. lift--.f64N/A

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                5. associate-*r*N/A

                  \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                6. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                7. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                8. lift-*.f64N/A

                  \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                9. *-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                11. lower-*.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                12. lift-PI.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                13. +-commutativeN/A

                  \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                14. lower-+.f64N/A

                  \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                15. lift--.f6491.1

                  \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
              6. Applied rewrites91.1%

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

              if 9.0000000000000002e41 < angle

              1. Initial program 29.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. Taylor expanded in angle around inf

                \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              3. Step-by-step derivation
                1. associate-*r*N/A

                  \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                3. lower-*.f64N/A

                  \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
                4. lower-cos.f64N/A

                  \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
                5. *-commutativeN/A

                  \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
                7. *-commutativeN/A

                  \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
                8. lower-*.f64N/A

                  \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
                9. lift-PI.f64N/A

                  \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
                10. lower-*.f64N/A

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

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

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

                  \[\leadsto 2 \cdot \left(\color{blue}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
              7. Recombined 2 regimes into one program.
              8. Add Preprocessing

              Alternative 8: 62.8% accurate, 3.3× speedup?

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

                1. Initial program 73.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. Taylor expanded in angle around 0

                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  3. associate-*r*N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  5. *-commutativeN/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  7. lift-PI.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  8. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  9. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                  10. difference-of-squaresN/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  12. lower-+.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  13. lower--.f6475.6

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                4. Applied rewrites75.6%

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

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  2. lift-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  3. lift-+.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  4. lift--.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  5. associate-*r*N/A

                    \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  7. lift-PI.f64N/A

                    \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  8. lift-*.f64N/A

                    \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  9. *-commutativeN/A

                    \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  10. lower-*.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  12. lift-PI.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  13. +-commutativeN/A

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  14. lower-+.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  15. lift--.f6494.4

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
                6. Applied rewrites94.4%

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

                if 5.89999999999999987e23 < angle < 6.09999999999999965e165

                1. Initial program 28.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. Taylor expanded in angle around 0

                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  3. associate-*r*N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  5. *-commutativeN/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  7. lift-PI.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  8. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  9. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                  10. difference-of-squaresN/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  12. lower-+.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  13. lower--.f6428.4

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                4. Applied rewrites28.4%

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

                  \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                6. Step-by-step derivation
                  1. associate-*r*N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                  3. lower-*.f64N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                  4. pow2N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                  5. lift-*.f64N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                  7. lift-PI.f6420.8

                    \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
                7. Applied rewrites20.8%

                  \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
                8. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
                  2. lift-PI.f64N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                  3. lift-*.f64N/A

                    \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                  4. associate-*r*N/A

                    \[\leadsto \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right) \]
                  5. add-log-expN/A

                    \[\leadsto \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \log \left(e^{\mathsf{PI}\left(\right)}\right) \]
                  6. log-pow-revN/A

                    \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  7. lower-log.f64N/A

                    \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  8. lower-pow.f64N/A

                    \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  9. lower-exp.f64N/A

                    \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  10. lift-PI.f64N/A

                    \[\leadsto \log \left({\left(e^{\pi}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  11. lower-*.f6423.5

                    \[\leadsto \log \left({\left(e^{\pi}\right)}^{\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                9. Applied rewrites23.5%

                  \[\leadsto \log \left({\left(e^{\pi}\right)}^{\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                10. Step-by-step derivation
                  1. lift-pow.f64N/A

                    \[\leadsto \log \left({\left(e^{\pi}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  2. lift-PI.f64N/A

                    \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  3. lift-exp.f64N/A

                    \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  4. pow-expN/A

                    \[\leadsto \log \left(e^{\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  5. lower-exp.f64N/A

                    \[\leadsto \log \left(e^{\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  6. lower-*.f64N/A

                    \[\leadsto \log \left(e^{\mathsf{PI}\left(\right) \cdot \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                  7. lift-PI.f6423.5

                    \[\leadsto \log \left(e^{\pi \cdot \left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                11. Applied rewrites23.5%

                  \[\leadsto \log \left(e^{\pi \cdot \left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]

                if 6.09999999999999965e165 < angle

                1. Initial program 29.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. Taylor expanded in angle around 0

                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  3. associate-*r*N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  5. *-commutativeN/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  7. lift-PI.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  8. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  9. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                  10. difference-of-squaresN/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  12. lower-+.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  13. lower--.f6427.3

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                4. Applied rewrites27.3%

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

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  3. lift-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  4. lift-+.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  5. lift--.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  6. associate-*l*N/A

                    \[\leadsto \left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
                  7. lift-PI.f64N/A

                    \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right) \]
                  8. lift-*.f64N/A

                    \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
                  9. *-commutativeN/A

                    \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
                  10. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
                  12. lift-PI.f64N/A

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot \frac{1}{90}\right) \]
                  13. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
                  14. *-commutativeN/A

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
                  15. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
                  16. lift--.f64N/A

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
                  17. +-commutativeN/A

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right) \]
                  18. lower-+.f6427.4

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \]
                6. Applied rewrites27.4%

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

              Alternative 9: 62.2% accurate, 2.2× speedup?

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

                1. Initial program 64.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. Taylor expanded in a around inf

                  \[\leadsto \color{blue}{\left(-2 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(\left({a}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{-2}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(\left({a}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{-2}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \left(\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  5. lower-sin.f64N/A

                    \[\leadsto \left(\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \left(\left(\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  7. lower-*.f64N/A

                    \[\leadsto \left(\left(\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  8. *-commutativeN/A

                    \[\leadsto \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  9. lower-*.f64N/A

                    \[\leadsto \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  10. lift-PI.f64N/A

                    \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot {a}^{2}\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  11. unpow2N/A

                    \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(a \cdot a\right)\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  12. lower-*.f6463.7

                    \[\leadsto \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a \cdot a\right)\right) \cdot -2\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                4. Applied rewrites63.7%

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

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

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

                  if 7.5000000000000002e-112 < b

                  1. Initial program 48.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. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6451.0

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites51.0%

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

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    2. lift-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    3. lift-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    4. lift--.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    5. associate-*r*N/A

                      \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    8. lift-*.f64N/A

                      \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    9. *-commutativeN/A

                      \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    12. lift-PI.f64N/A

                      \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    13. +-commutativeN/A

                      \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    14. lower-+.f64N/A

                      \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                    15. lift--.f6463.5

                      \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
                  6. Applied rewrites63.5%

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
                7. Recombined 2 regimes into one program.
                8. Add Preprocessing

                Alternative 10: 58.1% accurate, 6.6× speedup?

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

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

                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                3. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                  3. associate-*r*N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  5. *-commutativeN/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  7. lift-PI.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  8. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                  9. unpow2N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                  10. difference-of-squaresN/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  12. lower-+.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  13. lower--.f6453.7

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                4. Applied rewrites53.7%

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

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  2. lift-*.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  3. lift-+.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  4. lift--.f64N/A

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  5. associate-*r*N/A

                    \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  6. lower-*.f64N/A

                    \[\leadsto \left(\left(\left(\pi \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  7. lift-PI.f64N/A

                    \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  8. lift-*.f64N/A

                    \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  9. *-commutativeN/A

                    \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  10. lower-*.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  12. lift-PI.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  13. +-commutativeN/A

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  14. lower-+.f64N/A

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
                  15. lift--.f6462.2

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
                6. Applied rewrites62.2%

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

                Alternative 11: 57.5% accurate, 1.2× speedup?

                \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -8.15 \cdot 10^{-215}:\\ \;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(a \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \end{array} \]
                b_m = (fabs.f64 b)
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b_m angle_m)
                 :precision binary64
                 (let* ((t_0 (* 2.0 (- (pow b_m 2.0) (pow a 2.0)))))
                   (*
                    angle_s
                    (if (<= t_0 -8.15e-215)
                      (* (* (* (* angle_m PI) -0.011111111111111112) a) a)
                      (if (<= t_0 INFINITY)
                        (* (* (* PI angle_m) (* b_m b_m)) 0.011111111111111112)
                        (* (* (* PI angle_m) (* a (- b_m a))) 0.011111111111111112))))))
                b_m = fabs(b);
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b_m, double angle_m) {
                	double t_0 = 2.0 * (pow(b_m, 2.0) - pow(a, 2.0));
                	double tmp;
                	if (t_0 <= -8.15e-215) {
                		tmp = (((angle_m * ((double) M_PI)) * -0.011111111111111112) * a) * a;
                	} else if (t_0 <= ((double) INFINITY)) {
                		tmp = ((((double) M_PI) * angle_m) * (b_m * b_m)) * 0.011111111111111112;
                	} else {
                		tmp = ((((double) M_PI) * angle_m) * (a * (b_m - a))) * 0.011111111111111112;
                	}
                	return angle_s * tmp;
                }
                
                b_m = Math.abs(b);
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b_m, double angle_m) {
                	double t_0 = 2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0));
                	double tmp;
                	if (t_0 <= -8.15e-215) {
                		tmp = (((angle_m * Math.PI) * -0.011111111111111112) * a) * a;
                	} else if (t_0 <= Double.POSITIVE_INFINITY) {
                		tmp = ((Math.PI * angle_m) * (b_m * b_m)) * 0.011111111111111112;
                	} else {
                		tmp = ((Math.PI * angle_m) * (a * (b_m - a))) * 0.011111111111111112;
                	}
                	return angle_s * tmp;
                }
                
                b_m = math.fabs(b)
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b_m, angle_m):
                	t_0 = 2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))
                	tmp = 0
                	if t_0 <= -8.15e-215:
                		tmp = (((angle_m * math.pi) * -0.011111111111111112) * a) * a
                	elif t_0 <= math.inf:
                		tmp = ((math.pi * angle_m) * (b_m * b_m)) * 0.011111111111111112
                	else:
                		tmp = ((math.pi * angle_m) * (a * (b_m - a))) * 0.011111111111111112
                	return angle_s * tmp
                
                b_m = abs(b)
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b_m, angle_m)
                	t_0 = Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0)))
                	tmp = 0.0
                	if (t_0 <= -8.15e-215)
                		tmp = Float64(Float64(Float64(Float64(angle_m * pi) * -0.011111111111111112) * a) * a);
                	elseif (t_0 <= Inf)
                		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b_m * b_m)) * 0.011111111111111112);
                	else
                		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(a * Float64(b_m - a))) * 0.011111111111111112);
                	end
                	return Float64(angle_s * tmp)
                end
                
                b_m = abs(b);
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp_2 = code(angle_s, a, b_m, angle_m)
                	t_0 = 2.0 * ((b_m ^ 2.0) - (a ^ 2.0));
                	tmp = 0.0;
                	if (t_0 <= -8.15e-215)
                		tmp = (((angle_m * pi) * -0.011111111111111112) * a) * a;
                	elseif (t_0 <= Inf)
                		tmp = ((pi * angle_m) * (b_m * b_m)) * 0.011111111111111112;
                	else
                		tmp = ((pi * angle_m) * (a * (b_m - a))) * 0.011111111111111112;
                	end
                	tmp_2 = angle_s * tmp;
                end
                
                b_m = N[Abs[b], $MachinePrecision]
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, -8.15e-215], N[(N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * a), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(a * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]), $MachinePrecision]]
                
                \begin{array}{l}
                b_m = \left|b\right|
                \\
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                \begin{array}{l}
                t_0 := 2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;t\_0 \leq -8.15 \cdot 10^{-215}:\\
                \;\;\;\;\left(\left(\left(angle\_m \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a\\
                
                \mathbf{elif}\;t\_0 \leq \infty:\\
                \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot 0.011111111111111112\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(a \cdot \left(b\_m - a\right)\right)\right) \cdot 0.011111111111111112\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -8.15e-215

                  1. Initial program 55.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. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6451.1

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites51.1%

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

                    \[\leadsto {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  6. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                  7. Applied rewrites51.5%

                    \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot angle, \pi, -\frac{\mathsf{fma}\left(\frac{\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle}{a}, -0.011111111111111112, \left(\left(\left(0 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right)}{a}\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                  8. Taylor expanded in a around inf

                    \[\leadsto \left(\frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a \cdot a\right) \]
                  9. Step-by-step derivation
                    1. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                    3. lift-*.f64N/A

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                    4. lift-PI.f6450.9

                      \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                  10. Applied rewrites50.9%

                    \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                  11. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot \color{blue}{a}\right) \]
                  12. Applied rewrites61.7%

                    \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a \]

                  if -8.15e-215 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

                  1. Initial program 58.5%

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

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6454.9

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites54.9%

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

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                  6. Step-by-step derivation
                    1. difference-of-squares-revN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                    2. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                    3. pow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                    4. metadata-evalN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                    5. pow-flipN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                    6. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot \frac{1}{90} \]
                    7. lower-*.f6454.7

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112 \]
                  7. Applied rewrites54.7%

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112 \]

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

                  1. Initial program 0.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. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6460.4

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites60.4%

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

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(a \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  6. Step-by-step derivation
                    1. Applied rewrites52.5%

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(a \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  7. Recombined 3 regimes into one program.
                  8. Add Preprocessing

                  Alternative 12: 57.3% accurate, 2.0× speedup?

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

                    1. Initial program 55.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6451.4

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites51.4%

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

                      \[\leadsto {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                    7. Applied rewrites51.8%

                      \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot angle, \pi, -\frac{\mathsf{fma}\left(\frac{\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle}{a}, -0.011111111111111112, \left(\left(\left(0 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right)}{a}\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                    8. Taylor expanded in a around inf

                      \[\leadsto \left(\frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a \cdot a\right) \]
                    9. Step-by-step derivation
                      1. associate-*r*N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      4. lift-PI.f6451.2

                        \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                    10. Applied rewrites51.2%

                      \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                    11. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot \color{blue}{a}\right) \]
                    12. Applied rewrites62.5%

                      \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a \]

                    if -1.9999999999999999e-143 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                    1. Initial program 52.2%

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

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6455.2

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites55.2%

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

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lift-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      3. lift-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      4. lift-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      5. lift--.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      6. associate-*l*N/A

                        \[\leadsto \left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right) \]
                      8. lift-*.f64N/A

                        \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
                      9. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
                      10. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
                      12. lift-PI.f64N/A

                        \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot \frac{1}{90}\right) \]
                      13. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
                      14. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
                      15. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
                      16. lift--.f64N/A

                        \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
                      17. +-commutativeN/A

                        \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right) \]
                      18. lower-+.f6455.3

                        \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \]
                    6. Applied rewrites55.3%

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

                  Alternative 13: 57.0% accurate, 2.1× speedup?

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

                    1. Initial program 55.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6451.1

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites51.1%

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

                      \[\leadsto {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                    7. Applied rewrites51.5%

                      \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot angle, \pi, -\frac{\mathsf{fma}\left(\frac{\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle}{a}, -0.011111111111111112, \left(\left(\left(0 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right)}{a}\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                    8. Taylor expanded in a around inf

                      \[\leadsto \left(\frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a \cdot a\right) \]
                    9. Step-by-step derivation
                      1. associate-*r*N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      4. lift-PI.f6450.9

                        \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                    10. Applied rewrites50.9%

                      \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                    11. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot \color{blue}{a}\right) \]
                    12. Applied rewrites61.7%

                      \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a \]

                    if -8.15e-215 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                    1. Initial program 52.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. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6455.5

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites55.5%

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

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    6. Step-by-step derivation
                      1. Applied rewrites54.3%

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    7. Recombined 2 regimes into one program.
                    8. Add Preprocessing

                    Alternative 14: 57.0% accurate, 2.2× speedup?

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

                      1. Initial program 55.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. Taylor expanded in angle around 0

                        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                      3. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        3. associate-*r*N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        4. lower-*.f64N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        5. *-commutativeN/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        6. lower-*.f64N/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        7. lift-PI.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        8. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        9. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                        10. difference-of-squaresN/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        11. lower-*.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        12. lower-+.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        13. lower--.f6451.1

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                      4. Applied rewrites51.1%

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

                        \[\leadsto {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                      6. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                      7. Applied rewrites51.5%

                        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot angle, \pi, -\frac{\mathsf{fma}\left(\frac{\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle}{a}, -0.011111111111111112, \left(\left(\left(0 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right)}{a}\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                      8. Taylor expanded in a around inf

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a \cdot a\right) \]
                      9. Step-by-step derivation
                        1. associate-*r*N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                        3. lift-*.f64N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                        4. lift-PI.f6450.9

                          \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                      10. Applied rewrites50.9%

                        \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                      11. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot \color{blue}{a}\right) \]
                      12. Applied rewrites61.7%

                        \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a \]

                      if -8.15e-215 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                      1. Initial program 52.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. Taylor expanded in angle around 0

                        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                      3. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        3. associate-*r*N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        4. lower-*.f64N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        5. *-commutativeN/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        6. lower-*.f64N/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        7. lift-PI.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        8. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        9. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                        10. difference-of-squaresN/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        11. lower-*.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        12. lower-+.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        13. lower--.f6455.5

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                      4. Applied rewrites55.5%

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

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                      6. Step-by-step derivation
                        1. difference-of-squares-revN/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                        2. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                        3. pow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                        4. metadata-evalN/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                        5. pow-flipN/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                        6. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot \frac{1}{90} \]
                        7. lower-*.f6453.7

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112 \]
                      7. Applied rewrites53.7%

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

                    Alternative 15: 53.2% accurate, 2.2× speedup?

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

                      1. Initial program 55.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. Taylor expanded in angle around 0

                        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                      3. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        3. associate-*r*N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        4. lower-*.f64N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        5. *-commutativeN/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        6. lower-*.f64N/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        7. lift-PI.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        8. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        9. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                        10. difference-of-squaresN/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        11. lower-*.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        12. lower-+.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        13. lower--.f6451.1

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                      4. Applied rewrites51.1%

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

                        \[\leadsto {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                      6. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                      7. Applied rewrites51.5%

                        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot angle, \pi, -\frac{\mathsf{fma}\left(\frac{\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle}{a}, -0.011111111111111112, \left(\left(\left(0 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right)}{a}\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                      8. Taylor expanded in a around inf

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a \cdot a\right) \]
                      9. Step-by-step derivation
                        1. associate-*r*N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                        3. lift-*.f64N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                        4. lift-PI.f6450.9

                          \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                      10. Applied rewrites50.9%

                        \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                      11. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot \color{blue}{a}\right) \]
                      12. Applied rewrites61.7%

                        \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot -0.011111111111111112\right) \cdot a\right) \cdot a \]

                      if -8.15e-215 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                      1. Initial program 52.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. Taylor expanded in angle around 0

                        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                      3. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                        3. associate-*r*N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        4. lower-*.f64N/A

                          \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        5. *-commutativeN/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        6. lower-*.f64N/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        7. lift-PI.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        8. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                        9. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                        10. difference-of-squaresN/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        11. lower-*.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        12. lower-+.f64N/A

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                        13. lower--.f6455.5

                          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                      4. Applied rewrites55.5%

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

                        \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                      6. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
                        2. lower-*.f64N/A

                          \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
                        3. *-commutativeN/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
                        4. lower-*.f64N/A

                          \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
                        5. lift-PI.f64N/A

                          \[\leadsto \left(\left(\pi \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
                        6. unpow2N/A

                          \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
                        7. lower-*.f6453.7

                          \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
                      7. Applied rewrites53.7%

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

                    Alternative 16: 38.3% accurate, 9.4× speedup?

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

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

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6453.7

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites53.7%

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

                      \[\leadsto {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                    7. Applied rewrites45.0%

                      \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot angle, \pi, -\frac{\mathsf{fma}\left(\frac{\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle}{a}, -0.011111111111111112, \left(\left(\left(0 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right)}{a}\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                    8. Taylor expanded in a around inf

                      \[\leadsto \left(\frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a \cdot a\right) \]
                    9. Step-by-step derivation
                      1. associate-*r*N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      4. lift-PI.f6434.8

                        \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                    10. Applied rewrites34.8%

                      \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                    11. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot \color{blue}{a}\right) \]
                    12. Applied rewrites38.3%

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

                    Alternative 17: 34.8% accurate, 9.4× speedup?

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

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

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6453.7

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites53.7%

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

                      \[\leadsto {a}^{2} \cdot \color{blue}{\left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(-1 \cdot \frac{\frac{-1}{90} \cdot \frac{angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)}{a} + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}{a} + \frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot {a}^{\color{blue}{2}} \]
                    7. Applied rewrites45.0%

                      \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot angle, \pi, -\frac{\mathsf{fma}\left(\frac{\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle}{a}, -0.011111111111111112, \left(\left(\left(0 \cdot b\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\right)}{a}\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                    8. Taylor expanded in a around inf

                      \[\leadsto \left(\frac{-1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a \cdot a\right) \]
                    9. Step-by-step derivation
                      1. associate-*r*N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a \cdot a\right) \]
                      4. lift-PI.f6434.8

                        \[\leadsto \left(\left(-0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(a \cdot a\right) \]
                    10. Applied rewrites34.8%

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

                    Alternative 18: 13.3% accurate, 17.9× speedup?

                    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \log 1 \end{array} \]
                    b_m = (fabs.f64 b)
                    angle\_m = (fabs.f64 angle)
                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                    (FPCore (angle_s a b_m angle_m) :precision binary64 (* angle_s (log 1.0)))
                    b_m = fabs(b);
                    angle\_m = fabs(angle);
                    angle\_s = copysign(1.0, angle);
                    double code(double angle_s, double a, double b_m, double angle_m) {
                    	return angle_s * log(1.0);
                    }
                    
                    b_m =     private
                    angle\_m =     private
                    angle\_s =     private
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(angle_s, a, b_m, angle_m)
                    use fmin_fmax_functions
                        real(8), intent (in) :: angle_s
                        real(8), intent (in) :: a
                        real(8), intent (in) :: b_m
                        real(8), intent (in) :: angle_m
                        code = angle_s * log(1.0d0)
                    end function
                    
                    b_m = Math.abs(b);
                    angle\_m = Math.abs(angle);
                    angle\_s = Math.copySign(1.0, angle);
                    public static double code(double angle_s, double a, double b_m, double angle_m) {
                    	return angle_s * Math.log(1.0);
                    }
                    
                    b_m = math.fabs(b)
                    angle\_m = math.fabs(angle)
                    angle\_s = math.copysign(1.0, angle)
                    def code(angle_s, a, b_m, angle_m):
                    	return angle_s * math.log(1.0)
                    
                    b_m = abs(b)
                    angle\_m = abs(angle)
                    angle\_s = copysign(1.0, angle)
                    function code(angle_s, a, b_m, angle_m)
                    	return Float64(angle_s * log(1.0))
                    end
                    
                    b_m = abs(b);
                    angle\_m = abs(angle);
                    angle\_s = sign(angle) * abs(1.0);
                    function tmp = code(angle_s, a, b_m, angle_m)
                    	tmp = angle_s * log(1.0);
                    end
                    
                    b_m = N[Abs[b], $MachinePrecision]
                    angle\_m = N[Abs[angle], $MachinePrecision]
                    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[Log[1.0], $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    b_m = \left|b\right|
                    \\
                    angle\_m = \left|angle\right|
                    \\
                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                    
                    \\
                    angle\_s \cdot \log 1
                    \end{array}
                    
                    Derivation
                    1. Initial program 53.4%

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

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6453.7

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites53.7%

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

                      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. associate-*r*N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                      3. lower-*.f64N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                      4. pow2N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                      5. lift-*.f64N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                      7. lift-PI.f6434.8

                        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
                    7. Applied rewrites34.8%

                      \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
                      2. lift-PI.f64N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
                      4. associate-*r*N/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right) \]
                      5. add-log-expN/A

                        \[\leadsto \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \log \left(e^{\mathsf{PI}\left(\right)}\right) \]
                      6. log-pow-revN/A

                        \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                      7. lower-log.f64N/A

                        \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                      8. lower-pow.f64N/A

                        \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                      9. lower-exp.f64N/A

                        \[\leadsto \log \left({\left(e^{\mathsf{PI}\left(\right)}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                      10. lift-PI.f64N/A

                        \[\leadsto \log \left({\left(e^{\pi}\right)}^{\left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                      11. lower-*.f6427.0

                        \[\leadsto \log \left({\left(e^{\pi}\right)}^{\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                    9. Applied rewrites27.0%

                      \[\leadsto \log \left({\left(e^{\pi}\right)}^{\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right)}\right) \]
                    10. Taylor expanded in a around 0

                      \[\leadsto \log 1 \]
                    11. Step-by-step derivation
                      1. Applied rewrites13.3%

                        \[\leadsto \log 1 \]
                      2. Add Preprocessing

                      Reproduce

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