ab-angle->ABCF B

Percentage Accurate: 54.1% → 67.0%
Time: 6.1s
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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 67.0% accurate, 0.9× 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 5.5 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\_m\right|, \pi, \frac{\pi}{2}\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 5.5e-12)
    (fma
     (* -0.011111111111111112 a)
     (* (* angle_m PI) a)
     (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
    (*
     (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle_m 180.0))))
     (sin (fma (fabs (* 0.005555555555555556 angle_m)) PI (/ PI 2.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 <= 5.5e-12) {
		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
	} else {
		tmp = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle_m / 180.0)))) * sin(fma(fabs((0.005555555555555556 * angle_m)), ((double) M_PI), (((double) M_PI) / 2.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 <= 5.5e-12)
		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
	else
		tmp = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle_m / 180.0)))) * sin(fma(abs(Float64(0.005555555555555556 * angle_m)), pi, Float64(pi / 2.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, 5.5e-12], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[Abs[N[(0.005555555555555556 * angle$95$m), $MachinePrecision]], $MachinePrecision] * Pi + N[(Pi / 2.0), $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 5.5 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\_m\right|, \pi, \frac{\pi}{2}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 5.5000000000000004e-12

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      5. lift-PI.f6453.9

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
    10. Applied rewrites53.9%

      \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
    11. Step-by-step derivation
      1. lift-fma.f64N/A

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

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

    if 5.5000000000000004e-12 < angle

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left|\frac{angle}{180}\right| \cdot \left|\mathsf{PI}\left(\right)\right|} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      9. add-exp-logN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \left|\color{blue}{e^{\log \mathsf{PI}\left(\right)}}\right| + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      10. fabs-expN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \color{blue}{e^{\log \mathsf{PI}\left(\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      11. add-exp-logN/A

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{\frac{angle}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
      15. mult-flipN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{angle \cdot \frac{1}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
      16. metadata-evalN/A

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\right|, \pi, \frac{\color{blue}{\pi}}{2}\right)\right) \]
    3. Applied rewrites54.0%

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

Alternative 2: 65.2% accurate, 1.3× 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.25 \cdot 10^{+57}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{elif}\;angle\_m \leq 1.12 \cdot 10^{+198}:\\ \;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\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 1.25e+57)
    (fma
     (* -0.011111111111111112 a)
     (* (* angle_m PI) a)
     (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
    (if (<= angle_m 1.12e+198)
      (*
       (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle_m 180.0))))
       1.0)
      (*
       (* 0.011111111111111112 angle_m)
       (log (pow (exp PI) (* (- b a) (+ a b)))))))))
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.25e+57) {
		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
	} else if (angle_m <= 1.12e+198) {
		tmp = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle_m / 180.0)))) * 1.0;
	} else {
		tmp = (0.011111111111111112 * angle_m) * log(pow(exp(((double) M_PI)), ((b - a) * (a + b))));
	}
	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.25e+57)
		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
	elseif (angle_m <= 1.12e+198)
		tmp = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle_m / 180.0)))) * 1.0);
	else
		tmp = Float64(Float64(0.011111111111111112 * angle_m) * log((exp(pi) ^ Float64(Float64(b - a) * Float64(a + b)))));
	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.25e+57], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 1.12e+198], N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(a + b), $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 1.25 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\

\mathbf{elif}\;angle\_m \leq 1.12 \cdot 10^{+198}:\\
\;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot 1\\

