ab-angle->ABCF B

Percentage Accurate: 53.9% → 66.2%
Time: 6.5s
Alternatives: 17
Speedup: 5.5×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 53.9% accurate, 1.0× speedup?

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

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

Alternative 1: 66.2% accurate, 1.2× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\sin \left(\left(\pi \cdot angle\_m\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}\;b\_m \leq 5.8 \cdot 10^{-160}:\\ \;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(-\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right) + \frac{\pi}{2}\right)\right) \cdot t\_0\\ \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 (* (* PI angle_m) 0.005555555555555556)) (+ a_m b_m))
          (- b_m a_m))))
   (*
    angle_s
    (if (<= b_m 5.8e-160)
      (*
       (* 2.0 (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0))))
       t_0)
      (*
       (* 2.0 (sin (+ (- (* (* angle_m PI) 0.005555555555555556)) (/ PI 2.0))))
       t_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(((((double) M_PI) * angle_m) * 0.005555555555555556)) * (a_m + b_m)) * (b_m - a_m);
	double tmp;
	if (b_m <= 5.8e-160) {
		tmp = (2.0 * sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0)))) * t_0;
	} else {
		tmp = (2.0 * sin((-((angle_m * ((double) M_PI)) * 0.005555555555555556) + (((double) M_PI) / 2.0)))) * t_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(pi * angle_m) * 0.005555555555555556)) * Float64(a_m + b_m)) * Float64(b_m - a_m))
	tmp = 0.0
	if (b_m <= 5.8e-160)
		tmp = Float64(Float64(2.0 * sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0)))) * t_0);
	else
		tmp = Float64(Float64(2.0 * sin(Float64(Float64(-Float64(Float64(angle_m * pi) * 0.005555555555555556)) + Float64(pi / 2.0)))) * t_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[(Pi * angle$95$m), $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[b$95$m, 5.8e-160], N[(N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(2.0 * N[Sin[N[((-N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$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(\pi \cdot angle\_m\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}\;b\_m \leq 5.8 \cdot 10^{-160}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\right) \cdot t\_0\\

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \sin \left(\left(-\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right) + \frac{\pi}{2}\right)\right) \cdot t\_0\\


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

    1. Initial program 66.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

        \[\leadsto \color{blue}{\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) \]
      3. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\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) \]
      4. lift--.f64N/A

        \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
      5. lift-pow.f64N/A

        \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
      6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      3. Step-by-step derivation
        1. difference-of-squares-revN/A

          \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
        2. pow2N/A

          \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
        3. pow2N/A

          \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
        4. pow-to-expN/A

          \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
        5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
        6. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
      4. Applied rewrites72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.7999999999999998e-160 < b

      1. Initial program 49.9%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{\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. lift-*.f64N/A

          \[\leadsto \color{blue}{\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) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\color{blue}{\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) \]
        4. lift--.f64N/A

          \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
        5. lift-pow.f64N/A

          \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
        6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        3. Step-by-step derivation
          1. difference-of-squares-revN/A

            \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
          2. pow2N/A

            \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
          3. pow2N/A

            \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
          4. pow-to-expN/A

            \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
          5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
          6. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
        4. Applied rewrites64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 2: 65.5% accurate, 1.2× speedup?

      \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 1.12 \cdot 10^{+250}:\\ \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(\left(a\_m \cdot a\_m\right) \cdot \left(angle\_m \cdot \pi\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle\_m}{180}\right)\\ \end{array} \end{array} \end{array} \]
      a_m = (fabs.f64 a)
      b_m = (fabs.f64 b)
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a_m b_m angle_m)
       :precision binary64
       (let* ((t_0 (* (* PI angle_m) 0.005555555555555556)))
         (*
          angle_s
          (if (<= a_m 1.12e+250)
            (* (* 2.0 (cos t_0)) (* (* (sin t_0) (+ a_m b_m)) (- b_m a_m)))
            (*
             (* -0.011111111111111112 (* (* a_m a_m) (* angle_m PI)))
             (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 t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
      	double tmp;
      	if (a_m <= 1.12e+250) {
      		tmp = (2.0 * cos(t_0)) * ((sin(t_0) * (a_m + b_m)) * (b_m - a_m));
      	} else {
      		tmp = (-0.011111111111111112 * ((a_m * a_m) * (angle_m * ((double) M_PI)))) * 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 t_0 = (Math.PI * angle_m) * 0.005555555555555556;
      	double tmp;
      	if (a_m <= 1.12e+250) {
      		tmp = (2.0 * Math.cos(t_0)) * ((Math.sin(t_0) * (a_m + b_m)) * (b_m - a_m));
      	} else {
      		tmp = (-0.011111111111111112 * ((a_m * a_m) * (angle_m * Math.PI))) * 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):
      	t_0 = (math.pi * angle_m) * 0.005555555555555556
      	tmp = 0
      	if a_m <= 1.12e+250:
      		tmp = (2.0 * math.cos(t_0)) * ((math.sin(t_0) * (a_m + b_m)) * (b_m - a_m))
      	else:
      		tmp = (-0.011111111111111112 * ((a_m * a_m) * (angle_m * math.pi))) * 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)
      	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
      	tmp = 0.0
      	if (a_m <= 1.12e+250)
      		tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(sin(t_0) * Float64(a_m + b_m)) * Float64(b_m - a_m)));
      	else
      		tmp = Float64(Float64(-0.011111111111111112 * Float64(Float64(a_m * a_m) * Float64(angle_m * pi))) * 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)
      	t_0 = (pi * angle_m) * 0.005555555555555556;
      	tmp = 0.0;
      	if (a_m <= 1.12e+250)
      		tmp = (2.0 * cos(t_0)) * ((sin(t_0) * (a_m + b_m)) * (b_m - a_m));
      	else
      		tmp = (-0.011111111111111112 * ((a_m * a_m) * (angle_m * pi))) * 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_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a$95$m, 1.12e+250], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * N[(N[(a$95$m * a$95$m), $MachinePrecision] * N[(angle$95$m * Pi), $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)
      
      \\
      \begin{array}{l}
      t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;a\_m \leq 1.12 \cdot 10^{+250}:\\
      \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot \left(\left(a\_m \cdot a\_m\right) \cdot \left(angle\_m \cdot \pi\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle\_m}{180}\right)\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 1.12000000000000007e250

        1. Initial program 54.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{\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. lift-*.f64N/A

            \[\leadsto \color{blue}{\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) \]
          3. lift-*.f64N/A

            \[\leadsto \left(\color{blue}{\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) \]
          4. lift--.f64N/A

            \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
          5. lift-pow.f64N/A

            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
          6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
          3. Step-by-step derivation
            1. difference-of-squares-revN/A

              \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
            2. pow2N/A

              \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
            3. pow2N/A

              \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
            4. pow-to-expN/A

              \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
            5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
            6. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
          4. Applied rewrites65.5%

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

          if 1.12000000000000007e250 < a

          1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\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(\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            3. pow2N/A

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

              \[\leadsto \left(\frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \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(\frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            6. lift-PI.f6464.9

              \[\leadsto \left(-0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          7. Applied rewrites64.9%

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

        Alternative 3: 65.2% accurate, 1.2× speedup?

        \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 0.0056:\\ \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_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 (<= b_m 0.0056)
            (*
             (* (* (+ b_m a_m) (- b_m a_m)) 2.0)
             (* (sin (* PI (/ angle_m 180.0))) 1.0))
            (*
             (* 2.0 (cos (* (* PI angle_m) 0.005555555555555556)))
             (*
              (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a_m b_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 (b_m <= 0.0056) {
        		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (sin((((double) M_PI) * (angle_m / 180.0))) * 1.0);
        	} else {
        		tmp = (2.0 * cos(((((double) M_PI) * angle_m) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a_m + b_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 (b_m <= 0.0056) {
        		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (Math.sin((Math.PI * (angle_m / 180.0))) * 1.0);
        	} else {
        		tmp = (2.0 * Math.cos(((Math.PI * angle_m) * 0.005555555555555556))) * ((Math.sin(((0.005555555555555556 * angle_m) * Math.PI)) * (a_m + b_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 b_m <= 0.0056:
        		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (math.sin((math.pi * (angle_m / 180.0))) * 1.0)
        	else:
        		tmp = (2.0 * math.cos(((math.pi * angle_m) * 0.005555555555555556))) * ((math.sin(((0.005555555555555556 * angle_m) * math.pi)) * (a_m + b_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 (b_m <= 0.0056)
        		tmp = Float64(Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * 2.0) * Float64(sin(Float64(pi * Float64(angle_m / 180.0))) * 1.0));
        	else
        		tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle_m) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a_m + b_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 (b_m <= 0.0056)
        		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (sin((pi * (angle_m / 180.0))) * 1.0);
        	else
        		tmp = (2.0 * cos(((pi * angle_m) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle_m) * pi)) * (a_m + b_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[b$95$m, 0.0056], N[(N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$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}\;b\_m \leq 0.0056:\\
        \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot 1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if b < 0.00559999999999999994

          1. Initial program 60.3%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \color{blue}{\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. lift-*.f64N/A

              \[\leadsto \color{blue}{\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) \]
            3. lift-*.f64N/A

              \[\leadsto \left(\color{blue}{\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) \]
            4. lift--.f64N/A

              \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
            5. lift-pow.f64N/A

              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
            6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

            if 0.00559999999999999994 < b

            1. Initial program 47.2%

              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \color{blue}{\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. lift-*.f64N/A

                \[\leadsto \color{blue}{\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) \]
              3. lift-*.f64N/A

                \[\leadsto \left(\color{blue}{\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) \]
              4. lift--.f64N/A

                \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
              5. lift-pow.f64N/A

                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
              6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
              3. Step-by-step derivation
                1. difference-of-squares-revN/A

                  \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                2. pow2N/A

                  \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                3. pow2N/A

                  \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                4. pow-to-expN/A

                  \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
                6. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
              4. Applied rewrites67.1%

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

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

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

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

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

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

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

            Alternative 4: 65.2% accurate, 1.1× speedup?

            \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\sin \left(\left(\pi \cdot angle\_m\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}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq 5 \cdot 10^{+280}:\\ \;\;\;\;2 \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \pi \cdot \pi, 2\right) \cdot t\_0\\ \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 (* (* PI angle_m) 0.005555555555555556)) (+ a_m b_m))
                      (- b_m a_m))))
               (*
                angle_s
                (if (<= (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) 5e+280)
                  (* 2.0 t_0)
                  (*
                   (fma (* -3.08641975308642e-5 (* angle_m angle_m)) (* PI PI) 2.0)
                   t_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(((((double) M_PI) * angle_m) * 0.005555555555555556)) * (a_m + b_m)) * (b_m - a_m);
            	double tmp;
            	if ((2.0 * (pow(b_m, 2.0) - pow(a_m, 2.0))) <= 5e+280) {
            		tmp = 2.0 * t_0;
            	} else {
            		tmp = fma((-3.08641975308642e-5 * (angle_m * angle_m)), (((double) M_PI) * ((double) M_PI)), 2.0) * t_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(pi * angle_m) * 0.005555555555555556)) * Float64(a_m + b_m)) * Float64(b_m - a_m))
            	tmp = 0.0
            	if (Float64(2.0 * Float64((b_m ^ 2.0) - (a_m ^ 2.0))) <= 5e+280)
            		tmp = Float64(2.0 * t_0);
            	else
            		tmp = Float64(fma(Float64(-3.08641975308642e-5 * Float64(angle_m * angle_m)), Float64(pi * pi), 2.0) * t_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[(Pi * angle$95$m), $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[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+280], N[(2.0 * t$95$0), $MachinePrecision], N[(N[(N[(-3.08641975308642e-5 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 2.0), $MachinePrecision] * t$95$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(\pi \cdot angle\_m\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}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq 5 \cdot 10^{+280}:\\
            \;\;\;\;2 \cdot t\_0\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5} \cdot \left(angle\_m \cdot angle\_m\right), \pi \cdot \pi, 2\right) \cdot t\_0\\
            
            
            \end{array}
            \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)))) < 5.0000000000000002e280

              1. Initial program 58.3%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{\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. lift-*.f64N/A

                  \[\leadsto \color{blue}{\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) \]
                3. lift-*.f64N/A

                  \[\leadsto \left(\color{blue}{\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) \]
                4. lift--.f64N/A

                  \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                5. lift-pow.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                3. Step-by-step derivation
                  1. difference-of-squares-revN/A

                    \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                  2. pow2N/A

                    \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                  3. pow2N/A

                    \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                  4. pow-to-expN/A

                    \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                  5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
                  6. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
                4. Applied rewrites64.4%

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

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

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

                  if 5.0000000000000002e280 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                  1. Initial program 41.0%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{\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. lift-*.f64N/A

                      \[\leadsto \color{blue}{\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) \]
                    3. lift-*.f64N/A

                      \[\leadsto \left(\color{blue}{\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) \]
                    4. lift--.f64N/A

                      \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                    5. lift-pow.f64N/A

                      \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                    6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. difference-of-squares-revN/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      2. pow2N/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      3. pow2N/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      4. pow-to-expN/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
                      6. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
                    4. Applied rewrites73.0%

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{32400} \cdot {angle}^{2}, \pi \cdot \pi, 2\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
                      9. pow2N/A

                        \[\leadsto \mathsf{fma}\left(\frac{-1}{32400} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 2\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
                      10. lift-*.f6472.8

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

                      \[\leadsto \mathsf{fma}\left(-3.08641975308642 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 2\right) \cdot \left(\color{blue}{\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
                  6. Recombined 2 regimes into one program.
                  7. Add Preprocessing

                  Alternative 5: 62.8% accurate, 2.3× speedup?

                  \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(2 \cdot \left(\left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\right) \end{array} \]
                  a_m = (fabs.f64 a)
                  b_m = (fabs.f64 b)
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a_m b_m angle_m)
                   :precision binary64
                   (*
                    angle_s
                    (*
                     2.0
                     (*
                      (* (sin (* (* PI angle_m) 0.005555555555555556)) (+ a_m b_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) {
                  	return angle_s * (2.0 * ((sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * (a_m + b_m)) * (b_m - 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 * (2.0 * ((Math.sin(((Math.PI * angle_m) * 0.005555555555555556)) * (a_m + b_m)) * (b_m - 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 * (2.0 * ((math.sin(((math.pi * angle_m) * 0.005555555555555556)) * (a_m + b_m)) * (b_m - 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(2.0 * Float64(Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(a_m + b_m)) * Float64(b_m - 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 * (2.0 * ((sin(((pi * angle_m) * 0.005555555555555556)) * (a_m + b_m)) * (b_m - 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[(2.0 * N[(N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$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 \left(2 \cdot \left(\left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 53.9%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{\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. lift-*.f64N/A

                      \[\leadsto \color{blue}{\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) \]
                    3. lift-*.f64N/A

                      \[\leadsto \left(\color{blue}{\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) \]
                    4. lift--.f64N/A

                      \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                    5. lift-pow.f64N/A

                      \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                    6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. difference-of-squares-revN/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      2. pow2N/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      3. pow2N/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      4. pow-to-expN/A

                        \[\leadsto 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \]
                      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
                      6. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
                    4. Applied rewrites66.6%

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

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

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

                      Alternative 6: 61.0% accurate, 2.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.5 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\_m\right) \cdot 1\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.5e+51)
                          (*
                           (fma
                            (* angle_m (fma PI b_m (* (* 0.0 a_m) PI)))
                            b_m
                            (- (* a_m (* (* PI angle_m) a_m))))
                           0.011111111111111112)
                          (*
                           (* (* (+ b_m a_m) (- b_m a_m)) 2.0)
                           (*
                            (*
                             (fma
                              0.005555555555555556
                              PI
                              (* (* -2.8577960676726107e-8 (* angle_m angle_m)) (* (* PI PI) PI)))
                             angle_m)
                            1.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.5e+51) {
                      		tmp = fma((angle_m * fma(((double) M_PI), b_m, ((0.0 * a_m) * ((double) M_PI)))), b_m, -(a_m * ((((double) M_PI) * angle_m) * a_m))) * 0.011111111111111112;
                      	} else {
                      		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * ((fma(0.005555555555555556, ((double) M_PI), ((-2.8577960676726107e-8 * (angle_m * angle_m)) * ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)))) * angle_m) * 1.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.5e+51)
                      		tmp = Float64(fma(Float64(angle_m * fma(pi, b_m, Float64(Float64(0.0 * a_m) * pi))), b_m, Float64(-Float64(a_m * Float64(Float64(pi * angle_m) * a_m)))) * 0.011111111111111112);
                      	else
                      		tmp = Float64(Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * 2.0) * Float64(Float64(fma(0.005555555555555556, pi, Float64(Float64(-2.8577960676726107e-8 * Float64(angle_m * angle_m)) * Float64(Float64(pi * pi) * pi))) * angle_m) * 1.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.5e+51], N[(N[(N[(angle$95$m * N[(Pi * b$95$m + N[(N[(0.0 * a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m + (-N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(N[(0.005555555555555556 * Pi + N[(N[(-2.8577960676726107e-8 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                      
                      \begin{array}{l}
                      a_m = \left|a\right|
                      \\
                      b_m = \left|b\right|
                      \\
                      angle\_m = \left|angle\right|
                      \\
                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                      
                      \\
                      angle\_s \cdot \begin{array}{l}
                      \mathbf{if}\;angle\_m \leq 8.5 \cdot 10^{+51}:\\
                      \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot 0.011111111111111112\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\_m\right) \cdot 1\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if angle < 8.4999999999999999e51

                        1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b + -1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                          9. fp-cancel-sign-sub-invN/A

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

                            \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - \left(\mathsf{neg}\left(-1\right)\right) \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                          11. metadata-evalN/A

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

                            \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - 1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                        7. Applied rewrites78.9%

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
                        10. Applied rewrites87.4%

                          \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, -a \cdot \left(\left(\pi \cdot angle\right) \cdot a\right)\right) \cdot 0.011111111111111112 \]

                        if 8.4999999999999999e51 < angle

                        1. Initial program 29.4%

                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                        2. Step-by-step derivation
                          1. lift-*.f64N/A

                            \[\leadsto \color{blue}{\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. lift-*.f64N/A

                            \[\leadsto \color{blue}{\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) \]
                          3. lift-*.f64N/A

                            \[\leadsto \left(\color{blue}{\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) \]
                          4. lift--.f64N/A

                            \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                          5. lift-pow.f64N/A

                            \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                          6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\right)} \cdot 1\right) \]
                        6. Recombined 2 regimes into one program.
                        7. Add Preprocessing

                        Alternative 7: 61.0% accurate, 2.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}\;angle\_m \leq 8.5 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_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 (<= angle_m 8.5e+51)
                            (*
                             (fma
                              (* angle_m (fma PI b_m (* (* 0.0 a_m) PI)))
                              b_m
                              (- (* a_m (* (* PI angle_m) a_m))))
                             0.011111111111111112)
                            (*
                             (* (* (+ b_m a_m) (- b_m a_m)) 2.0)
                             (*
                              (fma
                               0.005555555555555556
                               PI
                               (* (* (* (* PI PI) PI) -1.1431184270690443e-7) (* angle_m angle_m)))
                              angle_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.5e+51) {
                        		tmp = fma((angle_m * fma(((double) M_PI), b_m, ((0.0 * a_m) * ((double) M_PI)))), b_m, -(a_m * ((((double) M_PI) * angle_m) * a_m))) * 0.011111111111111112;
                        	} else {
                        		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (fma(0.005555555555555556, ((double) M_PI), ((((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * -1.1431184270690443e-7) * (angle_m * angle_m))) * angle_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.5e+51)
                        		tmp = Float64(fma(Float64(angle_m * fma(pi, b_m, Float64(Float64(0.0 * a_m) * pi))), b_m, Float64(-Float64(a_m * Float64(Float64(pi * angle_m) * a_m)))) * 0.011111111111111112);
                        	else
                        		tmp = Float64(Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * 2.0) * Float64(fma(0.005555555555555556, pi, Float64(Float64(Float64(Float64(pi * pi) * pi) * -1.1431184270690443e-7) * Float64(angle_m * angle_m))) * angle_m));
                        	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.5e+51], N[(N[(N[(angle$95$m * N[(Pi * b$95$m + N[(N[(0.0 * a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m + (-N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(0.005555555555555556 * Pi + N[(N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision] * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$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}\;angle\_m \leq 8.5 \cdot 10^{+51}:\\
                        \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot 0.011111111111111112\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right) \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot angle\_m\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if angle < 8.4999999999999999e51

                          1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b + -1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                            9. fp-cancel-sign-sub-invN/A

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

                              \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - \left(\mathsf{neg}\left(-1\right)\right) \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                            11. metadata-evalN/A

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

                              \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - 1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                          7. Applied rewrites78.9%

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
                          10. Applied rewrites87.4%

                            \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, -a \cdot \left(\left(\pi \cdot angle\right) \cdot a\right)\right) \cdot 0.011111111111111112 \]

                          if 8.4999999999999999e51 < angle

                          1. Initial program 29.4%

                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                          2. Step-by-step derivation
                            1. lift-*.f64N/A

                              \[\leadsto \color{blue}{\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. lift-*.f64N/A

                              \[\leadsto \color{blue}{\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) \]
                            3. lift-*.f64N/A

                              \[\leadsto \left(\color{blue}{\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) \]
                            4. lift--.f64N/A

                              \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                            5. lift-pow.f64N/A

                              \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                            6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\left(\frac{1}{180} \cdot \mathsf{PI}\left(\right) + {angle}^{2} \cdot \left(\frac{-1}{11664000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{-1}{34992000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) \cdot \color{blue}{angle}\right) \]
                            4. Applied rewrites24.1%

                              \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \color{blue}{\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle\right)} \]
                          6. Recombined 2 regimes into one program.
                          7. Add Preprocessing

                          Alternative 8: 60.9% accurate, 2.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 4.3 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;angle\_m \leq 4.8 \cdot 10^{+226}:\\ \;\;\;\;\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\_m\right) \cdot 1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b\_m \cdot \left(b\_m - a\_m\right)\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 4.3e+51)
                              (*
                               (fma
                                (* angle_m (fma PI b_m (* (* 0.0 a_m) PI)))
                                b_m
                                (- (* a_m (* (* PI angle_m) a_m))))
                               0.011111111111111112)
                              (if (<= angle_m 4.8e+226)
                                (*
                                 (* (* b_m b_m) 2.0)
                                 (*
                                  (*
                                   (fma
                                    0.005555555555555556
                                    PI
                                    (* (* -2.8577960676726107e-8 (* angle_m angle_m)) (* (* PI PI) PI)))
                                   angle_m)
                                  1.0))
                                (* (* (* PI angle_m) (* b_m (- b_m a_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 <= 4.3e+51) {
                          		tmp = fma((angle_m * fma(((double) M_PI), b_m, ((0.0 * a_m) * ((double) M_PI)))), b_m, -(a_m * ((((double) M_PI) * angle_m) * a_m))) * 0.011111111111111112;
                          	} else if (angle_m <= 4.8e+226) {
                          		tmp = ((b_m * b_m) * 2.0) * ((fma(0.005555555555555556, ((double) M_PI), ((-2.8577960676726107e-8 * (angle_m * angle_m)) * ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)))) * angle_m) * 1.0);
                          	} else {
                          		tmp = ((((double) M_PI) * angle_m) * (b_m * (b_m - a_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 <= 4.3e+51)
                          		tmp = Float64(fma(Float64(angle_m * fma(pi, b_m, Float64(Float64(0.0 * a_m) * pi))), b_m, Float64(-Float64(a_m * Float64(Float64(pi * angle_m) * a_m)))) * 0.011111111111111112);
                          	elseif (angle_m <= 4.8e+226)
                          		tmp = Float64(Float64(Float64(b_m * b_m) * 2.0) * Float64(Float64(fma(0.005555555555555556, pi, Float64(Float64(-2.8577960676726107e-8 * Float64(angle_m * angle_m)) * Float64(Float64(pi * pi) * pi))) * angle_m) * 1.0));
                          	else
                          		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b_m * Float64(b_m - a_m))) * 0.011111111111111112);
                          	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, 4.3e+51], N[(N[(N[(angle$95$m * N[(Pi * b$95$m + N[(N[(0.0 * a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m + (-N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle$95$m, 4.8e+226], N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[(N[(0.005555555555555556 * Pi + N[(N[(-2.8577960676726107e-8 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b$95$m * N[(b$95$m - a$95$m), $MachinePrecision]), $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 4.3 \cdot 10^{+51}:\\
                          \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot 0.011111111111111112\\
                          
                          \mathbf{elif}\;angle\_m \leq 4.8 \cdot 10^{+226}:\\
                          \;\;\;\;\left(\left(b\_m \cdot b\_m\right) \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\_m\right) \cdot 1\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b\_m \cdot \left(b\_m - a\_m\right)\right)\right) \cdot 0.011111111111111112\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 3 regimes
                          2. if angle < 4.2999999999999997e51

                            1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b + -1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                              9. fp-cancel-sign-sub-invN/A

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

                                \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - \left(\mathsf{neg}\left(-1\right)\right) \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                              11. metadata-evalN/A

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

                                \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - 1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                            7. Applied rewrites78.9%

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
                            10. Applied rewrites87.5%

                              \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, -a \cdot \left(\left(\pi \cdot angle\right) \cdot a\right)\right) \cdot 0.011111111111111112 \]

                            if 4.2999999999999997e51 < angle < 4.8e226

                            1. Initial program 30.2%

                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                            2. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto \color{blue}{\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. lift-*.f64N/A

                                \[\leadsto \color{blue}{\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) \]
                              3. lift-*.f64N/A

                                \[\leadsto \left(\color{blue}{\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) \]
                              4. lift--.f64N/A

                                \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                              5. lift-pow.f64N/A

                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                              6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\left(\left(\frac{-1}{34992000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{angle}\right) \cdot 1\right) \]
                              4. Applied rewrites24.8%

                                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\right)} \cdot 1\right) \]
                              5. Taylor expanded in a around 0

                                \[\leadsto \left(\color{blue}{{b}^{2}} \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(\frac{1}{180}, \pi, \left(\frac{-1}{34992000} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\right) \cdot 1\right) \]
                              6. Step-by-step derivation
                                1. pow2N/A

                                  \[\leadsto \left(\left(b \cdot \color{blue}{b}\right) \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(\frac{1}{180}, \pi, \left(\frac{-1}{34992000} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\right) \cdot 1\right) \]
                                2. lift-*.f6420.3

                                  \[\leadsto \left(\left(b \cdot \color{blue}{b}\right) \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\right) \cdot 1\right) \]
                              7. Applied rewrites20.3%

                                \[\leadsto \left(\color{blue}{\left(b \cdot b\right)} \cdot 2\right) \cdot \left(\left(\mathsf{fma}\left(0.005555555555555556, \pi, \left(-2.8577960676726107 \cdot 10^{-8} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\left(\pi \cdot \pi\right) \cdot \pi\right)\right) \cdot angle\right) \cdot 1\right) \]

                              if 4.8e226 < angle

                              1. Initial program 27.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 9: 59.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 4.3 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 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 \left(-1 \cdot a\_m\right)\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 4.3e+51)
                                  (*
                                   (fma
                                    (* angle_m (fma PI b_m (* (* 0.0 a_m) PI)))
                                    b_m
                                    (- (* a_m (* (* PI angle_m) a_m))))
                                   0.011111111111111112)
                                  (* (* (* PI angle_m) (* (+ b_m a_m) (* -1.0 a_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 <= 4.3e+51) {
                              		tmp = fma((angle_m * fma(((double) M_PI), b_m, ((0.0 * a_m) * ((double) M_PI)))), b_m, -(a_m * ((((double) M_PI) * angle_m) * a_m))) * 0.011111111111111112;
                              	} else {
                              		tmp = ((((double) M_PI) * angle_m) * ((b_m + a_m) * (-1.0 * a_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 <= 4.3e+51)
                              		tmp = Float64(fma(Float64(angle_m * fma(pi, b_m, Float64(Float64(0.0 * a_m) * pi))), b_m, Float64(-Float64(a_m * Float64(Float64(pi * angle_m) * a_m)))) * 0.011111111111111112);
                              	else
                              		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b_m + a_m) * Float64(-1.0 * a_m))) * 0.011111111111111112);
                              	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, 4.3e+51], N[(N[(N[(angle$95$m * N[(Pi * b$95$m + N[(N[(0.0 * a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b$95$m + (-N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$95$m), $MachinePrecision]), $MachinePrecision])), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(-1.0 * a$95$m), $MachinePrecision]), $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 4.3 \cdot 10^{+51}:\\
                              \;\;\;\;\mathsf{fma}\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, \left(0 \cdot a\_m\right) \cdot \pi\right), b\_m, -a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot 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 \left(-1 \cdot a\_m\right)\right)\right) \cdot 0.011111111111111112\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if angle < 4.2999999999999997e51

                                1. Initial program 71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b + -1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                                  9. fp-cancel-sign-sub-invN/A

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

                                    \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - \left(\mathsf{neg}\left(-1\right)\right) \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                                  11. metadata-evalN/A

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

                                    \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-1, a \cdot \left(angle \cdot \pi\right), angle \cdot \left(\pi \cdot \left(b - 1 \cdot b\right)\right)\right), angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                                7. Applied rewrites78.9%

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

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

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

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

                                    \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
                                10. Applied rewrites87.5%

                                  \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, -a \cdot \left(\left(\pi \cdot angle\right) \cdot a\right)\right) \cdot 0.011111111111111112 \]

                                if 4.2999999999999997e51 < angle

                                1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot \frac{1}{90} \]
                                6. Step-by-step derivation
                                  1. lower-*.f6424.0

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

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

                              Alternative 10: 57.7% 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}\;{a\_m}^{2} \leq 10^{+298}:\\ \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_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 (<= (pow a_m 2.0) 1e+298)
                                  (*
                                   (* (* (+ b_m a_m) (- b_m a_m)) 2.0)
                                   (* 0.005555555555555556 (* angle_m PI)))
                                  (* (* a_m (* (* PI angle_m) a_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 (pow(a_m, 2.0) <= 1e+298) {
                              		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (0.005555555555555556 * (angle_m * ((double) M_PI)));
                              	} else {
                              		tmp = (a_m * ((((double) M_PI) * angle_m) * a_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 (Math.pow(a_m, 2.0) <= 1e+298) {
                              		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (0.005555555555555556 * (angle_m * Math.PI));
                              	} else {
                              		tmp = (a_m * ((Math.PI * angle_m) * a_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 math.pow(a_m, 2.0) <= 1e+298:
                              		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (0.005555555555555556 * (angle_m * math.pi))
                              	else:
                              		tmp = (a_m * ((math.pi * angle_m) * a_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 ((a_m ^ 2.0) <= 1e+298)
                              		tmp = Float64(Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * 2.0) * Float64(0.005555555555555556 * Float64(angle_m * pi)));
                              	else
                              		tmp = Float64(Float64(a_m * Float64(Float64(pi * angle_m) * a_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 ((a_m ^ 2.0) <= 1e+298)
                              		tmp = (((b_m + a_m) * (b_m - a_m)) * 2.0) * (0.005555555555555556 * (angle_m * pi));
                              	else
                              		tmp = (a_m * ((pi * angle_m) * a_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[Power[a$95$m, 2.0], $MachinePrecision], 1e+298], N[(N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$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}\;{a\_m}^{2} \leq 10^{+298}:\\
                              \;\;\;\;\left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot 2\right) \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if (pow.f64 a #s(literal 2 binary64)) < 9.9999999999999996e297

                                1. Initial program 58.4%

                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                2. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \color{blue}{\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. lift-*.f64N/A

                                    \[\leadsto \color{blue}{\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) \]
                                  3. lift-*.f64N/A

                                    \[\leadsto \left(\color{blue}{\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) \]
                                  4. lift--.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                                  5. lift-pow.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                                  6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                5. Step-by-step derivation
                                  1. lower-*.f64N/A

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

                                    \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\frac{1}{180} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                                  3. lift-PI.f6454.5

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

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

                                if 9.9999999999999996e297 < (pow.f64 a #s(literal 2 binary64))

                                1. Initial program 41.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{-0.011111111111111112} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                  2. pow-to-exp47.6

                                    \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                  3. *-commutative47.6

                                    \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                  4. lift-*.f64N/A

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

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

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

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

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

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

                                    \[\leadsto \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{-1}{90} \]
                                9. Applied rewrites66.5%

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

                              Alternative 11: 57.7% accurate, 5.5× speedup?

                              \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 1.55 \cdot 10^{+150}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\pi \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_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 (<= a_m 1.55e+150)
                                  (* (* 0.011111111111111112 angle_m) (* (* PI (+ a_m b_m)) (- b_m a_m)))
                                  (* (* a_m (* (* PI angle_m) a_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 (a_m <= 1.55e+150) {
                              		tmp = (0.011111111111111112 * angle_m) * ((((double) M_PI) * (a_m + b_m)) * (b_m - a_m));
                              	} else {
                              		tmp = (a_m * ((((double) M_PI) * angle_m) * a_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 (a_m <= 1.55e+150) {
                              		tmp = (0.011111111111111112 * angle_m) * ((Math.PI * (a_m + b_m)) * (b_m - a_m));
                              	} else {
                              		tmp = (a_m * ((Math.PI * angle_m) * a_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 a_m <= 1.55e+150:
                              		tmp = (0.011111111111111112 * angle_m) * ((math.pi * (a_m + b_m)) * (b_m - a_m))
                              	else:
                              		tmp = (a_m * ((math.pi * angle_m) * a_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 (a_m <= 1.55e+150)
                              		tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(Float64(pi * Float64(a_m + b_m)) * Float64(b_m - a_m)));
                              	else
                              		tmp = Float64(Float64(a_m * Float64(Float64(pi * angle_m) * a_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 (a_m <= 1.55e+150)
                              		tmp = (0.011111111111111112 * angle_m) * ((pi * (a_m + b_m)) * (b_m - a_m));
                              	else
                              		tmp = (a_m * ((pi * angle_m) * a_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[a$95$m, 1.55e+150], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(N[(Pi * N[(a$95$m + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$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}\;a\_m \leq 1.55 \cdot 10^{+150}:\\
                              \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\pi \cdot \left(a\_m + b\_m\right)\right) \cdot \left(b\_m - a\_m\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if a < 1.55000000000000007e150

                                1. Initial program 58.4%

                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                2. Step-by-step derivation
                                  1. lift-*.f64N/A

                                    \[\leadsto \color{blue}{\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. lift-*.f64N/A

                                    \[\leadsto \color{blue}{\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) \]
                                  3. lift-*.f64N/A

                                    \[\leadsto \left(\color{blue}{\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) \]
                                  4. lift--.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \color{blue}{\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) \]
                                  5. lift-pow.f64N/A

                                    \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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) \]
                                  6. lift-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                                  3. Step-by-step derivation
                                    1. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 1.55000000000000007e150 < a

                                  1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{-0.011111111111111112} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    2. pow-to-exp47.8

                                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    3. *-commutative47.8

                                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    4. lift-*.f64N/A

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

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

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

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

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

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

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

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

                                Alternative 12: 57.7% accurate, 5.5× speedup?

                                \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 1.55 \cdot 10^{+150}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_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 (<= a_m 1.55e+150)
                                    (* (* (* PI angle_m) (* (+ b_m a_m) (- b_m a_m))) 0.011111111111111112)
                                    (* (* a_m (* (* PI angle_m) a_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 (a_m <= 1.55e+150) {
                                		tmp = ((((double) M_PI) * angle_m) * ((b_m + a_m) * (b_m - a_m))) * 0.011111111111111112;
                                	} else {
                                		tmp = (a_m * ((((double) M_PI) * angle_m) * a_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 (a_m <= 1.55e+150) {
                                		tmp = ((Math.PI * angle_m) * ((b_m + a_m) * (b_m - a_m))) * 0.011111111111111112;
                                	} else {
                                		tmp = (a_m * ((Math.PI * angle_m) * a_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 a_m <= 1.55e+150:
                                		tmp = ((math.pi * angle_m) * ((b_m + a_m) * (b_m - a_m))) * 0.011111111111111112
                                	else:
                                		tmp = (a_m * ((math.pi * angle_m) * a_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 (a_m <= 1.55e+150)
                                		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b_m + a_m) * Float64(b_m - a_m))) * 0.011111111111111112);
                                	else
                                		tmp = Float64(Float64(a_m * Float64(Float64(pi * angle_m) * a_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 (a_m <= 1.55e+150)
                                		tmp = ((pi * angle_m) * ((b_m + a_m) * (b_m - a_m))) * 0.011111111111111112;
                                	else
                                		tmp = (a_m * ((pi * angle_m) * a_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[a$95$m, 1.55e+150], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$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}\;a\_m \leq 1.55 \cdot 10^{+150}:\\
                                \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot 0.011111111111111112\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if a < 1.55000000000000007e150

                                  1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if 1.55000000000000007e150 < a

                                  1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{-0.011111111111111112} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    2. pow-to-exp47.8

                                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    3. *-commutative47.8

                                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    4. lift-*.f64N/A

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

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

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

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

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

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

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

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

                                Alternative 13: 57.6% accurate, 5.5× speedup?

                                \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 1.55 \cdot 10^{+150}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right) \cdot angle\_m\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_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 (<= a_m 1.55e+150)
                                    (* (* 0.011111111111111112 (* PI (* (+ a_m b_m) (- b_m a_m)))) angle_m)
                                    (* (* a_m (* (* PI angle_m) a_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 (a_m <= 1.55e+150) {
                                		tmp = (0.011111111111111112 * (((double) M_PI) * ((a_m + b_m) * (b_m - a_m)))) * angle_m;
                                	} else {
                                		tmp = (a_m * ((((double) M_PI) * angle_m) * a_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 (a_m <= 1.55e+150) {
                                		tmp = (0.011111111111111112 * (Math.PI * ((a_m + b_m) * (b_m - a_m)))) * angle_m;
                                	} else {
                                		tmp = (a_m * ((Math.PI * angle_m) * a_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 a_m <= 1.55e+150:
                                		tmp = (0.011111111111111112 * (math.pi * ((a_m + b_m) * (b_m - a_m)))) * angle_m
                                	else:
                                		tmp = (a_m * ((math.pi * angle_m) * a_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 (a_m <= 1.55e+150)
                                		tmp = Float64(Float64(0.011111111111111112 * Float64(pi * Float64(Float64(a_m + b_m) * Float64(b_m - a_m)))) * angle_m);
                                	else
                                		tmp = Float64(Float64(a_m * Float64(Float64(pi * angle_m) * a_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 (a_m <= 1.55e+150)
                                		tmp = (0.011111111111111112 * (pi * ((a_m + b_m) * (b_m - a_m)))) * angle_m;
                                	else
                                		tmp = (a_m * ((pi * angle_m) * a_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[a$95$m, 1.55e+150], N[(N[(0.011111111111111112 * N[(Pi * N[(N[(a$95$m + b$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision], N[(N[(a$95$m * N[(N[(Pi * angle$95$m), $MachinePrecision] * a$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}\;a\_m \leq 1.55 \cdot 10^{+150}:\\
                                \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a\_m + b\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right)\right) \cdot angle\_m\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(a\_m \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\_m\right)\right) \cdot -0.011111111111111112\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if a < 1.55000000000000007e150

                                  1. Initial program 58.4%

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

                                    \[\leadsto \color{blue}{angle \cdot \left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) + {angle}^{2} \cdot \left(2 \cdot \left({angle}^{2} \cdot \left(\frac{1}{22674816000000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \left(\frac{1}{4534963200000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \frac{1}{2267481600000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right) + 2 \cdot \left(\frac{-1}{11664000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)} \]
                                  3. Applied rewrites39.6%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right), 0.011111111111111112, \left(2 \cdot \mathsf{fma}\left(\mathsf{fma}\left({\pi}^{5} \cdot 4.410179116778721 \cdot 10^{-14}, \left(b + a\right) \cdot \left(b - a\right), \left({\pi}^{5} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 6.615268675168081 \cdot 10^{-13}\right), angle \cdot angle, \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle} \]
                                  4. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

                                  if 1.55000000000000007e150 < a

                                  1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{-0.011111111111111112} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    2. pow-to-exp47.8

                                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    3. *-commutative47.8

                                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                                    4. lift-*.f64N/A

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

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

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

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

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

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

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

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

                                Alternative 14: 57.3% accurate, 2.2× speedup?

                                \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-256}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a\_m \cdot \left(a\_m \cdot angle\_m\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
                                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-256)
                                    (* -0.011111111111111112 (* (* a_m (* a_m angle_m)) PI))
                                    (* (* (* PI angle_m) (* b_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 ((2.0 * (pow(b_m, 2.0) - pow(a_m, 2.0))) <= -1e-256) {
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * ((double) M_PI));
                                	} else {
                                		tmp = ((((double) M_PI) * angle_m) * (b_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 ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0))) <= -1e-256) {
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * Math.PI);
                                	} else {
                                		tmp = ((Math.PI * angle_m) * (b_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 (2.0 * (math.pow(b_m, 2.0) - math.pow(a_m, 2.0))) <= -1e-256:
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * math.pi)
                                	else:
                                		tmp = ((math.pi * angle_m) * (b_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 (Float64(2.0 * Float64((b_m ^ 2.0) - (a_m ^ 2.0))) <= -1e-256)
                                		tmp = Float64(-0.011111111111111112 * Float64(Float64(a_m * Float64(a_m * angle_m)) * pi));
                                	else
                                		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b_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 ((2.0 * ((b_m ^ 2.0) - (a_m ^ 2.0))) <= -1e-256)
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * pi);
                                	else
                                		tmp = ((pi * angle_m) * (b_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[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-256], N[(-0.011111111111111112 * N[(N[(a$95$m * N[(a$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
                                
                                \begin{array}{l}
                                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^{-256}:\\
                                \;\;\;\;-0.011111111111111112 \cdot \left(\left(a\_m \cdot \left(a\_m \cdot angle\_m\right)\right) \cdot \pi\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b\_m \cdot b\_m\right)\right) \cdot 0.011111111111111112\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -9.99999999999999977e-257

                                  1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 15: 57.3% accurate, 2.2× speedup?

                                \[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-256}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a\_m \cdot \left(a\_m \cdot angle\_m\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle\_m \cdot \left(\left(b\_m \cdot b\_m\right) \cdot \pi\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 (<= (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) -1e-256)
                                    (* -0.011111111111111112 (* (* a_m (* a_m angle_m)) PI))
                                    (* (* angle_m (* (* b_m b_m) PI)) 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-256) {
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * ((double) M_PI));
                                	} else {
                                		tmp = (angle_m * ((b_m * b_m) * ((double) M_PI))) * 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-256) {
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * Math.PI);
                                	} else {
                                		tmp = (angle_m * ((b_m * b_m) * Math.PI)) * 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-256:
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * math.pi)
                                	else:
                                		tmp = (angle_m * ((b_m * b_m) * math.pi)) * 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-256)
                                		tmp = Float64(-0.011111111111111112 * Float64(Float64(a_m * Float64(a_m * angle_m)) * pi));
                                	else
                                		tmp = Float64(Float64(angle_m * Float64(Float64(b_m * b_m) * pi)) * 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-256)
                                		tmp = -0.011111111111111112 * ((a_m * (a_m * angle_m)) * pi);
                                	else
                                		tmp = (angle_m * ((b_m * b_m) * pi)) * 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-256], N[(-0.011111111111111112 * N[(N[(a$95$m * N[(a$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(angle$95$m * N[(N[(b$95$m * b$95$m), $MachinePrecision] * Pi), $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}\;2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-256}:\\
                                \;\;\;\;-0.011111111111111112 \cdot \left(\left(a\_m \cdot \left(a\_m \cdot angle\_m\right)\right) \cdot \pi\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(angle\_m \cdot \left(\left(b\_m \cdot b\_m\right) \cdot \pi\right)\right) \cdot 0.011111111111111112\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -9.99999999999999977e-257

                                  1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(angle \cdot \left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                                    5. lift-PI.f6455.4

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

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

                                Alternative 16: 38.3% accurate, 9.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 17: 34.7% accurate, 9.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Reproduce

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