ab-angle->ABCF B

Percentage Accurate: 54.6% → 67.8%
Time: 7.4s
Alternatives: 18
Speedup: 5.5×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 54.6% 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.8% accurate, 0.4× 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 := t\_1 \cdot t\_2\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+175}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(2 \cdot t\_2, t\_1 \cdot 0, \left(-2 \cdot a\right) \cdot t\_3\right), a, \left(b \cdot \left(b + b\right)\right) \cdot t\_3\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(-\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right) + \frac{\pi}{2}\right)\right) \cdot \left(\left(t\_2 \cdot \left(a + b\right)\right) \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 angle_m) 0.005555555555555556))
        (t_1 (sin (fma 0.5 PI t_0)))
        (t_2 (sin t_0))
        (t_3 (* t_1 t_2)))
   (*
    angle_s
    (if (<= (pow b 2.0) 2e+175)
      (fma
       (fma (* 2.0 t_2) (* t_1 0.0) (* (* -2.0 a) t_3))
       a
       (* (* b (+ b b)) t_3))
      (*
       (* 2.0 (sin (+ (- (* (* angle_m PI) 0.005555555555555556)) (/ PI 2.0))))
       (* (* t_2 (+ 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 t_3 = t_1 * t_2;
	double tmp;
	if (pow(b, 2.0) <= 2e+175) {
		tmp = fma(fma((2.0 * t_2), (t_1 * 0.0), ((-2.0 * a) * t_3)), a, ((b * (b + b)) * t_3));
	} else {
		tmp = (2.0 * sin((-((angle_m * ((double) M_PI)) * 0.005555555555555556) + (((double) M_PI) / 2.0)))) * ((t_2 * (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)
	t_3 = Float64(t_1 * t_2)
	tmp = 0.0
	if ((b ^ 2.0) <= 2e+175)
		tmp = fma(fma(Float64(2.0 * t_2), Float64(t_1 * 0.0), Float64(Float64(-2.0 * a) * t_3)), a, Float64(Float64(b * Float64(b + b)) * t_3));
	else
		tmp = Float64(Float64(2.0 * sin(Float64(Float64(-Float64(Float64(angle_m * pi) * 0.005555555555555556)) + Float64(pi / 2.0)))) * Float64(Float64(t_2 * 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]}, Block[{t$95$3 = N[(t$95$1 * t$95$2), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 2e+175], N[(N[(N[(2.0 * t$95$2), $MachinePrecision] * N[(t$95$1 * 0.0), $MachinePrecision] + N[(N[(-2.0 * a), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] * a + N[(N[(b * N[(b + b), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Sin[N[((-N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$2 * 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)

\\
\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 := t\_1 \cdot t\_2\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+175}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(2 \cdot t\_2, t\_1 \cdot 0, \left(-2 \cdot a\right) \cdot t\_3\right), a, \left(b \cdot \left(b + b\right)\right) \cdot t\_3\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 1.9999999999999999e175

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \sin \left(\mathsf{fma}\left(\pi, \frac{angle}{180}, \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right)\right) \]
      9. lift-PI.f6458.3

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \sin \left(\mathsf{fma}\left(\pi, \frac{angle}{180}, \frac{\color{blue}{\pi}}{2}\right)\right)\right) \]
    5. Applied rewrites58.3%

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

      \[\leadsto \color{blue}{2 \cdot \left({b}^{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) + a \cdot \left(-2 \cdot \left(a \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(b + -1 \cdot b\right)\right)\right)\right)} \]
    7. Applied rewrites61.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(2 \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right), \sin \left(\mathsf{fma}\left(0.5, \pi, \left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot 0, \left(-2 \cdot a\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), a, \left(b \cdot \left(b + b\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.9999999999999999e175 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
    5. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
    6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.8% accurate, 0.9× 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\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+300}:\\ \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(-\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right) + \frac{\pi}{2}\right)\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\right)\right) \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 angle_m) 0.005555555555555556)))
   (*
    angle_s
    (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e+300)
      (*
       (* 2.0 (cos t_0))
       (* (* (* (* (+ a b) PI) angle_m) 0.005555555555555556) (- b a)))
      (*
       (* 2.0 (sin (+ (- (* (* angle_m PI) 0.005555555555555556)) (/ PI 2.0))))
       (* (* (sin t_0) (+ 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 tmp;
	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e+300) {
		tmp = (2.0 * cos(t_0)) * (((((a + b) * ((double) M_PI)) * angle_m) * 0.005555555555555556) * (b - a));
	} else {
		tmp = (2.0 * sin((-((angle_m * ((double) M_PI)) * 0.005555555555555556) + (((double) M_PI) / 2.0)))) * ((sin(t_0) * (a + b)) * (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 * angle_m) * 0.005555555555555556;
	double tmp;
	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e+300) {
		tmp = (2.0 * Math.cos(t_0)) * (((((a + b) * Math.PI) * angle_m) * 0.005555555555555556) * (b - a));
	} else {
		tmp = (2.0 * Math.sin((-((angle_m * Math.PI) * 0.005555555555555556) + (Math.PI / 2.0)))) * ((Math.sin(t_0) * (a + b)) * (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 * angle_m) * 0.005555555555555556
	tmp = 0
	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e+300:
		tmp = (2.0 * math.cos(t_0)) * (((((a + b) * math.pi) * angle_m) * 0.005555555555555556) * (b - a))
	else:
		tmp = (2.0 * math.sin((-((angle_m * math.pi) * 0.005555555555555556) + (math.pi / 2.0)))) * ((math.sin(t_0) * (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)
	tmp = 0.0
	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e+300)
		tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * 0.005555555555555556) * Float64(b - a)));
	else
		tmp = Float64(Float64(2.0 * sin(Float64(Float64(-Float64(Float64(angle_m * pi) * 0.005555555555555556)) + Float64(pi / 2.0)))) * Float64(Float64(sin(t_0) * Float64(a + b)) * 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 * angle_m) * 0.005555555555555556;
	tmp = 0.0;
	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e+300)
		tmp = (2.0 * cos(t_0)) * (((((a + b) * pi) * angle_m) * 0.005555555555555556) * (b - a));
	else
		tmp = (2.0 * sin((-((angle_m * pi) * 0.005555555555555556) + (pi / 2.0)))) * ((sin(t_0) * (a + b)) * (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[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+300], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Sin[N[((-N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * 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)

\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+300}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\

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


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

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
    5. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
    6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
    5. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
    6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.1% accurate, 1.2× 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\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 6.5 \cdot 10^{+17}:\\ \;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \pi\right)\right)\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)))
   (*
    angle_s
    (if (<= angle_m 6.5e+17)
      (* (* 2.0 (cos t_0)) (* (* (sin t_0) (+ a b)) (- b a)))
      (*
       (* (* b (- b a)) 2.0)
       (*
        (sin (* PI (/ angle_m 180.0)))
        (- 1.0 (* 1.54320987654321e-5 (* (* angle_m angle_m) (* PI PI))))))))))
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 tmp;
	if (angle_m <= 6.5e+17) {
		tmp = (2.0 * cos(t_0)) * ((sin(t_0) * (a + b)) * (b - a));
	} else {
		tmp = ((b * (b - a)) * 2.0) * (sin((((double) M_PI) * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (((double) M_PI) * ((double) M_PI))))));
	}
	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 * angle_m) * 0.005555555555555556;
	double tmp;
	if (angle_m <= 6.5e+17) {
		tmp = (2.0 * Math.cos(t_0)) * ((Math.sin(t_0) * (a + b)) * (b - a));
	} else {
		tmp = ((b * (b - a)) * 2.0) * (Math.sin((Math.PI * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (Math.PI * Math.PI)))));
	}
	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 * angle_m) * 0.005555555555555556
	tmp = 0
	if angle_m <= 6.5e+17:
		tmp = (2.0 * math.cos(t_0)) * ((math.sin(t_0) * (a + b)) * (b - a))
	else:
		tmp = ((b * (b - a)) * 2.0) * (math.sin((math.pi * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (math.pi * math.pi)))))
	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)
	tmp = 0.0
	if (angle_m <= 6.5e+17)
		tmp = Float64(Float64(2.0 * cos(t_0)) * Float64(Float64(sin(t_0) * Float64(a + b)) * Float64(b - a)));
	else
		tmp = Float64(Float64(Float64(b * Float64(b - a)) * 2.0) * Float64(sin(Float64(pi * Float64(angle_m / 180.0))) * Float64(1.0 - Float64(1.54320987654321e-5 * Float64(Float64(angle_m * angle_m) * Float64(pi * pi))))));
	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 * angle_m) * 0.005555555555555556;
	tmp = 0.0;
	if (angle_m <= 6.5e+17)
		tmp = (2.0 * cos(t_0)) * ((sin(t_0) * (a + b)) * (b - a));
	else
		tmp = ((b * (b - a)) * 2.0) * (sin((pi * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (pi * pi)))));
	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[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 6.5e+17], N[(N[(2.0 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(1.54320987654321e-5 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 6.5 \cdot 10^{+17}:\\
\;\;\;\;\left(2 \cdot \cos t\_0\right) \cdot \left(\left(\sin t\_0 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\\


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

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
    5. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
    6. Applied rewrites53.3%

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

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

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

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

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

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

    if 6.5e17 < angle

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
    5. Step-by-step derivation
      1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
    6. Applied rewrites53.3%

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

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

        \[\leadsto \left(\left(\color{blue}{b} \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \pi\right)\right)\right)\right) \]
    9. Recombined 2 regimes into one program.
    10. Add Preprocessing

    Alternative 4: 64.8% accurate, 1.6× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.5 \cdot 10^{-73}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \mathsf{fma}\left(\left(\left(angle\_m \cdot angle\_m\right) \cdot \pi\right) \cdot \pi, -1.54320987654321 \cdot 10^{-5}, 1\right)\right)\\ \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
     (*
      angle_s
      (if (<= angle_m 1.5e-73)
        (*
         (* 2.0 (cos (* (* PI angle_m) 0.005555555555555556)))
         (* (* (* (* (+ a b) PI) angle_m) 0.005555555555555556) (- b a)))
        (*
         (* (* (+ b a) (- b a)) 2.0)
         (*
          (sin (* PI (/ angle_m 180.0)))
          (fma (* (* (* angle_m angle_m) PI) PI) -1.54320987654321e-5 1.0))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (angle_m <= 1.5e-73) {
    		tmp = (2.0 * cos(((((double) M_PI) * angle_m) * 0.005555555555555556))) * (((((a + b) * ((double) M_PI)) * angle_m) * 0.005555555555555556) * (b - a));
    	} else {
    		tmp = (((b + a) * (b - a)) * 2.0) * (sin((((double) M_PI) * (angle_m / 180.0))) * fma((((angle_m * angle_m) * ((double) M_PI)) * ((double) M_PI)), -1.54320987654321e-5, 1.0));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	tmp = 0.0
    	if (angle_m <= 1.5e-73)
    		tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle_m) * 0.005555555555555556))) * Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * 0.005555555555555556) * Float64(b - a)));
    	else
    		tmp = Float64(Float64(Float64(Float64(b + a) * Float64(b - a)) * 2.0) * Float64(sin(Float64(pi * Float64(angle_m / 180.0))) * fma(Float64(Float64(Float64(angle_m * angle_m) * pi) * pi), -1.54320987654321e-5, 1.0)));
    	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1.5e-73], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * Pi), $MachinePrecision] * -1.54320987654321e-5 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 1.5 \cdot 10^{-73}:\\
    \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \mathsf{fma}\left(\left(\left(angle\_m \cdot angle\_m\right) \cdot \pi\right) \cdot \pi, -1.54320987654321 \cdot 10^{-5}, 1\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 1.5e-73

      1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
      5. Step-by-step derivation
        1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
      6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.5e-73 < angle

      1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
      5. Step-by-step derivation
        1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
      6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - \frac{1}{64800} \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \]
        9. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \mathsf{fma}\left(\left(\left(angle \cdot angle\right) \cdot \pi\right) \cdot \pi, \color{blue}{-1.54320987654321 \cdot 10^{-5}}, 1\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 5: 64.0% accurate, 1.7× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.9 \cdot 10^{+22}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\\ \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
     (*
      angle_s
      (if (<= angle_m 2.9e+22)
        (*
         (* 2.0 (cos (* (* PI angle_m) 0.005555555555555556)))
         (* (* (* (* (+ a b) PI) angle_m) 0.005555555555555556) (- b a)))
        (*
         (* (* b (- b a)) 2.0)
         (*
          (sin (* PI (/ angle_m 180.0)))
          (- 1.0 (* 1.54320987654321e-5 (* (* angle_m angle_m) (* PI PI)))))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (angle_m <= 2.9e+22) {
    		tmp = (2.0 * cos(((((double) M_PI) * angle_m) * 0.005555555555555556))) * (((((a + b) * ((double) M_PI)) * angle_m) * 0.005555555555555556) * (b - a));
    	} else {
    		tmp = ((b * (b - a)) * 2.0) * (sin((((double) M_PI) * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (((double) M_PI) * ((double) M_PI))))));
    	}
    	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 tmp;
    	if (angle_m <= 2.9e+22) {
    		tmp = (2.0 * Math.cos(((Math.PI * angle_m) * 0.005555555555555556))) * (((((a + b) * Math.PI) * angle_m) * 0.005555555555555556) * (b - a));
    	} else {
    		tmp = ((b * (b - a)) * 2.0) * (Math.sin((Math.PI * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (Math.PI * Math.PI)))));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b, angle_m):
    	tmp = 0
    	if angle_m <= 2.9e+22:
    		tmp = (2.0 * math.cos(((math.pi * angle_m) * 0.005555555555555556))) * (((((a + b) * math.pi) * angle_m) * 0.005555555555555556) * (b - a))
    	else:
    		tmp = ((b * (b - a)) * 2.0) * (math.sin((math.pi * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (math.pi * math.pi)))))
    	return angle_s * tmp
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	tmp = 0.0
    	if (angle_m <= 2.9e+22)
    		tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle_m) * 0.005555555555555556))) * Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * 0.005555555555555556) * Float64(b - a)));
    	else
    		tmp = Float64(Float64(Float64(b * Float64(b - a)) * 2.0) * Float64(sin(Float64(pi * Float64(angle_m / 180.0))) * Float64(1.0 - Float64(1.54320987654321e-5 * Float64(Float64(angle_m * angle_m) * Float64(pi * pi))))));
    	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)
    	tmp = 0.0;
    	if (angle_m <= 2.9e+22)
    		tmp = (2.0 * cos(((pi * angle_m) * 0.005555555555555556))) * (((((a + b) * pi) * angle_m) * 0.005555555555555556) * (b - a));
    	else
    		tmp = ((b * (b - a)) * 2.0) * (sin((pi * (angle_m / 180.0))) * (1.0 - (1.54320987654321e-5 * ((angle_m * angle_m) * (pi * pi)))));
    	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.9e+22], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(1.0 - N[(1.54320987654321e-5 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 2.9 \cdot 10^{+22}:\\
    \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(b \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 2.9e22

      1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
      5. Step-by-step derivation
        1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
      6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.9e22 < angle

      1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
      5. Step-by-step derivation
        1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
      6. Applied rewrites53.3%

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

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

          \[\leadsto \left(\left(\color{blue}{b} \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\pi \cdot \pi\right)\right)\right)\right) \]
      9. Recombined 2 regimes into one program.
      10. Add Preprocessing

      Alternative 6: 64.0% accurate, 2.0× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.82 \cdot 10^{-68}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;angle\_m \leq 7.5 \cdot 10^{+90}:\\ \;\;\;\;\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\ \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
       (*
        angle_s
        (if (<= angle_m 1.82e-68)
          (* (* (* (* (+ a b) PI) angle_m) (- b a)) 0.011111111111111112)
          (if (<= angle_m 7.5e+90)
            (*
             (* (+ a b) (- b a))
             (sin (* 2.0 (* (* 0.005555555555555556 angle_m) PI))))
            (* (* (* PI angle_m) (* (+ b a) (* -1.0 a))) 0.011111111111111112)))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (angle_m <= 1.82e-68) {
      		tmp = ((((a + b) * ((double) M_PI)) * angle_m) * (b - a)) * 0.011111111111111112;
      	} else if (angle_m <= 7.5e+90) {
      		tmp = ((a + b) * (b - a)) * sin((2.0 * ((0.005555555555555556 * angle_m) * ((double) M_PI))));
      	} else {
      		tmp = ((((double) M_PI) * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
      	}
      	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 tmp;
      	if (angle_m <= 1.82e-68) {
      		tmp = ((((a + b) * Math.PI) * angle_m) * (b - a)) * 0.011111111111111112;
      	} else if (angle_m <= 7.5e+90) {
      		tmp = ((a + b) * (b - a)) * Math.sin((2.0 * ((0.005555555555555556 * angle_m) * Math.PI)));
      	} else {
      		tmp = ((Math.PI * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if angle_m <= 1.82e-68:
      		tmp = ((((a + b) * math.pi) * angle_m) * (b - a)) * 0.011111111111111112
      	elif angle_m <= 7.5e+90:
      		tmp = ((a + b) * (b - a)) * math.sin((2.0 * ((0.005555555555555556 * angle_m) * math.pi)))
      	else:
      		tmp = ((math.pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112
      	return angle_s * tmp
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	tmp = 0.0
      	if (angle_m <= 1.82e-68)
      		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * Float64(b - a)) * 0.011111111111111112);
      	elseif (angle_m <= 7.5e+90)
      		tmp = Float64(Float64(Float64(a + b) * Float64(b - a)) * sin(Float64(2.0 * Float64(Float64(0.005555555555555556 * angle_m) * pi))));
      	else
      		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b + a) * Float64(-1.0 * a))) * 0.011111111111111112);
      	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)
      	tmp = 0.0;
      	if (angle_m <= 1.82e-68)
      		tmp = ((((a + b) * pi) * angle_m) * (b - a)) * 0.011111111111111112;
      	elseif (angle_m <= 7.5e+90)
      		tmp = ((a + b) * (b - a)) * sin((2.0 * ((0.005555555555555556 * angle_m) * pi)));
      	else
      		tmp = ((pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
      	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1.82e-68], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle$95$m, 7.5e+90], N[(N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(-1.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;angle\_m \leq 1.82 \cdot 10^{-68}:\\
      \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
      
      \mathbf{elif}\;angle\_m \leq 7.5 \cdot 10^{+90}:\\
      \;\;\;\;\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if angle < 1.81999999999999994e-68

        1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot \frac{1}{90} \]
          23. lower-*.f6417.0

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
        6. Applied rewrites17.0%

          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
        7. Step-by-step derivation
          1. Applied rewrites63.4%

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

          if 1.81999999999999994e-68 < angle < 7.50000000000000014e90

          1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \sin \left(\mathsf{fma}\left(\pi, \frac{angle}{180}, \color{blue}{\frac{\mathsf{PI}\left(\right)}{2}}\right)\right)\right) \]
            9. lift-PI.f6458.3

              \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \sin \left(\mathsf{fma}\left(\pi, \frac{angle}{180}, \frac{\color{blue}{\pi}}{2}\right)\right)\right) \]
          5. Applied rewrites58.3%

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

            \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \cdot \sin \left(\mathsf{fma}\left(\pi, \frac{angle}{180}, \frac{\pi}{2}\right)\right)\right) \]
          7. Step-by-step derivation
            1. lower-*.f6458.5

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

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

            \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \left(\frac{1}{180} \cdot angle\right)\right) \cdot \sin \left(\mathsf{fma}\left(\pi, \color{blue}{\frac{1}{180} \cdot angle}, \frac{\pi}{2}\right)\right)\right) \]
          10. Step-by-step derivation
            1. lower-*.f6458.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 7.50000000000000014e90 < angle

          1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 63.5% accurate, 2.6× speedup?

        \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 6.8 \cdot 10^{-68}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;angle\_m \leq 3.5 \cdot 10^{+197}:\\ \;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(0.005555555555555556, \pi, \left(angle\_m \cdot angle\_m\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\ \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
         (*
          angle_s
          (if (<= angle_m 6.8e-68)
            (* (* (* (* (+ a b) PI) angle_m) (- b a)) 0.011111111111111112)
            (if (<= angle_m 3.5e+197)
              (*
               (* (* (+ b a) (- b a)) 2.0)
               (*
                angle_m
                (fma
                 0.005555555555555556
                 PI
                 (* (* angle_m angle_m) (* (* (* PI PI) PI) -1.1431184270690443e-7)))))
              (* (* (* PI angle_m) (* (+ b a) (* -1.0 a))) 0.011111111111111112)))))
        angle\_m = fabs(angle);
        angle\_s = copysign(1.0, angle);
        double code(double angle_s, double a, double b, double angle_m) {
        	double tmp;
        	if (angle_m <= 6.8e-68) {
        		tmp = ((((a + b) * ((double) M_PI)) * angle_m) * (b - a)) * 0.011111111111111112;
        	} else if (angle_m <= 3.5e+197) {
        		tmp = (((b + a) * (b - a)) * 2.0) * (angle_m * fma(0.005555555555555556, ((double) M_PI), ((angle_m * angle_m) * (((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)) * -1.1431184270690443e-7))));
        	} else {
        		tmp = ((((double) M_PI) * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
        	}
        	return angle_s * tmp;
        }
        
        angle\_m = abs(angle)
        angle\_s = copysign(1.0, angle)
        function code(angle_s, a, b, angle_m)
        	tmp = 0.0
        	if (angle_m <= 6.8e-68)
        		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * Float64(b - a)) * 0.011111111111111112);
        	elseif (angle_m <= 3.5e+197)
        		tmp = Float64(Float64(Float64(Float64(b + a) * Float64(b - a)) * 2.0) * Float64(angle_m * fma(0.005555555555555556, pi, Float64(Float64(angle_m * angle_m) * Float64(Float64(Float64(pi * pi) * pi) * -1.1431184270690443e-7)))));
        	else
        		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b + a) * Float64(-1.0 * a))) * 0.011111111111111112);
        	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 6.8e-68], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle$95$m, 3.5e+197], N[(N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(angle$95$m * N[(0.005555555555555556 * Pi + N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] * -1.1431184270690443e-7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(-1.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]), $MachinePrecision]
        
        \begin{array}{l}
        angle\_m = \left|angle\right|
        \\
        angle\_s = \mathsf{copysign}\left(1, angle\right)
        
        \\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;angle\_m \leq 6.8 \cdot 10^{-68}:\\
        \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
        
        \mathbf{elif}\;angle\_m \leq 3.5 \cdot 10^{+197}:\\
        \;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(0.005555555555555556, \pi, \left(angle\_m \cdot angle\_m\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if angle < 6.80000000000000037e-68

          1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot \frac{1}{90} \]
            23. lower-*.f6417.0

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
          6. Applied rewrites17.0%

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
          7. Step-by-step derivation
            1. Applied rewrites63.4%

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

            if 6.80000000000000037e-68 < angle < 3.49999999999999999e197

            1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{1}{180}, \pi, {angle}^{2} \cdot \left(\frac{-1}{11664000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{-1}{34992000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)\right) \]
              5. pow2N/A

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{1}{180}, \pi, \left(angle \cdot angle\right) \cdot \left(\frac{-1}{11664000} \cdot {\mathsf{PI}\left(\right)}^{3} + \frac{-1}{34992000} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)\right) \]
              7. distribute-rgt-outN/A

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{1}{180}, \pi, \left(angle \cdot angle\right) \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left(\frac{-1}{11664000} + \frac{-1}{34992000}\right)\right)\right)\right) \]
              8. metadata-evalN/A

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{1}{180}, \pi, \left(angle \cdot angle\right) \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \frac{-1}{8748000}\right)\right)\right) \]
              10. pow3N/A

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

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

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

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{1}{180}, \pi, \left(angle \cdot angle\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{8748000}\right)\right)\right) \]
              15. lift-PI.f6452.9

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(0.005555555555555556, \pi, \left(angle \cdot angle\right) \cdot \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right)\right) \]
            6. Applied rewrites52.9%

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

            if 3.49999999999999999e197 < angle

            1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 63.4% accurate, 1.8× speedup?

          \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 8.5 \cdot 10^{+76}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\ \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
           (*
            angle_s
            (if (<= angle_m 8.5e+76)
              (*
               (* 2.0 (cos (* (* PI angle_m) 0.005555555555555556)))
               (* (* (* (* (+ a b) PI) angle_m) 0.005555555555555556) (- b a)))
              (* (* (* PI angle_m) (* (+ b a) (* -1.0 a))) 0.011111111111111112))))
          angle\_m = fabs(angle);
          angle\_s = copysign(1.0, angle);
          double code(double angle_s, double a, double b, double angle_m) {
          	double tmp;
          	if (angle_m <= 8.5e+76) {
          		tmp = (2.0 * cos(((((double) M_PI) * angle_m) * 0.005555555555555556))) * (((((a + b) * ((double) M_PI)) * angle_m) * 0.005555555555555556) * (b - a));
          	} else {
          		tmp = ((((double) M_PI) * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
          	}
          	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 tmp;
          	if (angle_m <= 8.5e+76) {
          		tmp = (2.0 * Math.cos(((Math.PI * angle_m) * 0.005555555555555556))) * (((((a + b) * Math.PI) * angle_m) * 0.005555555555555556) * (b - a));
          	} else {
          		tmp = ((Math.PI * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
          	}
          	return angle_s * tmp;
          }
          
          angle\_m = math.fabs(angle)
          angle\_s = math.copysign(1.0, angle)
          def code(angle_s, a, b, angle_m):
          	tmp = 0
          	if angle_m <= 8.5e+76:
          		tmp = (2.0 * math.cos(((math.pi * angle_m) * 0.005555555555555556))) * (((((a + b) * math.pi) * angle_m) * 0.005555555555555556) * (b - a))
          	else:
          		tmp = ((math.pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112
          	return angle_s * tmp
          
          angle\_m = abs(angle)
          angle\_s = copysign(1.0, angle)
          function code(angle_s, a, b, angle_m)
          	tmp = 0.0
          	if (angle_m <= 8.5e+76)
          		tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle_m) * 0.005555555555555556))) * Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * 0.005555555555555556) * Float64(b - a)));
          	else
          		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b + a) * Float64(-1.0 * a))) * 0.011111111111111112);
          	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)
          	tmp = 0.0;
          	if (angle_m <= 8.5e+76)
          		tmp = (2.0 * cos(((pi * angle_m) * 0.005555555555555556))) * (((((a + b) * pi) * angle_m) * 0.005555555555555556) * (b - a));
          	else
          		tmp = ((pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
          	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 8.5e+76], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(-1.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          angle\_m = \left|angle\right|
          \\
          angle\_s = \mathsf{copysign}\left(1, angle\right)
          
          \\
          angle\_s \cdot \begin{array}{l}
          \mathbf{if}\;angle\_m \leq 8.5 \cdot 10^{+76}:\\
          \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(b - a\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if angle < 8.49999999999999992e76

            1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
            5. Step-by-step derivation
              1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
            6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 8.49999999999999992e76 < angle

            1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 63.2% accurate, 2.1× speedup?

          \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 7.5 \cdot 10^{+88}:\\ \;\;\;\;2 \cdot \left(\left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\ \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
           (*
            angle_s
            (if (<= angle_m 7.5e+88)
              (*
               2.0
               (* (* (sin (* (* PI angle_m) 0.005555555555555556)) (+ a b)) (- b a)))
              (* (* (* PI angle_m) (* (+ b a) (* -1.0 a))) 0.011111111111111112))))
          angle\_m = fabs(angle);
          angle\_s = copysign(1.0, angle);
          double code(double angle_s, double a, double b, double angle_m) {
          	double tmp;
          	if (angle_m <= 7.5e+88) {
          		tmp = 2.0 * ((sin(((((double) M_PI) * angle_m) * 0.005555555555555556)) * (a + b)) * (b - a));
          	} else {
          		tmp = ((((double) M_PI) * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
          	}
          	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 tmp;
          	if (angle_m <= 7.5e+88) {
          		tmp = 2.0 * ((Math.sin(((Math.PI * angle_m) * 0.005555555555555556)) * (a + b)) * (b - a));
          	} else {
          		tmp = ((Math.PI * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
          	}
          	return angle_s * tmp;
          }
          
          angle\_m = math.fabs(angle)
          angle\_s = math.copysign(1.0, angle)
          def code(angle_s, a, b, angle_m):
          	tmp = 0
          	if angle_m <= 7.5e+88:
          		tmp = 2.0 * ((math.sin(((math.pi * angle_m) * 0.005555555555555556)) * (a + b)) * (b - a))
          	else:
          		tmp = ((math.pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112
          	return angle_s * tmp
          
          angle\_m = abs(angle)
          angle\_s = copysign(1.0, angle)
          function code(angle_s, a, b, angle_m)
          	tmp = 0.0
          	if (angle_m <= 7.5e+88)
          		tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(pi * angle_m) * 0.005555555555555556)) * Float64(a + b)) * Float64(b - a)));
          	else
          		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b + a) * Float64(-1.0 * a))) * 0.011111111111111112);
          	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)
          	tmp = 0.0;
          	if (angle_m <= 7.5e+88)
          		tmp = 2.0 * ((sin(((pi * angle_m) * 0.005555555555555556)) * (a + b)) * (b - a));
          	else
          		tmp = ((pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
          	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 7.5e+88], N[(2.0 * N[(N[(N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(-1.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          angle\_m = \left|angle\right|
          \\
          angle\_s = \mathsf{copysign}\left(1, angle\right)
          
          \\
          angle\_s \cdot \begin{array}{l}
          \mathbf{if}\;angle\_m \leq 7.5 \cdot 10^{+88}:\\
          \;\;\;\;2 \cdot \left(\left(\sin \left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if angle < 7.50000000000000031e88

            1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)}\right) \]
            5. Step-by-step derivation
              1. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(1 - 1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot \left(\color{blue}{\pi} \cdot \pi\right)\right)\right)\right) \]
            6. Applied rewrites53.3%

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

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

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

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

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

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

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

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

              if 7.50000000000000031e88 < angle

              1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 10: 62.9% accurate, 5.4× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 8 \cdot 10^{+76}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\ \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
             (*
              angle_s
              (if (<= angle_m 8e+76)
                (* (* (* (* (+ a b) PI) angle_m) (- b a)) 0.011111111111111112)
                (* (* (* PI angle_m) (* (+ b a) (* -1.0 a))) 0.011111111111111112))))
            angle\_m = fabs(angle);
            angle\_s = copysign(1.0, angle);
            double code(double angle_s, double a, double b, double angle_m) {
            	double tmp;
            	if (angle_m <= 8e+76) {
            		tmp = ((((a + b) * ((double) M_PI)) * angle_m) * (b - a)) * 0.011111111111111112;
            	} else {
            		tmp = ((((double) M_PI) * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
            	}
            	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 tmp;
            	if (angle_m <= 8e+76) {
            		tmp = ((((a + b) * Math.PI) * angle_m) * (b - a)) * 0.011111111111111112;
            	} else {
            		tmp = ((Math.PI * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
            	}
            	return angle_s * tmp;
            }
            
            angle\_m = math.fabs(angle)
            angle\_s = math.copysign(1.0, angle)
            def code(angle_s, a, b, angle_m):
            	tmp = 0
            	if angle_m <= 8e+76:
            		tmp = ((((a + b) * math.pi) * angle_m) * (b - a)) * 0.011111111111111112
            	else:
            		tmp = ((math.pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112
            	return angle_s * tmp
            
            angle\_m = abs(angle)
            angle\_s = copysign(1.0, angle)
            function code(angle_s, a, b, angle_m)
            	tmp = 0.0
            	if (angle_m <= 8e+76)
            		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * Float64(b - a)) * 0.011111111111111112);
            	else
            		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(Float64(b + a) * Float64(-1.0 * a))) * 0.011111111111111112);
            	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)
            	tmp = 0.0;
            	if (angle_m <= 8e+76)
            		tmp = ((((a + b) * pi) * angle_m) * (b - a)) * 0.011111111111111112;
            	else
            		tmp = ((pi * angle_m) * ((b + a) * (-1.0 * a))) * 0.011111111111111112;
            	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 8e+76], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(-1.0 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;angle\_m \leq 8 \cdot 10^{+76}:\\
            \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot a\right)\right)\right) \cdot 0.011111111111111112\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 8.0000000000000004e76

              1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot \frac{1}{90} \]
                23. lower-*.f6417.0

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
              6. Applied rewrites17.0%

                \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
              7. Step-by-step derivation
                1. Applied rewrites63.4%

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

                if 8.0000000000000004e76 < angle

                1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 11: 62.7% accurate, 5.5× speedup?

              \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-74}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(angle\_m \cdot \pi\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\right)\\ \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
               (*
                angle_s
                (if (<= angle_m 2.6e-74)
                  (* (* (* (* (+ a b) PI) angle_m) (- b a)) 0.011111111111111112)
                  (* (* angle_m PI) (* (* (+ a b) (- b a)) 0.011111111111111112)))))
              angle\_m = fabs(angle);
              angle\_s = copysign(1.0, angle);
              double code(double angle_s, double a, double b, double angle_m) {
              	double tmp;
              	if (angle_m <= 2.6e-74) {
              		tmp = ((((a + b) * ((double) M_PI)) * angle_m) * (b - a)) * 0.011111111111111112;
              	} else {
              		tmp = (angle_m * ((double) M_PI)) * (((a + b) * (b - a)) * 0.011111111111111112);
              	}
              	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 tmp;
              	if (angle_m <= 2.6e-74) {
              		tmp = ((((a + b) * Math.PI) * angle_m) * (b - a)) * 0.011111111111111112;
              	} else {
              		tmp = (angle_m * Math.PI) * (((a + b) * (b - a)) * 0.011111111111111112);
              	}
              	return angle_s * tmp;
              }
              
              angle\_m = math.fabs(angle)
              angle\_s = math.copysign(1.0, angle)
              def code(angle_s, a, b, angle_m):
              	tmp = 0
              	if angle_m <= 2.6e-74:
              		tmp = ((((a + b) * math.pi) * angle_m) * (b - a)) * 0.011111111111111112
              	else:
              		tmp = (angle_m * math.pi) * (((a + b) * (b - a)) * 0.011111111111111112)
              	return angle_s * tmp
              
              angle\_m = abs(angle)
              angle\_s = copysign(1.0, angle)
              function code(angle_s, a, b, angle_m)
              	tmp = 0.0
              	if (angle_m <= 2.6e-74)
              		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle_m) * Float64(b - a)) * 0.011111111111111112);
              	else
              		tmp = Float64(Float64(angle_m * pi) * Float64(Float64(Float64(a + b) * Float64(b - a)) * 0.011111111111111112));
              	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)
              	tmp = 0.0;
              	if (angle_m <= 2.6e-74)
              		tmp = ((((a + b) * pi) * angle_m) * (b - a)) * 0.011111111111111112;
              	else
              		tmp = (angle_m * pi) * (((a + b) * (b - a)) * 0.011111111111111112);
              	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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.6e-74], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
              
              \begin{array}{l}
              angle\_m = \left|angle\right|
              \\
              angle\_s = \mathsf{copysign}\left(1, angle\right)
              
              \\
              angle\_s \cdot \begin{array}{l}
              \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-74}:\\
              \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(angle\_m \cdot \pi\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if angle < 2.6000000000000001e-74

                1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot \frac{1}{90} \]
                  23. lower-*.f6417.0

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
                6. Applied rewrites17.0%

                  \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
                7. Step-by-step derivation
                  1. Applied rewrites63.4%

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

                  if 2.6000000000000001e-74 < angle

                  1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    9. lower--.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    11. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    12. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    13. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    14. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    15. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    16. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    17. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    18. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    19. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    20. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{b \cdot b + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    21. lower-fma.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, {a}^{2}\right)}\right) \cdot \frac{1}{90} \]
                    22. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot \frac{1}{90} \]
                    23. lower-*.f6417.0

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
                  6. Applied rewrites17.0%

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
                  7. Applied rewrites55.3%

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\right)} \]
                8. Recombined 2 regimes into one program.
                9. Add Preprocessing

                Alternative 12: 58.8% accurate, 5.5× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 3.5 \cdot 10^{+166}:\\ \;\;\;\;\left(angle\_m \cdot \pi\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\ \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
                 (*
                  angle_s
                  (if (<= a 3.5e+166)
                    (* (* angle_m PI) (* (* (+ a b) (- b a)) 0.011111111111111112))
                    (* -0.011111111111111112 (* (* a (* a angle_m)) PI)))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	double tmp;
                	if (a <= 3.5e+166) {
                		tmp = (angle_m * ((double) M_PI)) * (((a + b) * (b - a)) * 0.011111111111111112);
                	} else {
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * ((double) M_PI));
                	}
                	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 tmp;
                	if (a <= 3.5e+166) {
                		tmp = (angle_m * Math.PI) * (((a + b) * (b - a)) * 0.011111111111111112);
                	} else {
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * Math.PI);
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	tmp = 0
                	if a <= 3.5e+166:
                		tmp = (angle_m * math.pi) * (((a + b) * (b - a)) * 0.011111111111111112)
                	else:
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * math.pi)
                	return angle_s * tmp
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	tmp = 0.0
                	if (a <= 3.5e+166)
                		tmp = Float64(Float64(angle_m * pi) * Float64(Float64(Float64(a + b) * Float64(b - a)) * 0.011111111111111112));
                	else
                		tmp = Float64(-0.011111111111111112 * Float64(Float64(a * Float64(a * angle_m)) * pi));
                	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)
                	tmp = 0.0;
                	if (a <= 3.5e+166)
                		tmp = (angle_m * pi) * (((a + b) * (b - a)) * 0.011111111111111112);
                	else
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * pi);
                	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_] := N[(angle$95$s * If[LessEqual[a, 3.5e+166], N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(N[(a * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;a \leq 3.5 \cdot 10^{+166}:\\
                \;\;\;\;\left(angle\_m \cdot \pi\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 3.4999999999999999e166

                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6455.3

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites55.3%

                    \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    2. lift-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    3. lift--.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    4. difference-of-squares-revN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    5. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    6. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. flip--N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    8. lower-/.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    9. lower--.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    11. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    12. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    13. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    14. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    15. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    16. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    17. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot {a}^{2}}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    18. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    19. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{{b}^{2} + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    20. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{b \cdot b + {a}^{2}}\right) \cdot \frac{1}{90} \]
                    21. lower-fma.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, {a}^{2}\right)}\right) \cdot \frac{1}{90} \]
                    22. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot \frac{1}{90} \]
                    23. lower-*.f6417.0

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
                  6. Applied rewrites17.0%

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \frac{\left(b \cdot b\right) \cdot \left(b \cdot b\right) - \left(a \cdot a\right) \cdot \left(a \cdot a\right)}{\mathsf{fma}\left(b, b, a \cdot a\right)}\right) \cdot 0.011111111111111112 \]
                  7. Applied rewrites55.3%

                    \[\leadsto \left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\right)} \]

                  if 3.4999999999999999e166 < a

                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6455.3

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites55.3%

                    \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                  5. Taylor expanded in a around inf

                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                  7. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                  8. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                    3. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
                    4. lift-PI.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. associate-*r*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    8. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    9. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    10. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    11. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  9. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    5. lower-*.f6438.8

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                  11. Applied rewrites38.8%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 13: 58.2% accurate, 5.5× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 3.5 \cdot 10^{+166}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle\_m\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\ \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
                 (*
                  angle_s
                  (if (<= a 3.5e+166)
                    (* (* 0.011111111111111112 (* PI (* (+ a b) (- b a)))) angle_m)
                    (* -0.011111111111111112 (* (* a (* a angle_m)) PI)))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	double tmp;
                	if (a <= 3.5e+166) {
                		tmp = (0.011111111111111112 * (((double) M_PI) * ((a + b) * (b - a)))) * angle_m;
                	} else {
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * ((double) M_PI));
                	}
                	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 tmp;
                	if (a <= 3.5e+166) {
                		tmp = (0.011111111111111112 * (Math.PI * ((a + b) * (b - a)))) * angle_m;
                	} else {
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * Math.PI);
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	tmp = 0
                	if a <= 3.5e+166:
                		tmp = (0.011111111111111112 * (math.pi * ((a + b) * (b - a)))) * angle_m
                	else:
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * math.pi)
                	return angle_s * tmp
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	tmp = 0.0
                	if (a <= 3.5e+166)
                		tmp = Float64(Float64(0.011111111111111112 * Float64(pi * Float64(Float64(a + b) * Float64(b - a)))) * angle_m);
                	else
                		tmp = Float64(-0.011111111111111112 * Float64(Float64(a * Float64(a * angle_m)) * pi));
                	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)
                	tmp = 0.0;
                	if (a <= 3.5e+166)
                		tmp = (0.011111111111111112 * (pi * ((a + b) * (b - a)))) * angle_m;
                	else
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * pi);
                	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_] := N[(angle$95$s * If[LessEqual[a, 3.5e+166], N[(N[(0.011111111111111112 * N[(Pi * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision], N[(-0.011111111111111112 * N[(N[(a * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;a \leq 3.5 \cdot 10^{+166}:\\
                \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle\_m\\
                
                \mathbf{else}:\\
                \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 3.4999999999999999e166

                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{angle \cdot \left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) + {angle}^{2} \cdot \left(2 \cdot \left({angle}^{2} \cdot \left(\frac{1}{22674816000000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \left(\frac{1}{4534963200000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \frac{1}{2267481600000} \cdot \left({\mathsf{PI}\left(\right)}^{5} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right) + 2 \cdot \left(\frac{-1}{11664000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left({b}^{2} - {a}^{2}\right)\right) + \frac{-1}{34992000} \cdot \left({\mathsf{PI}\left(\right)}^{3} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)\right)} \]
                  3. Applied rewrites30.1%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right), 0.011111111111111112, \left(2 \cdot \mathsf{fma}\left(\mathsf{fma}\left({\pi}^{5} \cdot 4.410179116778721 \cdot 10^{-14}, \left(b + a\right) \cdot \left(b - a\right), \left({\pi}^{5} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 6.615268675168081 \cdot 10^{-13}\right), angle \cdot angle, \left(\left(\left(\pi \cdot \pi\right) \cdot \pi\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot -1.1431184270690443 \cdot 10^{-7}\right)\right) \cdot \left(angle \cdot angle\right)\right) \cdot angle} \]
                  4. Taylor expanded in angle around 0

                    \[\leadsto \left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]
                  5. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]
                    3. lift-PI.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]
                    5. lower-+.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]
                    6. lift--.f6455.3

                      \[\leadsto \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]
                  6. Applied rewrites55.3%

                    \[\leadsto \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot angle \]

                  if 3.4999999999999999e166 < a

                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6455.3

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites55.3%

                    \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                  5. Taylor expanded in a around inf

                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                  7. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                  8. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                    3. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
                    4. lift-PI.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. associate-*r*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    8. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    9. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    10. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    11. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  9. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    5. lower-*.f6438.8

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                  11. Applied rewrites38.8%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 14: 58.2% accurate, 2.1× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-304}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\ \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
                 (*
                  angle_s
                  (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e-304)
                    (* -0.011111111111111112 (* (* a (* a angle_m)) PI))
                    (* (* (* PI angle_m) (* b (- b a))) 0.011111111111111112))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	double tmp;
                	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e-304) {
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * ((double) M_PI));
                	} else {
                		tmp = ((((double) M_PI) * angle_m) * (b * (b - a))) * 0.011111111111111112;
                	}
                	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 tmp;
                	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e-304) {
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * Math.PI);
                	} else {
                		tmp = ((Math.PI * angle_m) * (b * (b - a))) * 0.011111111111111112;
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	tmp = 0
                	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e-304:
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * math.pi)
                	else:
                		tmp = ((math.pi * angle_m) * (b * (b - a))) * 0.011111111111111112
                	return angle_s * tmp
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	tmp = 0.0
                	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e-304)
                		tmp = Float64(-0.011111111111111112 * Float64(Float64(a * Float64(a * angle_m)) * pi));
                	else
                		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b * Float64(b - a))) * 0.011111111111111112);
                	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)
                	tmp = 0.0;
                	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e-304)
                		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * pi);
                	else
                		tmp = ((pi * angle_m) * (b * (b - a))) * 0.011111111111111112;
                	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_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-304], N[(-0.011111111111111112 * N[(N[(a * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-304}:\\
                \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.99999999999999965e-304

                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6455.3

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites55.3%

                    \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                  5. Taylor expanded in a around inf

                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                  7. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                  8. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                    3. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
                    4. lift-PI.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. associate-*r*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    8. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    9. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    10. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    11. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  9. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    5. lower-*.f6438.8

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                  11. Applied rewrites38.8%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]

                  if -4.99999999999999965e-304 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6455.3

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites55.3%

                    \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                  5. Taylor expanded in a around 0

                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                  6. Step-by-step derivation
                    1. Applied rewrites38.2%

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  7. Recombined 2 regimes into one program.
                  8. Add Preprocessing

                  Alternative 15: 56.7% accurate, 2.2× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-304}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\\ \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
                   (*
                    angle_s
                    (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e-304)
                      (* -0.011111111111111112 (* (* a (* a angle_m)) PI))
                      (* (* (* PI angle_m) (* b b)) 0.011111111111111112))))
                  angle\_m = fabs(angle);
                  angle\_s = copysign(1.0, angle);
                  double code(double angle_s, double a, double b, double angle_m) {
                  	double tmp;
                  	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e-304) {
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * ((double) M_PI));
                  	} else {
                  		tmp = ((((double) M_PI) * angle_m) * (b * b)) * 0.011111111111111112;
                  	}
                  	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 tmp;
                  	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e-304) {
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * Math.PI);
                  	} else {
                  		tmp = ((Math.PI * angle_m) * (b * b)) * 0.011111111111111112;
                  	}
                  	return angle_s * tmp;
                  }
                  
                  angle\_m = math.fabs(angle)
                  angle\_s = math.copysign(1.0, angle)
                  def code(angle_s, a, b, angle_m):
                  	tmp = 0
                  	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e-304:
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * math.pi)
                  	else:
                  		tmp = ((math.pi * angle_m) * (b * b)) * 0.011111111111111112
                  	return angle_s * tmp
                  
                  angle\_m = abs(angle)
                  angle\_s = copysign(1.0, angle)
                  function code(angle_s, a, b, angle_m)
                  	tmp = 0.0
                  	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e-304)
                  		tmp = Float64(-0.011111111111111112 * Float64(Float64(a * Float64(a * angle_m)) * pi));
                  	else
                  		tmp = Float64(Float64(Float64(pi * angle_m) * Float64(b * b)) * 0.011111111111111112);
                  	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)
                  	tmp = 0.0;
                  	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e-304)
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * pi);
                  	else
                  		tmp = ((pi * angle_m) * (b * b)) * 0.011111111111111112;
                  	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_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-304], N[(-0.011111111111111112 * N[(N[(a * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
                  
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \begin{array}{l}
                  \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-304}:\\
                  \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(\left(\pi \cdot angle\_m\right) \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.99999999999999965e-304

                    1. Initial program 54.6%

                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    2. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6455.3

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites55.3%

                      \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                    5. Taylor expanded in a around inf

                      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                      3. unpow2N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      5. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      6. lift-PI.f6435.2

                        \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                    7. Applied rewrites35.2%

                      \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                      3. pow2N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
                      4. lift-PI.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      5. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      6. associate-*r*N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      7. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      8. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      9. pow2N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      10. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      11. lift-PI.f6435.2

                        \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    9. Applied rewrites35.2%

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    10. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                      3. associate-*l*N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                      5. lower-*.f6438.8

                        \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    11. Applied rewrites38.8%

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]

                    if -4.99999999999999965e-304 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                    1. Initial program 54.6%

                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    2. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6455.3

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites55.3%

                      \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                    5. Taylor expanded in a around 0

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                    6. Step-by-step derivation
                      1. difference-of-squares-revN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                      2. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                      3. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot {b}^{2}\right) \cdot \frac{1}{90} \]
                      4. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot \frac{1}{90} \]
                      5. lower-*.f6435.7

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112 \]
                    7. Applied rewrites35.7%

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112 \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 16: 56.6% accurate, 2.2× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-304}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle\_m \cdot \left(\left(b \cdot b\right) \cdot \pi\right)\right) \cdot 0.011111111111111112\\ \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
                   (*
                    angle_s
                    (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e-304)
                      (* -0.011111111111111112 (* (* a (* a angle_m)) PI))
                      (* (* angle_m (* (* b b) PI)) 0.011111111111111112))))
                  angle\_m = fabs(angle);
                  angle\_s = copysign(1.0, angle);
                  double code(double angle_s, double a, double b, double angle_m) {
                  	double tmp;
                  	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e-304) {
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * ((double) M_PI));
                  	} else {
                  		tmp = (angle_m * ((b * b) * ((double) M_PI))) * 0.011111111111111112;
                  	}
                  	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 tmp;
                  	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e-304) {
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * Math.PI);
                  	} else {
                  		tmp = (angle_m * ((b * b) * Math.PI)) * 0.011111111111111112;
                  	}
                  	return angle_s * tmp;
                  }
                  
                  angle\_m = math.fabs(angle)
                  angle\_s = math.copysign(1.0, angle)
                  def code(angle_s, a, b, angle_m):
                  	tmp = 0
                  	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e-304:
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * math.pi)
                  	else:
                  		tmp = (angle_m * ((b * b) * math.pi)) * 0.011111111111111112
                  	return angle_s * tmp
                  
                  angle\_m = abs(angle)
                  angle\_s = copysign(1.0, angle)
                  function code(angle_s, a, b, angle_m)
                  	tmp = 0.0
                  	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e-304)
                  		tmp = Float64(-0.011111111111111112 * Float64(Float64(a * Float64(a * angle_m)) * pi));
                  	else
                  		tmp = Float64(Float64(angle_m * Float64(Float64(b * b) * pi)) * 0.011111111111111112);
                  	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)
                  	tmp = 0.0;
                  	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e-304)
                  		tmp = -0.011111111111111112 * ((a * (a * angle_m)) * pi);
                  	else
                  		tmp = (angle_m * ((b * b) * pi)) * 0.011111111111111112;
                  	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_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-304], N[(-0.011111111111111112 * N[(N[(a * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(angle$95$m * N[(N[(b * b), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
                  
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \begin{array}{l}
                  \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-304}:\\
                  \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(angle\_m \cdot \left(\left(b \cdot b\right) \cdot \pi\right)\right) \cdot 0.011111111111111112\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.99999999999999965e-304

                    1. Initial program 54.6%

                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    2. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6455.3

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites55.3%

                      \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                    5. Taylor expanded in a around inf

                      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                      3. unpow2N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      5. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      6. lift-PI.f6435.2

                        \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                    7. Applied rewrites35.2%

                      \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                    8. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                      3. pow2N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
                      4. lift-PI.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      5. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                      6. associate-*r*N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      7. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      8. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      9. pow2N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      10. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                      11. lift-PI.f6435.2

                        \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    9. Applied rewrites35.2%

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    10. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                      3. associate-*l*N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                      4. lower-*.f64N/A

                        \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                      5. lower-*.f6438.8

                        \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    11. Applied rewrites38.8%

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]

                    if -4.99999999999999965e-304 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                    1. Initial program 54.6%

                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    2. Taylor expanded in angle around 0

                      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                      3. associate-*r*N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      5. *-commutativeN/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      6. lower-*.f64N/A

                        \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      7. lift-PI.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      8. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                      9. unpow2N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                      10. difference-of-squaresN/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      11. lower-*.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      12. lower-+.f64N/A

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                      13. lower--.f6455.3

                        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                    4. Applied rewrites55.3%

                      \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                    5. Taylor expanded in a around 0

                      \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                      2. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                      3. unpow2N/A

                        \[\leadsto \left(angle \cdot \left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                      4. lower-*.f64N/A

                        \[\leadsto \left(angle \cdot \left(\left(b \cdot b\right) \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
                      5. lift-PI.f6435.6

                        \[\leadsto \left(angle \cdot \left(\left(b \cdot b\right) \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
                    7. Applied rewrites35.6%

                      \[\leadsto \left(angle \cdot \left(\left(b \cdot b\right) \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
                  3. Recombined 2 regimes into one program.
                  4. Add Preprocessing

                  Alternative 17: 38.8% accurate, 9.4× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\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 (* (* a (* a angle_m)) PI))))
                  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 * ((a * (a * angle_m)) * ((double) M_PI)));
                  }
                  
                  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 * ((a * (a * angle_m)) * Math.PI));
                  }
                  
                  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 * ((a * (a * angle_m)) * math.pi))
                  
                  angle\_m = abs(angle)
                  angle\_s = copysign(1.0, angle)
                  function code(angle_s, a, b, angle_m)
                  	return Float64(angle_s * Float64(-0.011111111111111112 * Float64(Float64(a * Float64(a * angle_m)) * pi)))
                  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 * ((a * (a * angle_m)) * pi));
                  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[(-0.011111111111111112 * N[(N[(a * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \left(-0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\_m\right)\right) \cdot \pi\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6455.3

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites55.3%

                    \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                  5. Taylor expanded in a around inf

                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                  7. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                  8. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                    3. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
                    4. lift-PI.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. associate-*r*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    8. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left({a}^{2} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    9. pow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    10. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
                    11. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  9. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                    5. lower-*.f6438.8

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                  11. Applied rewrites38.8%

                    \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
                  12. Add Preprocessing

                  Alternative 18: 35.2% accurate, 9.4× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(-0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle\_m \cdot \pi\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 (* (* a a) (* angle_m PI)))))
                  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 * ((a * a) * (angle_m * ((double) M_PI))));
                  }
                  
                  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 * ((a * a) * (angle_m * Math.PI)));
                  }
                  
                  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 * ((a * a) * (angle_m * math.pi)))
                  
                  angle\_m = abs(angle)
                  angle\_s = copysign(1.0, angle)
                  function code(angle_s, a, b, angle_m)
                  	return Float64(angle_s * Float64(-0.011111111111111112 * Float64(Float64(a * a) * Float64(angle_m * pi))))
                  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 * ((a * a) * (angle_m * pi)));
                  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[(-0.011111111111111112 * N[(N[(a * a), $MachinePrecision] * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \left(-0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle\_m \cdot \pi\right)\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 54.6%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    5. *-commutativeN/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    6. lower-*.f64N/A

                      \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    7. lift-PI.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    8. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
                    9. unpow2N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
                    10. difference-of-squaresN/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    12. lower-+.f64N/A

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
                    13. lower--.f6455.3

                      \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
                  4. Applied rewrites55.3%

                    \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
                  5. Taylor expanded in a around inf

                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \]
                    3. unpow2N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{-1}{90} \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
                    6. lift-PI.f6435.2

                      \[\leadsto -0.011111111111111112 \cdot \left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \]
                  7. Applied rewrites35.2%

                    \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                  8. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025137 
                  (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)))))