ab-angle->ABCF B

Percentage Accurate: 53.1% → 67.3%
Time: 7.5s
Alternatives: 9
Speedup: N/A×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 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.1% 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: 67.3% accurate, N/A× speedup?

\[\begin{array}{l} 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\\ t_1 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right)\\ t_2 := \sin t\_0\\ t_3 := \left(t\_2 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.32 \cdot 10^{+259}:\\ \;\;\;\;\mathsf{fma}\left(t\_3, \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right), t\_3 \cdot \cos \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_2 \cdot b, t\_1, \left(\left(0 \cdot a\right) \cdot t\_1\right) \cdot t\_2\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(t\_1 \cdot t\_2\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* (* PI angle_m) 0.005555555555555556))
        (t_1 (sin (fma 0.5 PI t_0)))
        (t_2 (sin t_0))
        (t_3 (* (* t_2 (+ a b)) (- b a))))
   (*
    angle_s
    (if (<= angle_m 1.32e+259)
      (fma
       t_3
       (cos (* 0.005555555555555556 (* angle_m PI)))
       (* t_3 (cos (* (* angle_m PI) 0.005555555555555556))))
      (fma
       (* 2.0 (fma (* t_2 b) t_1 (* (* (* 0.0 a) t_1) t_2)))
       b
       (* (* -2.0 (* a a)) (* t_1 t_2)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
	double t_1 = sin(fma(0.5, ((double) M_PI), t_0));
	double t_2 = sin(t_0);
	double t_3 = (t_2 * (a + b)) * (b - a);
	double tmp;
	if (angle_m <= 1.32e+259) {
		tmp = fma(t_3, cos((0.005555555555555556 * (angle_m * ((double) M_PI)))), (t_3 * cos(((angle_m * ((double) M_PI)) * 0.005555555555555556))));
	} else {
		tmp = fma((2.0 * fma((t_2 * b), t_1, (((0.0 * a) * t_1) * t_2))), b, ((-2.0 * (a * a)) * (t_1 * t_2)));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
	t_1 = sin(fma(0.5, pi, t_0))
	t_2 = sin(t_0)
	t_3 = Float64(Float64(t_2 * Float64(a + b)) * Float64(b - a))
	tmp = 0.0
	if (angle_m <= 1.32e+259)
		tmp = fma(t_3, cos(Float64(0.005555555555555556 * Float64(angle_m * pi))), Float64(t_3 * cos(Float64(Float64(angle_m * pi) * 0.005555555555555556))));
	else
		tmp = fma(Float64(2.0 * fma(Float64(t_2 * b), t_1, Float64(Float64(Float64(0.0 * a) * t_1) * t_2))), b, Float64(Float64(-2.0 * Float64(a * a)) * Float64(t_1 * t_2)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(t$95$2 * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 1.32e+259], N[(t$95$3 * N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(t$95$3 * N[Cos[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(t$95$2 * b), $MachinePrecision] * t$95$1 + N[(N[(N[(0.0 * a), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b + N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]]
\begin{array}{l}
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\\
t_1 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right)\\
t_2 := \sin t\_0\\
t_3 := \left(t\_2 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.32 \cdot 10^{+259}:\\
\;\;\;\;\mathsf{fma}\left(t\_3, \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right), t\_3 \cdot \cos \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_2 \cdot b, t\_1, \left(\left(0 \cdot a\right) \cdot t\_1\right) \cdot t\_2\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(t\_1 \cdot t\_2\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 1.31999999999999998e259

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right)} \]
    9. Step-by-step derivation
      1. lift-sin.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\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), \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \frac{\mathsf{PI}\left(\right)}{2}\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
      7. sin-+PI/2N/A

        \[\leadsto \mathsf{fma}\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), \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
      9. lower-cos.f64N/A

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

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

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
      12. lift-PI.f6466.8

        \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
    10. Applied rewrites66.8%

      \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
    11. Step-by-step derivation
      1. lift-sin.f64N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right)\right) \]
      8. associate-*r*N/A

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      9. lower-cos.f64N/A

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
      12. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \]
      13. lift-PI.f6471.9

        \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \]
    12. Applied rewrites71.9%

      \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \cos \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \]

    if 1.31999999999999998e259 < angle

    1. Initial program 20.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. Applied rewrites44.5%

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

        \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
      3. Applied rewrites52.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
    4. Recombined 2 regimes into one program.
    5. Add Preprocessing

    Alternative 2: 67.1% accurate, N/A× speedup?

    \[\begin{array}{l} 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\\ t_1 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right)\\ t_2 := \sin t\_0\\ t_3 := \left(\left(0 \cdot a\right) \cdot t\_1\right) \cdot t\_2\\ t_4 := \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(t\_1 \cdot t\_2\right)\\ t_5 := t\_2 \cdot b\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-25}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\\ \mathbf{elif}\;angle\_m \leq 5.6 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, \sin \left(0.5 \cdot \pi\right), t\_3\right), b, t\_4\right)\\ \mathbf{elif}\;angle\_m \leq 2.5 \cdot 10^{+258}:\\ \;\;\;\;\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \cos t\_0\right) \cdot t\_2}{b}, \frac{-2}{b}, \sin \left(2 \cdot t\_0\right)\right) \cdot \left(b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, t\_1, t\_3\right), b, t\_4\right)\\ \end{array} \end{array} \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (let* ((t_0 (* (* PI angle_m) 0.005555555555555556))
            (t_1 (sin (fma 0.5 PI t_0)))
            (t_2 (sin t_0))
            (t_3 (* (* (* 0.0 a) t_1) t_2))
            (t_4 (* (* -2.0 (* a a)) (* t_1 t_2)))
            (t_5 (* t_2 b)))
       (*
        angle_s
        (if (<= angle_m 2.6e-25)
          (* (* (* 0.011111111111111112 angle_m) (* PI (+ a b))) (- b a))
          (if (<= angle_m 5.6e+153)
            (fma (* 2.0 (fma t_5 (sin (* 0.5 PI)) t_3)) b t_4)
            (if (<= angle_m 2.5e+258)
              (*
               (fma
                (/ (* (* (* a a) (cos t_0)) t_2) b)
                (/ -2.0 b)
                (sin (* 2.0 t_0)))
               (* b b))
              (fma (* 2.0 (fma t_5 t_1 t_3)) b t_4)))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
    	double t_1 = sin(fma(0.5, ((double) M_PI), t_0));
    	double t_2 = sin(t_0);
    	double t_3 = ((0.0 * a) * t_1) * t_2;
    	double t_4 = (-2.0 * (a * a)) * (t_1 * t_2);
    	double t_5 = t_2 * b;
    	double tmp;
    	if (angle_m <= 2.6e-25) {
    		tmp = ((0.011111111111111112 * angle_m) * (((double) M_PI) * (a + b))) * (b - a);
    	} else if (angle_m <= 5.6e+153) {
    		tmp = fma((2.0 * fma(t_5, sin((0.5 * ((double) M_PI))), t_3)), b, t_4);
    	} else if (angle_m <= 2.5e+258) {
    		tmp = fma(((((a * a) * cos(t_0)) * t_2) / b), (-2.0 / b), sin((2.0 * t_0))) * (b * b);
    	} else {
    		tmp = fma((2.0 * fma(t_5, t_1, t_3)), b, t_4);
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
    	t_1 = sin(fma(0.5, pi, t_0))
    	t_2 = sin(t_0)
    	t_3 = Float64(Float64(Float64(0.0 * a) * t_1) * t_2)
    	t_4 = Float64(Float64(-2.0 * Float64(a * a)) * Float64(t_1 * t_2))
    	t_5 = Float64(t_2 * b)
    	tmp = 0.0
    	if (angle_m <= 2.6e-25)
    		tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(a + b))) * Float64(b - a));
    	elseif (angle_m <= 5.6e+153)
    		tmp = fma(Float64(2.0 * fma(t_5, sin(Float64(0.5 * pi)), t_3)), b, t_4);
    	elseif (angle_m <= 2.5e+258)
    		tmp = Float64(fma(Float64(Float64(Float64(Float64(a * a) * cos(t_0)) * t_2) / b), Float64(-2.0 / b), sin(Float64(2.0 * t_0))) * Float64(b * b));
    	else
    		tmp = fma(Float64(2.0 * fma(t_5, t_1, t_3)), b, t_4);
    	end
    	return Float64(angle_s * tmp)
    end
    
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(0.0 * a), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$2 * b), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 2.6e-25], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 5.6e+153], N[(N[(2.0 * N[(t$95$5 * N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] * b + t$95$4), $MachinePrecision], If[LessEqual[angle$95$m, 2.5e+258], N[(N[(N[(N[(N[(N[(a * a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] / b), $MachinePrecision] * N[(-2.0 / b), $MachinePrecision] + N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(t$95$5 * t$95$1 + t$95$3), $MachinePrecision]), $MachinePrecision] * b + t$95$4), $MachinePrecision]]]]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    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\\
    t_1 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right)\\
    t_2 := \sin t\_0\\
    t_3 := \left(\left(0 \cdot a\right) \cdot t\_1\right) \cdot t\_2\\
    t_4 := \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(t\_1 \cdot t\_2\right)\\
    t_5 := t\_2 \cdot b\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-25}:\\
    \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\\
    
    \mathbf{elif}\;angle\_m \leq 5.6 \cdot 10^{+153}:\\
    \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, \sin \left(0.5 \cdot \pi\right), t\_3\right), b, t\_4\right)\\
    
    \mathbf{elif}\;angle\_m \leq 2.5 \cdot 10^{+258}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \cos t\_0\right) \cdot t\_2}{b}, \frac{-2}{b}, \sin \left(2 \cdot t\_0\right)\right) \cdot \left(b \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, t\_1, t\_3\right), b, t\_4\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if angle < 2.6e-25

      1. Initial program 59.6%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
      6. 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)} \]
      7. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

          \[\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) \]
      8. Applied rewrites60.1%

        \[\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)} \]
      9. Step-by-step derivation
        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.6e-25 < angle < 5.5999999999999997e153

      1. Initial program 45.7%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. Applied rewrites40.7%

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

          \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
        3. Applied rewrites40.5%

          \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
        4. Taylor expanded in angle around 0

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

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

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

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

        if 5.5999999999999997e153 < angle < 2.5e258

        1. Initial program 39.9%

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
        6. Step-by-step derivation
          1. lift-sin.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(b \cdot b\right) \]
          14. lift-*.f6443.7

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

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

        if 2.5e258 < angle

        1. Initial program 20.4%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. Applied rewrites44.5%

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

            \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
          3. Applied rewrites52.8%

            \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
        4. Recombined 4 regimes into one program.
        5. Add Preprocessing

        Alternative 3: 66.4% accurate, N/A× speedup?

        \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := -2 \cdot \left(a \cdot a\right)\\ t_1 := \sin \left(0.5 \cdot \pi\right)\\ t_2 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ t_3 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_2\right)\right)\\ t_4 := \sin t\_2\\ t_5 := t\_4 \cdot b\\ t_6 := \left(\left(0 \cdot a\right) \cdot t\_3\right) \cdot t\_4\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 6.6 \cdot 10^{+32}:\\ \;\;\;\;\mathsf{fma}\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right), \left(\left(t\_4 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 6 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, t\_1, t\_6\right), b, t\_0 \cdot \left(t\_3 \cdot t\_4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, t\_3, t\_6\right), b, t\_0 \cdot \left(\mathsf{fma}\left(t\_1, \cos t\_2, \sin \left(\mathsf{fma}\left(0.5, \pi, \frac{\pi}{2}\right)\right) \cdot t\_4\right) \cdot t\_4\right)\right)\\ \end{array} \end{array} \end{array} \]
        angle\_m = (fabs.f64 angle)
        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
        (FPCore (angle_s a b angle_m)
         :precision binary64
         (let* ((t_0 (* -2.0 (* a a)))
                (t_1 (sin (* 0.5 PI)))
                (t_2 (* (* PI angle_m) 0.005555555555555556))
                (t_3 (sin (fma 0.5 PI t_2)))
                (t_4 (sin t_2))
                (t_5 (* t_4 b))
                (t_6 (* (* (* 0.0 a) t_3) t_4)))
           (*
            angle_s
            (if (<= angle_m 6.6e+32)
              (fma
               (* (* (sin (* (* 0.005555555555555556 angle_m) PI)) (+ a b)) (- b a))
               (cos (* 0.005555555555555556 (* angle_m PI)))
               (*
                (* (* t_4 (+ a b)) (- b a))
                (sin (fma (* 0.005555555555555556 angle_m) PI (/ PI 2.0)))))
              (if (<= angle_m 6e+153)
                (fma (* 2.0 (fma t_5 t_1 t_6)) b (* t_0 (* t_3 t_4)))
                (fma
                 (* 2.0 (fma t_5 t_3 t_6))
                 b
                 (*
                  t_0
                  (*
                   (fma t_1 (cos t_2) (* (sin (fma 0.5 PI (/ PI 2.0))) t_4))
                   t_4))))))))
        angle\_m = fabs(angle);
        angle\_s = copysign(1.0, angle);
        double code(double angle_s, double a, double b, double angle_m) {
        	double t_0 = -2.0 * (a * a);
        	double t_1 = sin((0.5 * ((double) M_PI)));
        	double t_2 = (((double) M_PI) * angle_m) * 0.005555555555555556;
        	double t_3 = sin(fma(0.5, ((double) M_PI), t_2));
        	double t_4 = sin(t_2);
        	double t_5 = t_4 * b;
        	double t_6 = ((0.0 * a) * t_3) * t_4;
        	double tmp;
        	if (angle_m <= 6.6e+32) {
        		tmp = fma(((sin(((0.005555555555555556 * angle_m) * ((double) M_PI))) * (a + b)) * (b - a)), cos((0.005555555555555556 * (angle_m * ((double) M_PI)))), (((t_4 * (a + b)) * (b - a)) * sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) / 2.0)))));
        	} else if (angle_m <= 6e+153) {
        		tmp = fma((2.0 * fma(t_5, t_1, t_6)), b, (t_0 * (t_3 * t_4)));
        	} else {
        		tmp = fma((2.0 * fma(t_5, t_3, t_6)), b, (t_0 * (fma(t_1, cos(t_2), (sin(fma(0.5, ((double) M_PI), (((double) M_PI) / 2.0))) * t_4)) * t_4)));
        	}
        	return angle_s * tmp;
        }
        
        angle\_m = abs(angle)
        angle\_s = copysign(1.0, angle)
        function code(angle_s, a, b, angle_m)
        	t_0 = Float64(-2.0 * Float64(a * a))
        	t_1 = sin(Float64(0.5 * pi))
        	t_2 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
        	t_3 = sin(fma(0.5, pi, t_2))
        	t_4 = sin(t_2)
        	t_5 = Float64(t_4 * b)
        	t_6 = Float64(Float64(Float64(0.0 * a) * t_3) * t_4)
        	tmp = 0.0
        	if (angle_m <= 6.6e+32)
        		tmp = fma(Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)) * Float64(a + b)) * Float64(b - a)), cos(Float64(0.005555555555555556 * Float64(angle_m * pi))), Float64(Float64(Float64(t_4 * Float64(a + b)) * Float64(b - a)) * sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi / 2.0)))));
        	elseif (angle_m <= 6e+153)
        		tmp = fma(Float64(2.0 * fma(t_5, t_1, t_6)), b, Float64(t_0 * Float64(t_3 * t_4)));
        	else
        		tmp = fma(Float64(2.0 * fma(t_5, t_3, t_6)), b, Float64(t_0 * Float64(fma(t_1, cos(t_2), Float64(sin(fma(0.5, pi, Float64(pi / 2.0))) * t_4)) * t_4)));
        	end
        	return Float64(angle_s * tmp)
        end
        
        angle\_m = N[Abs[angle], $MachinePrecision]
        angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(0.5 * Pi + t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * b), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(0.0 * a), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 6.6e+32], N[(N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(N[(t$95$4 * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 6e+153], N[(N[(2.0 * N[(t$95$5 * t$95$1 + t$95$6), $MachinePrecision]), $MachinePrecision] * b + N[(t$95$0 * N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(t$95$5 * t$95$3 + t$95$6), $MachinePrecision]), $MachinePrecision] * b + N[(t$95$0 * N[(N[(t$95$1 * N[Cos[t$95$2], $MachinePrecision] + N[(N[Sin[N[(0.5 * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]]]]
        
        \begin{array}{l}
        angle\_m = \left|angle\right|
        \\
        angle\_s = \mathsf{copysign}\left(1, angle\right)
        
        \\
        \begin{array}{l}
        t_0 := -2 \cdot \left(a \cdot a\right)\\
        t_1 := \sin \left(0.5 \cdot \pi\right)\\
        t_2 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
        t_3 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_2\right)\right)\\
        t_4 := \sin t\_2\\
        t_5 := t\_4 \cdot b\\
        t_6 := \left(\left(0 \cdot a\right) \cdot t\_3\right) \cdot t\_4\\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;angle\_m \leq 6.6 \cdot 10^{+32}:\\
        \;\;\;\;\mathsf{fma}\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right), \left(\left(t\_4 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \frac{\pi}{2}\right)\right)\right)\\
        
        \mathbf{elif}\;angle\_m \leq 6 \cdot 10^{+153}:\\
        \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, t\_1, t\_6\right), b, t\_0 \cdot \left(t\_3 \cdot t\_4\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_5, t\_3, t\_6\right), b, t\_0 \cdot \left(\mathsf{fma}\left(t\_1, \cos t\_2, \sin \left(\mathsf{fma}\left(0.5, \pi, \frac{\pi}{2}\right)\right) \cdot t\_4\right) \cdot t\_4\right)\right)\\
        
        
        \end{array}
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if angle < 6.60000000000000039e32

          1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right)} \]
          9. Step-by-step derivation
            1. lift-sin.f64N/A

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

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

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

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

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

              \[\leadsto \mathsf{fma}\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), \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right) + \frac{\mathsf{PI}\left(\right)}{2}\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
            7. sin-+PI/2N/A

              \[\leadsto \mathsf{fma}\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), \cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
            8. associate-*r*N/A

              \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
            9. lower-cos.f64N/A

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

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

              \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
            12. lift-PI.f6476.9

              \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
          10. Applied rewrites76.9%

            \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
          11. Step-by-step derivation
            1. lift-*.f64N/A

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

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

              \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
            4. associate-*l*N/A

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

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

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

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

              \[\leadsto \mathsf{fma}\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), \cos \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
            9. lift-PI.f6478.4

              \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]
          12. Applied rewrites78.4%

            \[\leadsto \mathsf{fma}\left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right), \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), \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) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \]

          if 6.60000000000000039e32 < angle < 6.00000000000000037e153

          1. Initial program 35.9%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. Applied rewrites28.7%

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

              \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
            3. Applied rewrites25.7%

              \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
            4. Taylor expanded in angle around 0

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

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

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

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

            if 6.00000000000000037e153 < angle

            1. Initial program 32.1%

              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. Applied rewrites38.4%

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

                \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
              3. Applied rewrites45.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
              4. Step-by-step derivation
                1. lift-sin.f64N/A

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot b, \sin \left(\mathsf{fma}\left(\frac{1}{2}, \pi, \left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{2}, \pi, \left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \pi\right), \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right), \cos \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
              5. Applied rewrites39.0%

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

            Alternative 4: 65.4% accurate, N/A× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(0.5 \cdot \pi\right)\\ t_1 := -2 \cdot \left(a \cdot a\right)\\ t_2 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ t_3 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_2\right)\right)\\ t_4 := \sin t\_2\\ t_5 := \left(\left(0 \cdot a\right) \cdot t\_3\right) \cdot t\_4\\ t_6 := t\_4 \cdot b\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-25}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\\ \mathbf{elif}\;angle\_m \leq 6 \cdot 10^{+153}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_6, t\_0, t\_5\right), b, t\_1 \cdot \left(t\_3 \cdot t\_4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_6, t\_3, t\_5\right), b, t\_1 \cdot \left(\mathsf{fma}\left(t\_0, \cos t\_2, \sin \left(\mathsf{fma}\left(0.5, \pi, \frac{\pi}{2}\right)\right) \cdot t\_4\right) \cdot t\_4\right)\right)\\ \end{array} \end{array} \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (let* ((t_0 (sin (* 0.5 PI)))
                    (t_1 (* -2.0 (* a a)))
                    (t_2 (* (* PI angle_m) 0.005555555555555556))
                    (t_3 (sin (fma 0.5 PI t_2)))
                    (t_4 (sin t_2))
                    (t_5 (* (* (* 0.0 a) t_3) t_4))
                    (t_6 (* t_4 b)))
               (*
                angle_s
                (if (<= angle_m 2.6e-25)
                  (* (* (* 0.011111111111111112 angle_m) (* PI (+ a b))) (- b a))
                  (if (<= angle_m 6e+153)
                    (fma (* 2.0 (fma t_6 t_0 t_5)) b (* t_1 (* t_3 t_4)))
                    (fma
                     (* 2.0 (fma t_6 t_3 t_5))
                     b
                     (*
                      t_1
                      (*
                       (fma t_0 (cos t_2) (* (sin (fma 0.5 PI (/ PI 2.0))) t_4))
                       t_4))))))))
            angle\_m = fabs(angle);
            angle\_s = copysign(1.0, angle);
            double code(double angle_s, double a, double b, double angle_m) {
            	double t_0 = sin((0.5 * ((double) M_PI)));
            	double t_1 = -2.0 * (a * a);
            	double t_2 = (((double) M_PI) * angle_m) * 0.005555555555555556;
            	double t_3 = sin(fma(0.5, ((double) M_PI), t_2));
            	double t_4 = sin(t_2);
            	double t_5 = ((0.0 * a) * t_3) * t_4;
            	double t_6 = t_4 * b;
            	double tmp;
            	if (angle_m <= 2.6e-25) {
            		tmp = ((0.011111111111111112 * angle_m) * (((double) M_PI) * (a + b))) * (b - a);
            	} else if (angle_m <= 6e+153) {
            		tmp = fma((2.0 * fma(t_6, t_0, t_5)), b, (t_1 * (t_3 * t_4)));
            	} else {
            		tmp = fma((2.0 * fma(t_6, t_3, t_5)), b, (t_1 * (fma(t_0, cos(t_2), (sin(fma(0.5, ((double) M_PI), (((double) M_PI) / 2.0))) * t_4)) * t_4)));
            	}
            	return angle_s * tmp;
            }
            
            angle\_m = abs(angle)
            angle\_s = copysign(1.0, angle)
            function code(angle_s, a, b, angle_m)
            	t_0 = sin(Float64(0.5 * pi))
            	t_1 = Float64(-2.0 * Float64(a * a))
            	t_2 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
            	t_3 = sin(fma(0.5, pi, t_2))
            	t_4 = sin(t_2)
            	t_5 = Float64(Float64(Float64(0.0 * a) * t_3) * t_4)
            	t_6 = Float64(t_4 * b)
            	tmp = 0.0
            	if (angle_m <= 2.6e-25)
            		tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(a + b))) * Float64(b - a));
            	elseif (angle_m <= 6e+153)
            		tmp = fma(Float64(2.0 * fma(t_6, t_0, t_5)), b, Float64(t_1 * Float64(t_3 * t_4)));
            	else
            		tmp = fma(Float64(2.0 * fma(t_6, t_3, t_5)), b, Float64(t_1 * Float64(fma(t_0, cos(t_2), Float64(sin(fma(0.5, pi, Float64(pi / 2.0))) * t_4)) * t_4)));
            	end
            	return Float64(angle_s * tmp)
            end
            
            angle\_m = N[Abs[angle], $MachinePrecision]
            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(0.5 * Pi + t$95$2), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(0.0 * a), $MachinePrecision] * t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 * b), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 2.6e-25], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 6e+153], N[(N[(2.0 * N[(t$95$6 * t$95$0 + t$95$5), $MachinePrecision]), $MachinePrecision] * b + N[(t$95$1 * N[(t$95$3 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(t$95$6 * t$95$3 + t$95$5), $MachinePrecision]), $MachinePrecision] * b + N[(t$95$1 * N[(N[(t$95$0 * N[Cos[t$95$2], $MachinePrecision] + N[(N[Sin[N[(0.5 * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]]]]
            
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            \begin{array}{l}
            t_0 := \sin \left(0.5 \cdot \pi\right)\\
            t_1 := -2 \cdot \left(a \cdot a\right)\\
            t_2 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
            t_3 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_2\right)\right)\\
            t_4 := \sin t\_2\\
            t_5 := \left(\left(0 \cdot a\right) \cdot t\_3\right) \cdot t\_4\\
            t_6 := t\_4 \cdot b\\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-25}:\\
            \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\\
            
            \mathbf{elif}\;angle\_m \leq 6 \cdot 10^{+153}:\\
            \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_6, t\_0, t\_5\right), b, t\_1 \cdot \left(t\_3 \cdot t\_4\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_6, t\_3, t\_5\right), b, t\_1 \cdot \left(\mathsf{fma}\left(t\_0, \cos t\_2, \sin \left(\mathsf{fma}\left(0.5, \pi, \frac{\pi}{2}\right)\right) \cdot t\_4\right) \cdot t\_4\right)\right)\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if angle < 2.6e-25

              1. Initial program 59.6%

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
              6. 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)} \]
              7. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

                  \[\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) \]
              8. Applied rewrites60.1%

                \[\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)} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.6e-25 < angle < 6.00000000000000037e153

              1. Initial program 45.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. Applied rewrites40.7%

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

                  \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
                3. Applied rewrites40.5%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
                4. Taylor expanded in angle around 0

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

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

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

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

                if 6.00000000000000037e153 < angle

                1. Initial program 32.1%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. Applied rewrites38.4%

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

                    \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
                  3. Applied rewrites45.1%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
                  4. Step-by-step derivation
                    1. lift-sin.f64N/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot b, \sin \left(\mathsf{fma}\left(\frac{1}{2}, \pi, \left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{2}, \pi, \left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\frac{1}{2} \cdot \pi\right), \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right), \cos \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \]
                  5. Applied rewrites39.0%

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

                Alternative 5: 64.5% accurate, N/A× speedup?

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

                  1. Initial program 59.7%

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                  6. 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)} \]
                  7. Step-by-step derivation
                    1. associate-*r*N/A

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

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

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

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

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{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--.f6459.9

                      \[\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) \]
                  8. Applied rewrites59.9%

                    \[\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)} \]
                  9. Step-by-step derivation
                    1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.50000000000000005e63 < angle < 2.85e259

                  1. Initial program 37.3%

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                  6. Step-by-step derivation
                    1. lift-sin.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \left(b \cdot b\right) \]
                    14. lift-*.f6437.3

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

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

                  if 2.85e259 < angle

                  1. Initial program 20.4%

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

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                  6. 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)} \]
                  7. Step-by-step derivation
                    1. associate-*r*N/A

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

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

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

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

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{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--.f6442.8

                      \[\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) \]
                  8. Applied rewrites42.8%

                    \[\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)} \]
                3. Recombined 3 regimes into one program.
                4. Add Preprocessing

                Alternative 6: 63.6% accurate, N/A× speedup?

                \[\begin{array}{l} 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\\ t_1 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right)\\ t_2 := \sin t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 1.2 \cdot 10^{+148}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_2 \cdot b, \sin \left(0.5 \cdot \pi\right), \left(\left(0 \cdot a\right) \cdot t\_1\right) \cdot t\_2\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(t\_1 \cdot t\_2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\\ \end{array} \end{array} \end{array} \]
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b angle_m)
                 :precision binary64
                 (let* ((t_0 (* (* PI angle_m) 0.005555555555555556))
                        (t_1 (sin (fma 0.5 PI t_0)))
                        (t_2 (sin t_0)))
                   (*
                    angle_s
                    (if (<= a 1.2e+148)
                      (fma
                       (* 2.0 (fma (* t_2 b) (sin (* 0.5 PI)) (* (* (* 0.0 a) t_1) t_2)))
                       b
                       (* (* -2.0 (* a a)) (* t_1 t_2)))
                      (* (* (* 0.011111111111111112 angle_m) (* PI (+ a b))) (- b a))))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
                	double t_1 = sin(fma(0.5, ((double) M_PI), t_0));
                	double t_2 = sin(t_0);
                	double tmp;
                	if (a <= 1.2e+148) {
                		tmp = fma((2.0 * fma((t_2 * b), sin((0.5 * ((double) M_PI))), (((0.0 * a) * t_1) * t_2))), b, ((-2.0 * (a * a)) * (t_1 * t_2)));
                	} else {
                		tmp = ((0.011111111111111112 * angle_m) * (((double) M_PI) * (a + b))) * (b - a);
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
                	t_1 = sin(fma(0.5, pi, t_0))
                	t_2 = sin(t_0)
                	tmp = 0.0
                	if (a <= 1.2e+148)
                		tmp = fma(Float64(2.0 * fma(Float64(t_2 * b), sin(Float64(0.5 * pi)), Float64(Float64(Float64(0.0 * a) * t_1) * t_2))), b, Float64(Float64(-2.0 * Float64(a * a)) * Float64(t_1 * t_2)));
                	else
                		tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(a + b))) * Float64(b - a));
                	end
                	return Float64(angle_s * tmp)
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[t$95$0], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a, 1.2e+148], N[(N[(2.0 * N[(N[(t$95$2 * b), $MachinePrecision] * N[Sin[N[(0.5 * Pi), $MachinePrecision]], $MachinePrecision] + N[(N[(N[(0.0 * a), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b + N[(N[(-2.0 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
                
                \begin{array}{l}
                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\\
                t_1 := \sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right)\\
                t_2 := \sin t\_0\\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;a \leq 1.2 \cdot 10^{+148}:\\
                \;\;\;\;\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(t\_2 \cdot b, \sin \left(0.5 \cdot \pi\right), \left(\left(0 \cdot a\right) \cdot t\_1\right) \cdot t\_2\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(t\_1 \cdot t\_2\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 1.19999999999999997e148

                  1. Initial program 55.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. Applied rewrites54.6%

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

                      \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + b \cdot \left(2 \cdot \left(b \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) + 2 \cdot \left(\sin \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) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right)} \]
                    3. Applied rewrites62.4%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right)} \]
                    4. Taylor expanded in angle around 0

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

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

                        \[\leadsto \mathsf{fma}\left(2 \cdot \mathsf{fma}\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot b, \sin \left(0.5 \cdot \pi\right), \left(\left(0 \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right), b, \left(-2 \cdot \left(a \cdot a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \]
                    6. Applied rewrites62.1%

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

                    if 1.19999999999999997e148 < a

                    1. Initial program 44.5%

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                    6. 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)} \]
                    7. Step-by-step derivation
                      1. associate-*r*N/A

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

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

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

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

                        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{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--.f6460.0

                        \[\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) \]
                    8. Applied rewrites60.0%

                      \[\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)} \]
                    9. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 7: 63.4% accurate, N/A× speedup?

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

                    1. Initial program 59.9%

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                    6. 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)} \]
                    7. Step-by-step derivation
                      1. associate-*r*N/A

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

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

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

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

                        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{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--.f6460.0

                        \[\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) \]
                    8. Applied rewrites60.0%

                      \[\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)} \]
                    9. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.6999999999999996e68 < angle < 2.1499999999999999e154

                    1. Initial program 33.2%

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

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

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

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

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

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

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

                        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(-\pi \cdot \frac{angle}{180}\right) + \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right) \]
                      8. lift-PI.f6441.5

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

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

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

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

                    if 2.1499999999999999e154 < angle

                    1. Initial program 29.7%

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                    6. 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)} \]
                    7. Step-by-step derivation
                      1. associate-*r*N/A

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

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

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

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

                        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{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--.f6436.0

                        \[\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) \]
                    8. Applied rewrites36.0%

                      \[\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)} \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 8: 63.3% accurate, N/A× speedup?

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

                    1. Initial program 59.3%

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                    6. 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)} \]
                    7. Step-by-step derivation
                      1. associate-*r*N/A

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

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

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

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

                        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{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--.f6459.8

                        \[\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) \]
                    8. Applied rewrites59.8%

                      \[\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)} \]
                    9. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.20000000000000005e-25 < angle

                    1. Initial program 40.7%

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                    6. 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)} \]
                    7. Step-by-step derivation
                      1. associate-*r*N/A

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

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

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

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

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

                        \[\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) \]
                    8. Applied rewrites35.4%

                      \[\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)} \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 9: 54.1% accurate, N/A× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\right) \end{array} \]
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a b angle_m)
                   :precision binary64
                   (* angle_s (* (* 0.011111111111111112 angle_m) (* (* PI (+ a b)) (- b a)))))
                  angle\_m = fabs(angle);
                  angle\_s = copysign(1.0, angle);
                  double code(double angle_s, double a, double b, double angle_m) {
                  	return angle_s * ((0.011111111111111112 * angle_m) * ((((double) M_PI) * (a + b)) * (b - a)));
                  }
                  
                  angle\_m = Math.abs(angle);
                  angle\_s = Math.copySign(1.0, angle);
                  public static double code(double angle_s, double a, double b, double angle_m) {
                  	return angle_s * ((0.011111111111111112 * angle_m) * ((Math.PI * (a + b)) * (b - a)));
                  }
                  
                  angle\_m = math.fabs(angle)
                  angle\_s = math.copysign(1.0, angle)
                  def code(angle_s, a, b, angle_m):
                  	return angle_s * ((0.011111111111111112 * angle_m) * ((math.pi * (a + b)) * (b - a)))
                  
                  angle\_m = abs(angle)
                  angle\_s = copysign(1.0, angle)
                  function code(angle_s, a, b, angle_m)
                  	return Float64(angle_s * Float64(Float64(0.011111111111111112 * angle_m) * Float64(Float64(pi * Float64(a + b)) * Float64(b - a))))
                  end
                  
                  angle\_m = abs(angle);
                  angle\_s = sign(angle) * abs(1.0);
                  function tmp = code(angle_s, a, b, angle_m)
                  	tmp = angle_s * ((0.011111111111111112 * angle_m) * ((pi * (a + b)) * (b - a)));
                  end
                  
                  angle\_m = N[Abs[angle], $MachinePrecision]
                  angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\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. Add Preprocessing
                  3. Taylor expanded in b around inf

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

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

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}{b}, \frac{-2}{b}, \sin \left(2 \cdot \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \left(b \cdot b\right)} \]
                  6. 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)} \]
                  7. Step-by-step derivation
                    1. associate-*r*N/A

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

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

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

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

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{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--.f6452.8

                      \[\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) \]
                  8. Applied rewrites52.8%

                    \[\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)} \]
                  9. Add Preprocessing

                  Reproduce

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