\mathbf{else}:\\
\;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 1.24999999999999993e57

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      5. lift-PI.f6453.9

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
    10. Applied rewrites53.9%

      \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
    11. Step-by-step derivation
      1. lift-fma.f64N/A

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

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

    if 1.24999999999999993e57 < angle < 1.1199999999999999e198

    1. Initial program 54.1%

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

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

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

      if 1.1199999999999999e198 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
        23. lower-+.f6436.1

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
      6. Applied rewrites36.1%

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

    Alternative 3: 65.2% accurate, 0.9× 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 5.5 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot angle\_m, 0.005555555555555556, \frac{\pi}{2}\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 5.5e-12)
        (fma
         (* -0.011111111111111112 a)
         (* (* angle_m PI) a)
         (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
        (*
         (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle_m 180.0))))
         (sin (fma (* PI angle_m) 0.005555555555555556 (/ PI 2.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 <= 5.5e-12) {
    		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
    	} else {
    		tmp = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle_m / 180.0)))) * sin(fma((((double) M_PI) * angle_m), 0.005555555555555556, (((double) M_PI) / 2.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 <= 5.5e-12)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
    	else
    		tmp = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle_m / 180.0)))) * sin(fma(Float64(pi * angle_m), 0.005555555555555556, Float64(pi / 2.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, 5.5e-12], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556 + N[(Pi / 2.0), $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 5.5 \cdot 10^{-12}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot angle\_m, 0.005555555555555556, \frac{\pi}{2}\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 5.5000000000000004e-12

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.9

          \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      10. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

      if 5.5000000000000004e-12 < angle

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 65.1% accurate, 0.9× 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 5.5 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot 0.005555555555555556, angle\_m, 0.5 \cdot \pi\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 5.5e-12)
        (fma
         (* -0.011111111111111112 a)
         (* (* angle_m PI) a)
         (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
        (*
         (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle_m 180.0))))
         (sin (fma (* PI 0.005555555555555556) angle_m (* 0.5 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 <= 5.5e-12) {
    		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
    	} else {
    		tmp = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin((((double) M_PI) * (angle_m / 180.0)))) * sin(fma((((double) M_PI) * 0.005555555555555556), angle_m, (0.5 * ((double) M_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 <= 5.5e-12)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
    	else
    		tmp = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(Float64(pi * Float64(angle_m / 180.0)))) * sin(fma(Float64(pi * 0.005555555555555556), angle_m, Float64(0.5 * pi))));
    	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, 5.5e-12], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m + N[(0.5 * Pi), $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 5.5 \cdot 10^{-12}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle\_m}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot 0.005555555555555556, angle\_m, 0.5 \cdot \pi\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 5.5000000000000004e-12

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.9

          \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      10. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

      if 5.5000000000000004e-12 < angle

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left|\frac{angle}{180}\right| \cdot \left|\mathsf{PI}\left(\right)\right|} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        9. add-exp-logN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \left|\color{blue}{e^{\log \mathsf{PI}\left(\right)}}\right| + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        10. fabs-expN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \color{blue}{e^{\log \mathsf{PI}\left(\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        11. add-exp-logN/A

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{\frac{angle}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
        15. mult-flipN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{angle \cdot \frac{1}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
        16. metadata-evalN/A

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\right|, \pi, \frac{\color{blue}{\pi}}{2}\right)\right) \]
      3. Applied rewrites54.0%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\left|\frac{1}{180} \cdot angle\right| \cdot \color{blue}{e^{\log \mathsf{PI}\left(\right)}}\right) \]
        11. fabs-expN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\left|\frac{1}{180} \cdot angle\right| \cdot \color{blue}{\left|e^{\log \mathsf{PI}\left(\right)}\right|}\right) \]
        12. add-exp-logN/A

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 64.2% 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 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3.4 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\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 (* 0.005555555555555556 angle_m))))
       (*
        angle_s
        (if (<= angle_m 3.4e-12)
          (fma
           (* -0.011111111111111112 a)
           (* (* angle_m PI) a)
           (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
          (* (* (* (+ b a) (- b a)) 2.0) (* (sin t_0) (cos t_0)))))))
    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) * (0.005555555555555556 * angle_m);
    	double tmp;
    	if (angle_m <= 3.4e-12) {
    		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
    	} else {
    		tmp = (((b + a) * (b - a)) * 2.0) * (sin(t_0) * cos(t_0));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	t_0 = Float64(pi * Float64(0.005555555555555556 * angle_m))
    	tmp = 0.0
    	if (angle_m <= 3.4e-12)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
    	else
    		tmp = Float64(Float64(Float64(Float64(b + a) * Float64(b - a)) * 2.0) * Float64(sin(t_0) * cos(t_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_] := Block[{t$95$0 = N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 3.4e-12], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    \begin{array}{l}
    t_0 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 3.4 \cdot 10^{-12}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \left(\sin t\_0 \cdot \cos t\_0\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 3.4000000000000001e-12

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.9

          \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      10. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

      if 3.4000000000000001e-12 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Applied rewrites57.9%

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

    Alternative 6: 64.0% accurate, 1.7× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(a + b\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3.4 \cdot 10^{-12}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{elif}\;angle\_m \leq 4.7 \cdot 10^{+220}:\\ \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot t\_0\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\_m\right|, \pi, \frac{\pi}{2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{t\_0}\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 (* (- b a) (+ a b))))
       (*
        angle_s
        (if (<= angle_m 3.4e-12)
          (fma
           (* -0.011111111111111112 a)
           (* (* angle_m PI) a)
           (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
          (if (<= angle_m 4.7e+220)
            (*
             (* (* (* 0.011111111111111112 angle_m) PI) t_0)
             (sin (fma (fabs (* 0.005555555555555556 angle_m)) PI (/ PI 2.0))))
            (* (* 0.011111111111111112 angle_m) (log (pow (exp PI) t_0))))))))
    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 = (b - a) * (a + b);
    	double tmp;
    	if (angle_m <= 3.4e-12) {
    		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
    	} else if (angle_m <= 4.7e+220) {
    		tmp = (((0.011111111111111112 * angle_m) * ((double) M_PI)) * t_0) * sin(fma(fabs((0.005555555555555556 * angle_m)), ((double) M_PI), (((double) M_PI) / 2.0)));
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * log(pow(exp(((double) M_PI)), t_0));
    	}
    	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(b - a) * Float64(a + b))
    	tmp = 0.0
    	if (angle_m <= 3.4e-12)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
    	elseif (angle_m <= 4.7e+220)
    		tmp = Float64(Float64(Float64(Float64(0.011111111111111112 * angle_m) * pi) * t_0) * sin(fma(abs(Float64(0.005555555555555556 * angle_m)), pi, Float64(pi / 2.0))));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * log((exp(pi) ^ t_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_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 3.4e-12], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 4.7e+220], N[(N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * t$95$0), $MachinePrecision] * N[Sin[N[(N[Abs[N[(0.005555555555555556 * angle$95$m), $MachinePrecision]], $MachinePrecision] * Pi + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], t$95$0], $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(b - a\right) \cdot \left(a + b\right)\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 3.4 \cdot 10^{-12}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{elif}\;angle\_m \leq 4.7 \cdot 10^{+220}:\\
    \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot t\_0\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\_m\right|, \pi, \frac{\pi}{2}\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{t\_0}\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if angle < 3.4000000000000001e-12

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.9

          \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      10. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

      if 3.4000000000000001e-12 < angle < 4.70000000000000026e220

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left|\frac{angle}{180}\right| \cdot \left|\mathsf{PI}\left(\right)\right|} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        9. add-exp-logN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \left|\color{blue}{e^{\log \mathsf{PI}\left(\right)}}\right| + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        10. fabs-expN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \color{blue}{e^{\log \mathsf{PI}\left(\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        11. add-exp-logN/A

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{\frac{angle}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
        15. mult-flipN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{angle \cdot \frac{1}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
        16. metadata-evalN/A

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\right|, \pi, \frac{\color{blue}{\pi}}{2}\right)\right) \]
      3. Applied rewrites54.0%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\frac{1}{180} \cdot angle\right|, \pi, \frac{\pi}{2}\right)\right) \]
        11. difference-of-squares-revN/A

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

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

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

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

          \[\leadsto \left(\left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + \color{blue}{b}\right)\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\frac{1}{180} \cdot angle\right|, \pi, \frac{\pi}{2}\right)\right) \]
        16. lower-+.f6454.8

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

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

      if 4.70000000000000026e220 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
        23. lower-+.f6436.1

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
      6. Applied rewrites36.1%

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

    Alternative 7: 63.9% accurate, 1.8× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(a + b\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.2 \cdot 10^{+57}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{elif}\;angle\_m \leq 7.5 \cdot 10^{+197}:\\ \;\;\;\;\left(\left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right) \cdot t\_0\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{t\_0}\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 (* (- b a) (+ a b))))
       (*
        angle_s
        (if (<= angle_m 1.2e+57)
          (fma
           (* -0.011111111111111112 a)
           (* (* angle_m PI) a)
           (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
          (if (<= angle_m 7.5e+197)
            (*
             (*
              (* (* (cos (* PI (* 0.005555555555555556 angle_m))) t_0) PI)
              angle_m)
             0.011111111111111112)
            (* (* 0.011111111111111112 angle_m) (log (pow (exp PI) t_0))))))))
    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 = (b - a) * (a + b);
    	double tmp;
    	if (angle_m <= 1.2e+57) {
    		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
    	} else if (angle_m <= 7.5e+197) {
    		tmp = (((cos((((double) M_PI) * (0.005555555555555556 * angle_m))) * t_0) * ((double) M_PI)) * angle_m) * 0.011111111111111112;
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * log(pow(exp(((double) M_PI)), t_0));
    	}
    	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(b - a) * Float64(a + b))
    	tmp = 0.0
    	if (angle_m <= 1.2e+57)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
    	elseif (angle_m <= 7.5e+197)
    		tmp = Float64(Float64(Float64(Float64(cos(Float64(pi * Float64(0.005555555555555556 * angle_m))) * t_0) * pi) * angle_m) * 0.011111111111111112);
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * log((exp(pi) ^ t_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_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 1.2e+57], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 7.5e+197], N[(N[(N[(N[(N[Cos[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], t$95$0], $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(b - a\right) \cdot \left(a + b\right)\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 1.2 \cdot 10^{+57}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{elif}\;angle\_m \leq 7.5 \cdot 10^{+197}:\\
    \;\;\;\;\left(\left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right) \cdot t\_0\right) \cdot \pi\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{t\_0}\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if angle < 1.20000000000000002e57

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.9

          \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      10. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

      if 1.20000000000000002e57 < angle < 7.50000000000000046e197

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\left|\frac{angle}{180}\right| \cdot \left|\mathsf{PI}\left(\right)\right|} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        9. add-exp-logN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \left|\color{blue}{e^{\log \mathsf{PI}\left(\right)}}\right| + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        10. fabs-expN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left|\frac{angle}{180}\right| \cdot \color{blue}{e^{\log \mathsf{PI}\left(\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
        11. add-exp-logN/A

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{\frac{angle}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
        15. mult-flipN/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|\color{blue}{angle \cdot \frac{1}{180}}\right|, \mathsf{PI}\left(\right), \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \]
        16. metadata-evalN/A

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\left|0.005555555555555556 \cdot angle\right|, \pi, \frac{\color{blue}{\pi}}{2}\right)\right) \]
      3. Applied rewrites54.0%

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

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

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

      if 7.50000000000000046e197 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
        23. lower-+.f6436.1

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
      6. Applied rewrites36.1%

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

    Alternative 8: 63.9% accurate, 2.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 1.45 \cdot 10^{+75}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\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 1.45e+75)
        (fma
         (* -0.011111111111111112 a)
         (* (* angle_m PI) a)
         (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
        (*
         (* 0.011111111111111112 angle_m)
         (log (pow (exp PI) (* (- b a) (+ a b))))))))
    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.45e+75) {
    		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * log(pow(exp(((double) M_PI)), ((b - a) * (a + b))));
    	}
    	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.45e+75)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * log((exp(pi) ^ Float64(Float64(b - a) * Float64(a + b)))));
    	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.45e+75], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(a + b), $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 1.45 \cdot 10^{+75}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 1.4499999999999999e75

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.9

          \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      10. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

      if 1.4499999999999999e75 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
        23. lower-+.f6436.1

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]
      6. Applied rewrites36.1%

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

    Alternative 9: 63.7% accurate, 4.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 2 \cdot 10^{+16}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\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 2e+16)
        (fma
         (* -0.011111111111111112 a)
         (* (* angle_m PI) a)
         (* (* (* (* PI b) angle_m) 0.011111111111111112) b))
        (* (* 0.011111111111111112 angle_m) (* PI (* (+ b a) (- 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 tmp;
    	if (angle_m <= 2e+16) {
    		tmp = fma((-0.011111111111111112 * a), ((angle_m * ((double) M_PI)) * a), ((((((double) M_PI) * b) * angle_m) * 0.011111111111111112) * b));
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * ((b + a) * (b - a)));
    	}
    	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 <= 2e+16)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(angle_m * pi) * a), Float64(Float64(Float64(Float64(pi * b) * angle_m) * 0.011111111111111112) * b));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(Float64(b + a) * 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_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2e+16], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(N[(Pi * b), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $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 \cdot 10^{+16}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(angle\_m \cdot \pi\right) \cdot a, \left(\left(\left(\pi \cdot b\right) \cdot angle\_m\right) \cdot 0.011111111111111112\right) \cdot b\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 2e16

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{-1}{90} \cdot \left(a \cdot a\right), \pi \cdot angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.9

          \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      10. Applied rewrites53.9%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot \left(a \cdot a\right), \pi \cdot angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Step-by-step derivation
        1. lift-fma.f64N/A

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

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

      if 2e16 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.0000000000000001e302 < (pow.f64 a #s(literal 2 binary64))

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 58.0% 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 9 \cdot 10^{+151}:\\ \;\;\;\;\left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\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 9e+151)
        (* (* (* PI (+ a b)) (- b a)) (* 0.011111111111111112 angle_m))
        (* (* -0.011111111111111112 a) (* (* angle_m PI) a)))))
    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 <= 9e+151) {
    		tmp = ((((double) M_PI) * (a + b)) * (b - a)) * (0.011111111111111112 * angle_m);
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * 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 tmp;
    	if (a <= 9e+151) {
    		tmp = ((Math.PI * (a + b)) * (b - a)) * (0.011111111111111112 * angle_m);
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * 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):
    	tmp = 0
    	if a <= 9e+151:
    		tmp = ((math.pi * (a + b)) * (b - a)) * (0.011111111111111112 * angle_m)
    	else:
    		tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a)
    	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 <= 9e+151)
    		tmp = Float64(Float64(Float64(pi * Float64(a + b)) * Float64(b - a)) * Float64(0.011111111111111112 * angle_m));
    	else
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * 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)
    	tmp = 0.0;
    	if (a <= 9e+151)
    		tmp = ((pi * (a + b)) * (b - a)) * (0.011111111111111112 * angle_m);
    	else
    		tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * 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_] := N[(angle$95$s * If[LessEqual[a, 9e+151], N[(N[(N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(0.011111111111111112 * angle$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $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 9 \cdot 10^{+151}:\\
    \;\;\;\;\left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(0.011111111111111112 \cdot angle\_m\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 8.9999999999999997e151

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 8.9999999999999997e151 < a

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 57.3% 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 9.5 \cdot 10^{+153}:\\ \;\;\;\;\left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\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 9.5e+153)
        (* (* (* angle_m PI) 0.011111111111111112) (* (- b a) (+ a b)))
        (* (* -0.011111111111111112 a) (* (* angle_m PI) a)))))
    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 <= 9.5e+153) {
    		tmp = ((angle_m * ((double) M_PI)) * 0.011111111111111112) * ((b - a) * (a + b));
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * 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 tmp;
    	if (a <= 9.5e+153) {
    		tmp = ((angle_m * Math.PI) * 0.011111111111111112) * ((b - a) * (a + b));
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * 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):
    	tmp = 0
    	if a <= 9.5e+153:
    		tmp = ((angle_m * math.pi) * 0.011111111111111112) * ((b - a) * (a + b))
    	else:
    		tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a)
    	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 <= 9.5e+153)
    		tmp = Float64(Float64(Float64(angle_m * pi) * 0.011111111111111112) * Float64(Float64(b - a) * Float64(a + b)));
    	else
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * 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)
    	tmp = 0.0;
    	if (a <= 9.5e+153)
    		tmp = ((angle_m * pi) * 0.011111111111111112) * ((b - a) * (a + b));
    	else
    		tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * 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_] := N[(angle$95$s * If[LessEqual[a, 9.5e+153], N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $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 9.5 \cdot 10^{+153}:\\
    \;\;\;\;\left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 9.4999999999999995e153

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right) \cdot \left(\left(b - a\right) \cdot \left(a + \color{blue}{b}\right)\right) \]
        16. lower-+.f6454.7

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

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

      if 9.4999999999999995e153 < a

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 56.9% 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 9 \cdot 10^{+151}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\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 9e+151)
        (* (* (* 0.011111111111111112 angle_m) PI) (* (- b a) (+ a b)))
        (* (* -0.011111111111111112 a) (* (* angle_m PI) a)))))
    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 <= 9e+151) {
    		tmp = ((0.011111111111111112 * angle_m) * ((double) M_PI)) * ((b - a) * (a + b));
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * 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 tmp;
    	if (a <= 9e+151) {
    		tmp = ((0.011111111111111112 * angle_m) * Math.PI) * ((b - a) * (a + b));
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * 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):
    	tmp = 0
    	if a <= 9e+151:
    		tmp = ((0.011111111111111112 * angle_m) * math.pi) * ((b - a) * (a + b))
    	else:
    		tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a)
    	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 <= 9e+151)
    		tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * pi) * Float64(Float64(b - a) * Float64(a + b)));
    	else
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * 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)
    	tmp = 0.0;
    	if (a <= 9e+151)
    		tmp = ((0.011111111111111112 * angle_m) * pi) * ((b - a) * (a + b));
    	else
    		tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * 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_] := N[(angle$95$s * If[LessEqual[a, 9e+151], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $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 9 \cdot 10^{+151}:\\
    \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 8.9999999999999997e151

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}\right) \]
      6. Applied rewrites54.8%

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

      if 8.9999999999999997e151 < a

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        4. unpow2N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        7. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        8. lift-PI.f6435.6

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
      7. Applied rewrites35.6%

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
      8. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        5. lower-*.f6435.7

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      9. Applied rewrites35.7%

        \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
        9. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        11. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        12. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        13. lift-PI.f6438.9

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
      11. Applied rewrites38.9%

        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 14: 56.9% 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 9 \cdot 10^{+151}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\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 9e+151)
        (* (* 0.011111111111111112 angle_m) (* PI (* (+ b a) (- b a))))
        (* (* -0.011111111111111112 a) (* (* angle_m PI) a)))))
    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 <= 9e+151) {
    		tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * ((b + a) * (b - a)));
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * 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 tmp;
    	if (a <= 9e+151) {
    		tmp = (0.011111111111111112 * angle_m) * (Math.PI * ((b + a) * (b - a)));
    	} else {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * 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):
    	tmp = 0
    	if a <= 9e+151:
    		tmp = (0.011111111111111112 * angle_m) * (math.pi * ((b + a) * (b - a)))
    	else:
    		tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a)
    	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 <= 9e+151)
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(Float64(b + a) * Float64(b - a))));
    	else
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * 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)
    	tmp = 0.0;
    	if (a <= 9e+151)
    		tmp = (0.011111111111111112 * angle_m) * (pi * ((b + a) * (b - a)));
    	else
    		tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * 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_] := N[(angle$95$s * If[LessEqual[a, 9e+151], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $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 9 \cdot 10^{+151}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 8.9999999999999997e151

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
        8. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.7%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]

      if 8.9999999999999997e151 < a

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
        8. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.7%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        4. unpow2N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        7. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        8. lift-PI.f6435.6

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
      7. Applied rewrites35.6%

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
      8. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        5. lower-*.f6435.7

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      9. Applied rewrites35.7%

        \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
        9. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        11. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        12. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        13. lift-PI.f6438.9

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
      11. Applied rewrites38.9%

        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 15: 56.8% 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 -2 \cdot 10^{-247}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(b \cdot \left(b - a\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 (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -2e-247)
        (* (* -0.011111111111111112 a) (* (* angle_m PI) a))
        (* (* 0.011111111111111112 angle_m) (* PI (* 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 tmp;
    	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -2e-247) {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a);
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * (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 tmp;
    	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -2e-247) {
    		tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * a);
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * (Math.PI * (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):
    	tmp = 0
    	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -2e-247:
    		tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a)
    	else:
    		tmp = (0.011111111111111112 * angle_m) * (math.pi * (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)
    	tmp = 0.0
    	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -2e-247)
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(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)
    	tmp = 0.0;
    	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -2e-247)
    		tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * a);
    	else
    		tmp = (0.011111111111111112 * angle_m) * (pi * (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_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e-247], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(b * N[(b - a), $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}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -2 \cdot 10^{-247}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -2e-247

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
        8. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.7%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        4. unpow2N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        7. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        8. lift-PI.f6435.6

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
      7. Applied rewrites35.6%

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
      8. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        5. lower-*.f6435.7

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      9. Applied rewrites35.7%

        \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
        9. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        11. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        12. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        13. lift-PI.f6438.9

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
      11. Applied rewrites38.9%

        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]

      if -2e-247 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
        8. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.7%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Taylor expanded in a around 0

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      6. Step-by-step derivation
        1. Applied rewrites37.6%

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      7. Recombined 2 regimes into one program.
      8. Add Preprocessing

      Alternative 16: 56.8% 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 -2 \cdot 10^{-247}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\_m\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))) -2e-247)
          (* (* -0.011111111111111112 a) (* (* angle_m PI) a))
          (* (* (* PI (* b b)) angle_m) 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))) <= -2e-247) {
      		tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a);
      	} else {
      		tmp = ((((double) M_PI) * (b * b)) * angle_m) * 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))) <= -2e-247) {
      		tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * a);
      	} else {
      		tmp = ((Math.PI * (b * b)) * angle_m) * 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))) <= -2e-247:
      		tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a)
      	else:
      		tmp = ((math.pi * (b * b)) * angle_m) * 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))) <= -2e-247)
      		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a));
      	else
      		tmp = Float64(Float64(Float64(pi * Float64(b * b)) * angle_m) * 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))) <= -2e-247)
      		tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * a);
      	else
      		tmp = ((pi * (b * b)) * angle_m) * 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], -2e-247], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision] * angle$95$m), $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 -2 \cdot 10^{-247}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -2e-247

        1. Initial program 54.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          6. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
          7. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
          8. difference-of-squaresN/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          10. lower-+.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          11. lower--.f6454.7

            \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        4. Applied rewrites54.7%

          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        5. Taylor expanded in a around inf

          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        6. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          4. unpow2N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          7. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          8. lift-PI.f6435.6

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        7. Applied rewrites35.6%

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          5. lower-*.f6435.7

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        9. Applied rewrites35.7%

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        10. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          4. associate-*l*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          6. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          9. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          10. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          11. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          12. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          13. lift-PI.f6438.9

            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        11. Applied rewrites38.9%

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]

        if -2e-247 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 54.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          6. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
          7. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
          8. difference-of-squaresN/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          10. lower-+.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          11. lower--.f6454.7

            \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        4. Applied rewrites54.7%

          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        5. Taylor expanded in a around 0

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        6. Step-by-step derivation
          1. *-commutativeN/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. *-commutativeN/A

            \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
          5. *-commutativeN/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
          6. lower-*.f64N/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
          7. lift-PI.f64N/A

            \[\leadsto \left(\left(\pi \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
          8. pow2N/A

            \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
          9. lift-*.f6434.7

            \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
        7. Applied rewrites34.7%

          \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \color{blue}{0.011111111111111112} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 17: 38.9% accurate, 7.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}\;a \leq 8.8 \cdot 10^{-169}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\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 8.8e-169)
          (* (* -0.011111111111111112 (* a a)) (* PI angle_m))
          (* (* -0.011111111111111112 a) (* (* angle_m PI) a)))))
      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 <= 8.8e-169) {
      		tmp = (-0.011111111111111112 * (a * a)) * (((double) M_PI) * angle_m);
      	} else {
      		tmp = (-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * 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 tmp;
      	if (a <= 8.8e-169) {
      		tmp = (-0.011111111111111112 * (a * a)) * (Math.PI * angle_m);
      	} else {
      		tmp = (-0.011111111111111112 * a) * ((angle_m * Math.PI) * 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):
      	tmp = 0
      	if a <= 8.8e-169:
      		tmp = (-0.011111111111111112 * (a * a)) * (math.pi * angle_m)
      	else:
      		tmp = (-0.011111111111111112 * a) * ((angle_m * math.pi) * a)
      	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 <= 8.8e-169)
      		tmp = Float64(Float64(-0.011111111111111112 * Float64(a * a)) * Float64(pi * angle_m));
      	else
      		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * 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)
      	tmp = 0.0;
      	if (a <= 8.8e-169)
      		tmp = (-0.011111111111111112 * (a * a)) * (pi * angle_m);
      	else
      		tmp = (-0.011111111111111112 * a) * ((angle_m * pi) * 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_] := N[(angle$95$s * If[LessEqual[a, 8.8e-169], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $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 8.8 \cdot 10^{-169}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\_m\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 8.80000000000000029e-169

        1. Initial program 54.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          6. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
          7. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
          8. difference-of-squaresN/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          10. lower-+.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          11. lower--.f6454.7

            \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        4. Applied rewrites54.7%

          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        5. Taylor expanded in a around inf

          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        6. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          4. unpow2N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          7. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          8. lift-PI.f6435.6

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        7. Applied rewrites35.6%

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]

        if 8.80000000000000029e-169 < a

        1. Initial program 54.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          6. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
          7. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
          8. difference-of-squaresN/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          10. lower-+.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          11. lower--.f6454.7

            \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        4. Applied rewrites54.7%

          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        5. Taylor expanded in a around inf

          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        6. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          4. unpow2N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          7. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          8. lift-PI.f6435.6

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        7. Applied rewrites35.6%

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          5. lower-*.f6435.7

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        9. Applied rewrites35.7%

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        10. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          4. associate-*l*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          6. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          9. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          10. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          11. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          12. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          13. lift-PI.f6438.9

            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        11. Applied rewrites38.9%

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 38.1% accurate, 9.4× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\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) (* (* angle_m PI) a))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((-0.011111111111111112 * a) * ((angle_m * ((double) M_PI)) * a));
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((-0.011111111111111112 * a) * ((angle_m * Math.PI) * a));
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	return angle_s * ((-0.011111111111111112 * a) * ((angle_m * math.pi) * a))
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle_m * pi) * a)))
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b, angle_m)
      	tmp = angle_s * ((-0.011111111111111112 * a) * ((angle_m * pi) * a));
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle\_m \cdot \pi\right) \cdot a\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
        8. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.7

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.7%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        4. unpow2N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        7. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        8. lift-PI.f6435.6

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
      7. Applied rewrites35.6%

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
      8. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        5. lower-*.f6435.7

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      9. Applied rewrites35.7%

        \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
        9. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        11. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        12. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        13. lift-PI.f6438.9

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
      11. Applied rewrites38.9%

        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]
      12. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025132 
      (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)))))