ab-angle->ABCF B

Percentage Accurate: 54.2% → 66.5%
Time: 7.3s
Alternatives: 15
Speedup: 13.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 54.2% accurate, 1.0× speedup?

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

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

Alternative 1: 66.5% accurate, 1.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 8.6 \cdot 10^{-75}:\\ \;\;\;\;\left(\left(\left(\left(\left(\left(a\_m + b\_m\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \cos \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot 2\\ \mathbf{elif}\;angle\_m \leq 1.35 \cdot 10^{+113}:\\ \;\;\;\;\sin \left(\left(2 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(a\_m + b\_m\right)\right)\\ \mathbf{elif}\;angle\_m \leq 3 \cdot 10^{+167}:\\ \;\;\;\;\mathsf{fma}\left({\left(angle\_m \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sin \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 1\right) \cdot 2\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 8.6e-75)
    (*
     (*
      (* (* (* (* (+ a_m b_m) PI) angle_m) 0.005555555555555556) (- b_m a_m))
      (cos (* (* angle_m PI) 0.005555555555555556)))
     2.0)
    (if (<= angle_m 1.35e+113)
      (*
       (sin (* (* 2.0 (* angle_m PI)) 0.005555555555555556))
       (* (- b_m a_m) (+ a_m b_m)))
      (if (<= angle_m 3e+167)
        (*
         (fma (pow (* angle_m PI) 2.0) -3.08641975308642e-5 2.0)
         (*
          (sin (* (* PI angle_m) 0.005555555555555556))
          (* (+ b_m a_m) (- b_m a_m))))
        (*
         (*
          (*
           (* (sin (* angle_m (* 0.005555555555555556 PI))) (+ a_m b_m))
           (- b_m a_m))
          1.0)
         2.0))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 8.6e-75) {
		tmp = ((((((a_m + b_m) * ((double) M_PI)) * angle_m) * 0.005555555555555556) * (b_m - a_m)) * cos(((angle_m * ((double) M_PI)) * 0.005555555555555556))) * 2.0;
	} else if (angle_m <= 1.35e+113) {
		tmp = sin(((2.0 * (angle_m * ((double) M_PI))) * 0.005555555555555556)) * ((b_m - a_m) * (a_m + b_m));
	} else if (angle_m <= 3e+167) {
		tmp = fma(pow((angle_m * ((double) M_PI)), 2.0), -3.08641975308642e-5, 2.0) * (sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * ((b_m + a_m) * (b_m - a_m)));
	} else {
		tmp = (((sin((angle_m * (0.005555555555555556 * ((double) M_PI)))) * (a_m + b_m)) * (b_m - a_m)) * 1.0) * 2.0;
	}
	return angle_s * tmp;
}
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 8.6e-75)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(a_m + b_m) * pi) * angle_m) * 0.005555555555555556) * Float64(b_m - a_m)) * cos(Float64(Float64(angle_m * pi) * 0.005555555555555556))) * 2.0);
	elseif (angle_m <= 1.35e+113)
		tmp = Float64(sin(Float64(Float64(2.0 * Float64(angle_m * pi)) * 0.005555555555555556)) * Float64(Float64(b_m - a_m) * Float64(a_m + b_m)));
	elseif (angle_m <= 3e+167)
		tmp = Float64(fma((Float64(angle_m * pi) ^ 2.0), -3.08641975308642e-5, 2.0) * Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(Float64(b_m + a_m) * Float64(b_m - a_m))));
	else
		tmp = Float64(Float64(Float64(Float64(sin(Float64(angle_m * Float64(0.005555555555555556 * pi))) * Float64(a_m + b_m)) * Float64(b_m - a_m)) * 1.0) * 2.0);
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 8.6e-75], N[(N[(N[(N[(N[(N[(N[(a$95$m + b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[angle$95$m, 1.35e+113], N[(N[Sin[N[(N[(2.0 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 3e+167], N[(N[(N[Power[N[(angle$95$m * Pi), $MachinePrecision], 2.0], $MachinePrecision] * -3.08641975308642e-5 + 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sin[N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision] * 2.0), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

\mathbf{elif}\;angle\_m \leq 3 \cdot 10^{+167}:\\
\;\;\;\;\mathsf{fma}\left({\left(angle\_m \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\\

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


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

    1. Initial program 60.0%

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

      \[\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)} \]
    4. 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) \]
    5. Applied rewrites62.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)} \]
    6. Applied rewrites75.9%

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

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

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

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

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

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

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

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

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

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

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

    if 8.5999999999999998e-75 < angle < 1.35000000000000006e113

    1. Initial program 39.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites52.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)} \]
    6. Applied rewrites52.4%

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

    if 1.35000000000000006e113 < angle < 3.00000000000000012e167

    1. Initial program 37.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. Add Preprocessing
    3. 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)} \]
    4. 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) \]
    5. Applied rewrites26.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)} \]
    6. Taylor expanded in angle around 0

      \[\leadsto \left(2 + \frac{-1}{32400} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \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) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \left(\frac{-1}{32400} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 2\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. *-commutativeN/A

        \[\leadsto \left(\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{-1}{32400} + 2\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-fma.f64N/A

        \[\leadsto \mathsf{fma}\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}, \frac{-1}{32400}, 2\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. pow-prod-downN/A

        \[\leadsto \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{32400}, 2\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. lower-pow.f64N/A

        \[\leadsto \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{32400}, 2\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. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{32400}, 2\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. lift-PI.f6434.6

        \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\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) \]
    8. Applied rewrites34.6%

      \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \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) \]

    if 3.00000000000000012e167 < angle

    1. Initial program 22.2%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 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)} \]
    4. 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) \]
    5. Applied rewrites26.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)} \]
    6. Applied rewrites26.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 1\right) \cdot 2 \]
    11. Recombined 4 regimes into one program.
    12. Add Preprocessing

    Alternative 2: 67.6% accurate, 1.7× speedup?

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

      1. Initial program 53.7%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 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)} \]
      4. 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) \]
      5. Applied rewrites56.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)} \]
      6. Applied rewrites64.6%

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \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 2 \]
        10. lift-*.f64N/A

          \[\leadsto \left(\left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \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 2 \]
        11. lift-PI.f64N/A

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

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

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

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

      if 2.00000000000000001e160 < a

      1. Initial program 43.2%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 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)} \]
      4. 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) \]
      5. Applied rewrites53.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)} \]
      6. Applied rewrites74.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(-\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) + \frac{\pi}{2}\right)\right) \cdot 2 \]
      8. Applied rewrites70.9%

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

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

    Alternative 3: 65.8% accurate, 1.8× speedup?

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

      1. Initial program 55.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. Add Preprocessing
      3. 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)} \]
      4. 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) \]
      5. Applied rewrites58.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)} \]
      6. Applied rewrites69.4%

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

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

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

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

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

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

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

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

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

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

      if 2.20000000000000005e189 < angle

      1. Initial program 17.5%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in 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) \]
      4. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 65.8% accurate, 1.8× speedup?

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

      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. Add Preprocessing
      3. 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)} \]
      4. 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) \]
      5. 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)} \]
      6. Applied rewrites65.6%

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

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

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

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

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

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

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

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

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

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

      if 2.34999999999999996e226 < b

      1. Initial program 37.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. Add Preprocessing
      3. 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)} \]
      4. 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.4

          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
      5. Applied rewrites75.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} \]
      6. Taylor expanded in a around 0

        \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
      7. 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. pow2N/A

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

          \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
      8. Applied rewrites81.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 5: 66.3% accurate, 1.8× speedup?

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

      1. Initial program 53.5%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 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)} \]
      4. 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) \]
      5. Applied rewrites56.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)} \]
      6. Applied rewrites64.5%

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.09999999999999996e160 < a

        1. Initial program 45.0%

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

          \[\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)} \]
        4. 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) \]
        5. Applied rewrites54.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)} \]
        6. Applied rewrites74.9%

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot 2 \]
        9. Taylor expanded in a around inf

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

            \[\leadsto \left(\left(\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot 2 \]
        11. Recombined 2 regimes into one program.
        12. Add Preprocessing

        Alternative 6: 56.9% accurate, 1.9× speedup?

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

          1. Initial program 52.5%

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

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. 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--.f6441.7

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites41.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} \]
          6. 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)} \]
          7. 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.f6441.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 52.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. Add Preprocessing
          3. 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)} \]
          4. 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.6

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites53.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} \]
          6. Taylor expanded in a around 0

            \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
          7. 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. pow2N/A

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

              \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
          8. Applied rewrites56.2%

            \[\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 7: 67.2% accurate, 3.0× speedup?

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

          1. Initial program 60.0%

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

            \[\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)} \]
          4. 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) \]
          5. Applied rewrites62.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)} \]
          6. Applied rewrites75.9%

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

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

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

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

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

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

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

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

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

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

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

          if 8.5999999999999998e-75 < angle < 8.5000000000000004e169

          1. Initial program 38.7%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 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)} \]
          4. 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) \]
          5. Applied rewrites46.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)} \]
          6. Applied rewrites46.6%

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

          if 8.5000000000000004e169 < angle

          1. Initial program 22.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. Add Preprocessing
          3. 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)} \]
          4. 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) \]
          5. Applied rewrites27.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)} \]
          6. Applied rewrites27.8%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 1\right) \cdot 2 \]
          11. Recombined 3 regimes into one program.
          12. Add Preprocessing

          Alternative 8: 67.6% accurate, 3.0× speedup?

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

            1. Initial program 57.2%

              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in angle around 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)} \]
            4. 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) \]
            5. Applied rewrites59.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)} \]
            6. Applied rewrites71.3%

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

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

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

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

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

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

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

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

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

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

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

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

              if 1.99999999999999988e-11 < angle < 8.5000000000000004e169

              1. Initial program 28.5%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 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)} \]
              4. 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) \]
              5. Applied rewrites37.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)} \]
              6. Applied rewrites37.7%

                \[\leadsto \color{blue}{\sin \left(\left(2 \cdot \left(angle \cdot \pi\right)\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)} \]
            11. Recombined 2 regimes into one program.
            12. Final simplification63.5%

              \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 2 \cdot 10^{-11} \lor \neg \left(angle \leq 8.5 \cdot 10^{+169}\right):\\ \;\;\;\;\left(\left(\left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 1\right) \cdot 2\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\left(2 \cdot \left(angle \cdot \pi\right)\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\ \end{array} \]
            13. Add Preprocessing

            Alternative 9: 67.3% accurate, 3.3× speedup?

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

              1. Initial program 60.0%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 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)} \]
              4. 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.0

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites55.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} \]
              6. 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--.f6466.3

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

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

              if 8.5999999999999998e-75 < angle

              1. Initial program 33.5%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 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)} \]
              4. 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) \]
              5. Applied rewrites40.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)} \]
              6. Applied rewrites40.4%

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

            Alternative 10: 65.9% accurate, 3.3× speedup?

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

              1. Initial program 60.0%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 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)} \]
              4. 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.0

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
              5. Applied rewrites55.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} \]
              6. 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--.f6466.3

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

                \[\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.5999999999999996e-80 < angle

              1. Initial program 33.5%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in angle around 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)} \]
              4. 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) \]
              5. Applied rewrites40.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)} \]
              6. 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 \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
                2. 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) \]
                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(\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) \]
                4. *-commutativeN/A

                  \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
                5. *-commutativeN/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(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
                6. associate-*r*N/A

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

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

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

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

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

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

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

              Alternative 11: 63.0% accurate, 13.7× speedup?

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

                1. Initial program 61.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. Add Preprocessing
                3. 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)} \]
                4. 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--.f6457.3

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                5. Applied rewrites57.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} \]
                6. 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--.f6468.0

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

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

                if 1350 < angle

                1. Initial program 24.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. Add Preprocessing
                3. 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)} \]
                4. 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--.f6421.1

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                5. Applied rewrites21.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} \]
                6. Taylor expanded in a around 0

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

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

                Alternative 12: 39.3% accurate, 16.8× speedup?

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

                  1. Initial program 53.3%

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

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  4. 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--.f6450.4

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  5. Applied rewrites50.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} \]
                  6. 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)} \]
                  7. 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.f6429.2

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

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

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

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

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

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
                    5. lower-*.f6429.2

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right) \]
                  12. Applied rewrites29.2%

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

                  if 2.00000000000000003e141 < a

                  1. Initial program 46.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. Add Preprocessing
                  3. 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)} \]
                  4. 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--.f6434.8

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

                    \[\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} \]
                  6. 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)} \]
                  7. 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.f6437.9

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

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

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

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

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

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
                    5. lower-*.f6437.9

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                    12. lift-PI.f6457.3

                      \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
                  12. Applied rewrites57.3%

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

                Alternative 13: 39.1% accurate, 16.8× speedup?

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

                  1. Initial program 60.0%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in angle around 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)} \]
                  4. 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.0

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  5. Applied rewrites55.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} \]
                  6. 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)} \]
                  7. 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.f6435.1

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

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

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

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

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

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
                    5. lower-*.f6435.1

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                    12. lift-PI.f6441.5

                      \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
                  12. Applied rewrites41.5%

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

                  if 1.5e-72 < angle

                  1. Initial program 33.5%

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

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  4. 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--.f6431.7

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  5. Applied rewrites31.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} \]
                  6. 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)} \]
                  7. 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.f6418.4

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

                    \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
                  9. 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. lower-*.f64N/A

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

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

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

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

                Alternative 14: 39.2% accurate, 16.8× speedup?

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

                  1. Initial program 60.0%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in angle around 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)} \]
                  4. 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.0

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  5. Applied rewrites55.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} \]
                  6. 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)} \]
                  7. 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.f6435.1

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

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

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

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

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

                      \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
                    5. lower-*.f6435.1

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                    12. lift-PI.f6441.5

                      \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
                  12. Applied rewrites41.5%

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

                  if 1.55999999999999993e-72 < angle

                  1. Initial program 33.5%

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

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  4. 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--.f6431.7

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  5. Applied rewrites31.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} \]
                  6. 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)} \]
                  7. 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.f6418.4

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

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

                Alternative 15: 37.9% accurate, 21.6× speedup?

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

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

                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                4. 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--.f6448.4

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                5. Applied rewrites48.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} \]
                6. 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)} \]
                7. 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.f6430.3

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

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

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

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

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

                    \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
                  5. lower-*.f6430.3

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
                  12. lift-PI.f6433.5

                    \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
                12. Applied rewrites33.5%

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

                Reproduce

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