ab-angle->ABCF B

Percentage Accurate: 53.7% → 67.3%
Time: 6.2s
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: 53.7% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;angle\_m \leq 4.6 \cdot 10^{+285}:\\
\;\;\;\;\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\log \left({\left(e^{\pi}\right)}^{0.005555555555555556}\right) \cdot angle\_m\right)\\

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


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

    1. Initial program 53.7%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. lower-neg.f6456.4

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6456.4

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
      8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.7999999999999999e29 < angle < 4.6000000000000001e285

    1. Initial program 53.7%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. lower-neg.f6456.4

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6456.4

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
      8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{180}\right)\right)\right) \cdot \cos \left(\log \left({\left(e^{\color{blue}{\pi}}\right)}^{\frac{1}{180}}\right) \cdot angle\right) \]
      9. lower-exp.f6457.3

        \[\leadsto \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\log \left({\color{blue}{\left(e^{\pi}\right)}}^{0.005555555555555556}\right) \cdot angle\right) \]
    9. Applied rewrites57.3%

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

    if 4.6000000000000001e285 < angle

    1. Initial program 53.7%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. lower-neg.f6456.4

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6456.4

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\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 \mathsf{fma}\left(-a, a, b \cdot b\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 \mathsf{fma}\left(-a, a, b \cdot b\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 \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180} + \frac{\color{blue}{\pi}}{2}\right) \]
      5. mult-flipN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\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 \pi} + \pi \cdot \frac{1}{2}\right) \]
      15. lower-fma.f6456.4

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \color{blue}{\frac{1}{2} \cdot \pi}\right)\right) \]
      18. lower-*.f6456.4

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

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

Alternative 2: 67.2% accurate, 1.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 2 \cdot 10^{+223}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+263}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot 1\\ \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 2e+223)
    (*
     (*
      (- b a)
      (* (* (+ a b) (sin (* (* 0.005555555555555556 angle_m) PI))) 2.0))
     (cos (* (* PI 0.005555555555555556) angle_m)))
    (if (<= a 4.5e+263)
      (* 0.011111111111111112 (* (+ b a) (* (* (- b a) PI) angle_m)))
      (*
       (*
        (* (- b a) (+ b a))
        (* 2.0 (sin (* (* angle_m PI) 0.005555555555555556))))
       1.0)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (a <= 2e+223) {
		tmp = ((b - a) * (((a + b) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) * 2.0)) * cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
	} else if (a <= 4.5e+263) {
		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * ((double) M_PI)) * angle_m));
	} else {
		tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * 1.0;
	}
	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 <= 2e+223) {
		tmp = ((b - a) * (((a + b) * Math.sin(((0.005555555555555556 * angle_m) * Math.PI))) * 2.0)) * Math.cos(((Math.PI * 0.005555555555555556) * angle_m));
	} else if (a <= 4.5e+263) {
		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * Math.PI) * angle_m));
	} else {
		tmp = (((b - a) * (b + a)) * (2.0 * Math.sin(((angle_m * Math.PI) * 0.005555555555555556)))) * 1.0;
	}
	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 <= 2e+223:
		tmp = ((b - a) * (((a + b) * math.sin(((0.005555555555555556 * angle_m) * math.pi))) * 2.0)) * math.cos(((math.pi * 0.005555555555555556) * angle_m))
	elif a <= 4.5e+263:
		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * math.pi) * angle_m))
	else:
		tmp = (((b - a) * (b + a)) * (2.0 * math.sin(((angle_m * math.pi) * 0.005555555555555556)))) * 1.0
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (a <= 2e+223)
		tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) * 2.0)) * cos(Float64(Float64(pi * 0.005555555555555556) * angle_m)));
	elseif (a <= 4.5e+263)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(Float64(Float64(b - a) * pi) * angle_m)));
	else
		tmp = Float64(Float64(Float64(Float64(b - a) * Float64(b + a)) * Float64(2.0 * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * 1.0);
	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 <= 2e+223)
		tmp = ((b - a) * (((a + b) * sin(((0.005555555555555556 * angle_m) * pi))) * 2.0)) * cos(((pi * 0.005555555555555556) * angle_m));
	elseif (a <= 4.5e+263)
		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * pi) * angle_m));
	else
		tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * pi) * 0.005555555555555556)))) * 1.0;
	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, 2e+223], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+263], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $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 2 \cdot 10^{+223}:\\
\;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{+263}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 2.00000000000000009e223

    1. Initial program 53.7%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. lower-neg.f6456.4

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6456.4

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
      8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000009e223 < a < 4.50000000000000014e263

    1. Initial program 53.7%

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

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

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

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

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

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
      7. lower-pow.f6450.3

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
    4. Applied rewrites50.3%

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
      3. lower-*.f6450.3

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot \color{blue}{angle}\right)\right) \]
      8. lower-*.f6462.2

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

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

    if 4.50000000000000014e263 < a

    1. Initial program 53.7%

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. lower-neg.f6456.4

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6456.4

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
      8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 66.9% accurate, 1.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}\;angle\_m \leq 2.6 \cdot 10^{-37}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\ \mathbf{elif}\;angle\_m \leq 1.55 \cdot 10^{+147}:\\ \;\;\;\;\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\ \end{array} \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (*
      angle_s
      (if (<= angle_m 2.6e-37)
        (* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
        (if (<= angle_m 1.55e+147)
          (*
           (*
            (* (- b a) (+ b a))
            (* 2.0 (sin (* (* angle_m PI) 0.005555555555555556))))
           (cos (* (* PI 0.005555555555555556) angle_m)))
          (*
           0.011111111111111112
           (* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (angle_m <= 2.6e-37) {
    		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
    	} else if (angle_m <= 1.55e+147) {
    		tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556)))) * cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
    	} else {
    		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (angle_m <= 2.6e-37) {
    		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
    	} else if (angle_m <= 1.55e+147) {
    		tmp = (((b - a) * (b + a)) * (2.0 * Math.sin(((angle_m * Math.PI) * 0.005555555555555556)))) * Math.cos(((Math.PI * 0.005555555555555556) * angle_m));
    	} else {
    		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b, angle_m):
    	tmp = 0
    	if angle_m <= 2.6e-37:
    		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi
    	elif angle_m <= 1.55e+147:
    		tmp = (((b - a) * (b + a)) * (2.0 * math.sin(((angle_m * math.pi) * 0.005555555555555556)))) * math.cos(((math.pi * 0.005555555555555556) * angle_m))
    	else:
    		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m)
    	return angle_s * tmp
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	tmp = 0.0
    	if (angle_m <= 2.6e-37)
    		tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi);
    	elseif (angle_m <= 1.55e+147)
    		tmp = Float64(Float64(Float64(Float64(b - a) * Float64(b + a)) * Float64(2.0 * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556)))) * cos(Float64(Float64(pi * 0.005555555555555556) * angle_m)));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m));
    	end
    	return Float64(angle_s * tmp)
    end
    
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp_2 = code(angle_s, a, b, angle_m)
    	tmp = 0.0;
    	if (angle_m <= 2.6e-37)
    		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi;
    	elseif (angle_m <= 1.55e+147)
    		tmp = (((b - a) * (b + a)) * (2.0 * sin(((angle_m * pi) * 0.005555555555555556)))) * cos(((pi * 0.005555555555555556) * angle_m));
    	else
    		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m);
    	end
    	tmp_2 = angle_s * tmp;
    end
    
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.6e-37], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 1.55e+147], N[(N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-37}:\\
    \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
    
    \mathbf{elif}\;angle\_m \leq 1.55 \cdot 10^{+147}:\\
    \;\;\;\;\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if angle < 2.5999999999999998e-37

      1. Initial program 53.7%

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
        7. lower-pow.f6450.3

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
      4. Applied rewrites50.3%

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

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

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
        3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
        12. lower-*.f6462.3

          \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
      8. Applied rewrites62.3%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot 0.011111111111111112\right) \cdot angle\right)\right) \cdot \pi \]
        13. lift-+.f64N/A

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

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

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

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

      if 2.5999999999999998e-37 < angle < 1.55e147

      1. Initial program 53.7%

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

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

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        8. lower-neg.f6456.4

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

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

          \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        11. lower-*.f6456.4

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
        8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.55e147 < angle

      1. Initial program 53.7%

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
        7. lower-pow.f6450.3

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
      4. Applied rewrites50.3%

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

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

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
        3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\frac{{b}^{2} - e^{\log a \cdot 2}}{b + a} \cdot b\right) \cdot \pi\right) \cdot angle\right) \]
          14. associate-*l/N/A

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

            \[\leadsto \frac{1}{90} \cdot \left(\left(\frac{\left({b}^{2} - e^{\log a \cdot 2}\right) \cdot b}{b + a} \cdot \pi\right) \cdot angle\right) \]
        3. Applied rewrites38.4%

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

      Alternative 4: 66.3% 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 := \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 6 \cdot 10^{+169}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\frac{1}{\frac{180}{angle\_m \cdot \pi}}\right)\right) \cdot t\_0\\ \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 (cos (* (* PI 0.005555555555555556) angle_m))))
         (*
          angle_s
          (if (<= angle_m 6e+169)
            (*
             (*
              (- b a)
              (* (* (+ a b) (sin (* (* 0.005555555555555556 angle_m) PI))) 2.0))
             t_0)
            (*
             (* (* 2.0 (fma (- a) a (* b b))) (sin (/ 1.0 (/ 180.0 (* angle_m 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 = cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
      	double tmp;
      	if (angle_m <= 6e+169) {
      		tmp = ((b - a) * (((a + b) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) * 2.0)) * t_0;
      	} else {
      		tmp = ((2.0 * fma(-a, a, (b * b))) * sin((1.0 / (180.0 / (angle_m * ((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 = cos(Float64(Float64(pi * 0.005555555555555556) * angle_m))
      	tmp = 0.0
      	if (angle_m <= 6e+169)
      		tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) * 2.0)) * t_0);
      	else
      		tmp = Float64(Float64(Float64(2.0 * fma(Float64(-a), a, Float64(b * b))) * sin(Float64(1.0 / Float64(180.0 / Float64(angle_m * 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[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 6e+169], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(N[(2.0 * N[((-a) * a + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1.0 / N[(180.0 / N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      \begin{array}{l}
      t_0 := \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;angle\_m \leq 6 \cdot 10^{+169}:\\
      \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\right) \cdot t\_0\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\frac{1}{\frac{180}{angle\_m \cdot \pi}}\right)\right) \cdot t\_0\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if angle < 5.9999999999999999e169

        1. Initial program 53.7%

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

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

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

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

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

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

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

            \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          8. lower-neg.f6456.4

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

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

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          11. lower-*.f6456.4

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
          8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.9999999999999999e169 < angle

        1. Initial program 53.7%

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

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

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

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

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

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

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

            \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          8. lower-neg.f6456.4

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

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

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          11. lower-*.f6456.4

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
          8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 66.1% accurate, 1.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}\;angle\_m \leq 3.2 \cdot 10^{-68}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\ \mathbf{elif}\;angle\_m \leq 4.3 \cdot 10^{+139}:\\ \;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \sin \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\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 3.2e-68)
          (* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
          (if (<= angle_m 4.3e+139)
            (*
             (*
              (cos (* -0.005555555555555556 (* angle_m PI)))
              (sin (* (* PI 0.005555555555555556) angle_m)))
             (* (* (+ b a) (- b a)) 2.0))
            (*
             0.011111111111111112
             (* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))
      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 <= 3.2e-68) {
      		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
      	} else if (angle_m <= 4.3e+139) {
      		tmp = (cos((-0.005555555555555556 * (angle_m * ((double) M_PI)))) * sin(((((double) M_PI) * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0);
      	} else {
      		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (angle_m <= 3.2e-68) {
      		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
      	} else if (angle_m <= 4.3e+139) {
      		tmp = (Math.cos((-0.005555555555555556 * (angle_m * Math.PI))) * Math.sin(((Math.PI * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0);
      	} else {
      		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if angle_m <= 3.2e-68:
      		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi
      	elif angle_m <= 4.3e+139:
      		tmp = (math.cos((-0.005555555555555556 * (angle_m * math.pi))) * math.sin(((math.pi * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0)
      	else:
      		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m)
      	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 <= 3.2e-68)
      		tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi);
      	elseif (angle_m <= 4.3e+139)
      		tmp = Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(angle_m * pi))) * sin(Float64(Float64(pi * 0.005555555555555556) * angle_m))) * Float64(Float64(Float64(b + a) * Float64(b - a)) * 2.0));
      	else
      		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b, angle_m)
      	tmp = 0.0;
      	if (angle_m <= 3.2e-68)
      		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi;
      	elseif (angle_m <= 4.3e+139)
      		tmp = (cos((-0.005555555555555556 * (angle_m * pi))) * sin(((pi * 0.005555555555555556) * angle_m))) * (((b + a) * (b - a)) * 2.0);
      	else
      		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m);
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 3.2e-68], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 4.3e+139], N[(N[(N[Cos[N[(-0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 3.2 \cdot 10^{-68}:\\
      \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
      
      \mathbf{elif}\;angle\_m \leq 4.3 \cdot 10^{+139}:\\
      \;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \sin \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot 2\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if angle < 3.1999999999999999e-68

        1. Initial program 53.7%

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

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
          7. lower-pow.f6450.3

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
        4. Applied rewrites50.3%

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

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

            \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
          3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
          12. lower-*.f6462.3

            \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
        8. Applied rewrites62.3%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot 0.011111111111111112\right) \cdot angle\right)\right) \cdot \pi \]
          13. lift-+.f64N/A

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

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

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

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

        if 3.1999999999999999e-68 < angle < 4.2999999999999998e139

        1. Initial program 53.7%

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

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

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

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

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

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

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

            \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          8. lower-neg.f6456.4

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

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

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          11. lower-*.f6456.4

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

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

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

        if 4.2999999999999998e139 < angle

        1. Initial program 53.7%

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

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
          7. lower-pow.f6450.3

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
        4. Applied rewrites50.3%

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

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

            \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
          3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\frac{{b}^{2} - e^{\log a \cdot 2}}{b + a} \cdot b\right) \cdot \pi\right) \cdot angle\right) \]
            14. associate-*l/N/A

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(\frac{\left({b}^{2} - e^{\log a \cdot 2}\right) \cdot b}{b + a} \cdot \pi\right) \cdot angle\right) \]
          3. Applied rewrites38.4%

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

        Alternative 6: 66.0% accurate, 1.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}\;angle\_m \leq 2.6 \cdot 10^{-37}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\ \mathbf{elif}\;angle\_m \leq 4.3 \cdot 10^{+139}:\\ \;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\ \end{array} \end{array} \]
        angle\_m = (fabs.f64 angle)
        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
        (FPCore (angle_s a b angle_m)
         :precision binary64
         (*
          angle_s
          (if (<= angle_m 2.6e-37)
            (* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
            (if (<= angle_m 4.3e+139)
              (*
               (*
                (cos (* -0.005555555555555556 (* angle_m PI)))
                (sin (* (* angle_m PI) 0.005555555555555556)))
               (* (* 2.0 (- b a)) (+ b a)))
              (*
               0.011111111111111112
               (* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))
        angle\_m = fabs(angle);
        angle\_s = copysign(1.0, angle);
        double code(double angle_s, double a, double b, double angle_m) {
        	double tmp;
        	if (angle_m <= 2.6e-37) {
        		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
        	} else if (angle_m <= 4.3e+139) {
        		tmp = (cos((-0.005555555555555556 * (angle_m * ((double) M_PI)))) * sin(((angle_m * ((double) M_PI)) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a));
        	} else {
        		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
        	}
        	return angle_s * tmp;
        }
        
        angle\_m = Math.abs(angle);
        angle\_s = Math.copySign(1.0, angle);
        public static double code(double angle_s, double a, double b, double angle_m) {
        	double tmp;
        	if (angle_m <= 2.6e-37) {
        		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
        	} else if (angle_m <= 4.3e+139) {
        		tmp = (Math.cos((-0.005555555555555556 * (angle_m * Math.PI))) * Math.sin(((angle_m * Math.PI) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a));
        	} else {
        		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
        	}
        	return angle_s * tmp;
        }
        
        angle\_m = math.fabs(angle)
        angle\_s = math.copysign(1.0, angle)
        def code(angle_s, a, b, angle_m):
        	tmp = 0
        	if angle_m <= 2.6e-37:
        		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi
        	elif angle_m <= 4.3e+139:
        		tmp = (math.cos((-0.005555555555555556 * (angle_m * math.pi))) * math.sin(((angle_m * math.pi) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a))
        	else:
        		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m)
        	return angle_s * tmp
        
        angle\_m = abs(angle)
        angle\_s = copysign(1.0, angle)
        function code(angle_s, a, b, angle_m)
        	tmp = 0.0
        	if (angle_m <= 2.6e-37)
        		tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi);
        	elseif (angle_m <= 4.3e+139)
        		tmp = Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(angle_m * pi))) * sin(Float64(Float64(angle_m * pi) * 0.005555555555555556))) * Float64(Float64(2.0 * Float64(b - a)) * Float64(b + a)));
        	else
        		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m));
        	end
        	return Float64(angle_s * tmp)
        end
        
        angle\_m = abs(angle);
        angle\_s = sign(angle) * abs(1.0);
        function tmp_2 = code(angle_s, a, b, angle_m)
        	tmp = 0.0;
        	if (angle_m <= 2.6e-37)
        		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi;
        	elseif (angle_m <= 4.3e+139)
        		tmp = (cos((-0.005555555555555556 * (angle_m * pi))) * sin(((angle_m * pi) * 0.005555555555555556))) * ((2.0 * (b - a)) * (b + a));
        	else
        		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m);
        	end
        	tmp_2 = angle_s * tmp;
        end
        
        angle\_m = N[Abs[angle], $MachinePrecision]
        angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.6e-37], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 4.3e+139], N[(N[(N[Cos[N[(-0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
        
        \begin{array}{l}
        angle\_m = \left|angle\right|
        \\
        angle\_s = \mathsf{copysign}\left(1, angle\right)
        
        \\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;angle\_m \leq 2.6 \cdot 10^{-37}:\\
        \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
        
        \mathbf{elif}\;angle\_m \leq 4.3 \cdot 10^{+139}:\\
        \;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if angle < 2.5999999999999998e-37

          1. Initial program 53.7%

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

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
            7. lower-pow.f6450.3

              \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
          4. Applied rewrites50.3%

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
            3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
            12. lower-*.f6462.3

              \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
          8. Applied rewrites62.3%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot 0.011111111111111112\right) \cdot angle\right)\right) \cdot \pi \]
            13. lift-+.f64N/A

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

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

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

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

          if 2.5999999999999998e-37 < angle < 4.2999999999999998e139

          1. Initial program 53.7%

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

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

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

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

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

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

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

              \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            8. lower-neg.f6456.4

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

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

              \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            11. lower-*.f6456.4

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

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

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

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

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

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

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

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

              \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
            8. lower-*.f6456.1

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

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

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

          if 4.2999999999999998e139 < angle

          1. Initial program 53.7%

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

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
            7. lower-pow.f6450.3

              \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
          4. Applied rewrites50.3%

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
            3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\frac{{b}^{2} - e^{\log a \cdot 2}}{b + a} \cdot b\right) \cdot \pi\right) \cdot angle\right) \]
              14. associate-*l/N/A

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(\frac{\left({b}^{2} - e^{\log a \cdot 2}\right) \cdot b}{b + a} \cdot \pi\right) \cdot angle\right) \]
            3. Applied rewrites38.4%

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

          Alternative 7: 65.9% accurate, 2.0× speedup?

          \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 3.2 \cdot 10^{-68}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\ \mathbf{elif}\;angle\_m \leq 1.8 \cdot 10^{+147}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\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 3.2e-68)
              (* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
              (if (<= angle_m 1.8e+147)
                (*
                 (* (+ b a) (- b a))
                 (sin (* 2.0 (* (* PI 0.005555555555555556) angle_m))))
                (*
                 0.011111111111111112
                 (* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m))))))
          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 <= 3.2e-68) {
          		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
          	} else if (angle_m <= 1.8e+147) {
          		tmp = ((b + a) * (b - a)) * sin((2.0 * ((((double) M_PI) * 0.005555555555555556) * angle_m)));
          	} else {
          		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
          	}
          	return angle_s * tmp;
          }
          
          angle\_m = Math.abs(angle);
          angle\_s = Math.copySign(1.0, angle);
          public static double code(double angle_s, double a, double b, double angle_m) {
          	double tmp;
          	if (angle_m <= 3.2e-68) {
          		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
          	} else if (angle_m <= 1.8e+147) {
          		tmp = ((b + a) * (b - a)) * Math.sin((2.0 * ((Math.PI * 0.005555555555555556) * angle_m)));
          	} else {
          		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
          	}
          	return angle_s * tmp;
          }
          
          angle\_m = math.fabs(angle)
          angle\_s = math.copysign(1.0, angle)
          def code(angle_s, a, b, angle_m):
          	tmp = 0
          	if angle_m <= 3.2e-68:
          		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi
          	elif angle_m <= 1.8e+147:
          		tmp = ((b + a) * (b - a)) * math.sin((2.0 * ((math.pi * 0.005555555555555556) * angle_m)))
          	else:
          		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m)
          	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 <= 3.2e-68)
          		tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi);
          	elseif (angle_m <= 1.8e+147)
          		tmp = Float64(Float64(Float64(b + a) * Float64(b - a)) * sin(Float64(2.0 * Float64(Float64(pi * 0.005555555555555556) * angle_m))));
          	else
          		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m));
          	end
          	return Float64(angle_s * tmp)
          end
          
          angle\_m = abs(angle);
          angle\_s = sign(angle) * abs(1.0);
          function tmp_2 = code(angle_s, a, b, angle_m)
          	tmp = 0.0;
          	if (angle_m <= 3.2e-68)
          		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi;
          	elseif (angle_m <= 1.8e+147)
          		tmp = ((b + a) * (b - a)) * sin((2.0 * ((pi * 0.005555555555555556) * angle_m)));
          	else
          		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m);
          	end
          	tmp_2 = angle_s * tmp;
          end
          
          angle\_m = N[Abs[angle], $MachinePrecision]
          angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 3.2e-68], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], If[LessEqual[angle$95$m, 1.8e+147], N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 3.2 \cdot 10^{-68}:\\
          \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
          
          \mathbf{elif}\;angle\_m \leq 1.8 \cdot 10^{+147}:\\
          \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if angle < 3.1999999999999999e-68

            1. Initial program 53.7%

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

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

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

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

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

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
              7. lower-pow.f6450.3

                \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
            4. Applied rewrites50.3%

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

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
              3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
              12. lower-*.f6462.3

                \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
            8. Applied rewrites62.3%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot 0.011111111111111112\right) \cdot angle\right)\right) \cdot \pi \]
              13. lift-+.f64N/A

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

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

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

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

            if 3.1999999999999999e-68 < angle < 1.8000000000000001e147

            1. Initial program 53.7%

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

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

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

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

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

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

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

                \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              8. lower-neg.f6456.4

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

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

                \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              11. lower-*.f6456.4

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

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

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

            if 1.8000000000000001e147 < angle

            1. Initial program 53.7%

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

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

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

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

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

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
              7. lower-pow.f6450.3

                \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
            4. Applied rewrites50.3%

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

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
              3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\frac{{b}^{2} - e^{\log a \cdot 2}}{b + a} \cdot b\right) \cdot \pi\right) \cdot angle\right) \]
                14. associate-*l/N/A

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\frac{\left({b}^{2} - e^{\log a \cdot 2}\right) \cdot b}{b + a} \cdot \pi\right) \cdot angle\right) \]
              3. Applied rewrites38.4%

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

            Alternative 8: 65.8% accurate, 1.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}\;angle\_m \leq 4.3 \cdot 10^{+139}:\\ \;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\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 4.3e+139)
                (*
                 (* (cos (* -0.005555555555555556 (* PI angle_m))) (- b a))
                 (* (* (+ a b) (sin (* (* 0.005555555555555556 angle_m) PI))) 2.0))
                (*
                 0.011111111111111112
                 (* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m)))))
            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 <= 4.3e+139) {
            		tmp = (cos((-0.005555555555555556 * (((double) M_PI) * angle_m))) * (b - a)) * (((a + b) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) * 2.0);
            	} else {
            		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
            	}
            	return angle_s * tmp;
            }
            
            angle\_m = Math.abs(angle);
            angle\_s = Math.copySign(1.0, angle);
            public static double code(double angle_s, double a, double b, double angle_m) {
            	double tmp;
            	if (angle_m <= 4.3e+139) {
            		tmp = (Math.cos((-0.005555555555555556 * (Math.PI * angle_m))) * (b - a)) * (((a + b) * Math.sin(((0.005555555555555556 * angle_m) * Math.PI))) * 2.0);
            	} else {
            		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
            	}
            	return angle_s * tmp;
            }
            
            angle\_m = math.fabs(angle)
            angle\_s = math.copysign(1.0, angle)
            def code(angle_s, a, b, angle_m):
            	tmp = 0
            	if angle_m <= 4.3e+139:
            		tmp = (math.cos((-0.005555555555555556 * (math.pi * angle_m))) * (b - a)) * (((a + b) * math.sin(((0.005555555555555556 * angle_m) * math.pi))) * 2.0)
            	else:
            		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m)
            	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 <= 4.3e+139)
            		tmp = Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle_m))) * Float64(b - a)) * Float64(Float64(Float64(a + b) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) * 2.0));
            	else
            		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m));
            	end
            	return Float64(angle_s * tmp)
            end
            
            angle\_m = abs(angle);
            angle\_s = sign(angle) * abs(1.0);
            function tmp_2 = code(angle_s, a, b, angle_m)
            	tmp = 0.0;
            	if (angle_m <= 4.3e+139)
            		tmp = (cos((-0.005555555555555556 * (pi * angle_m))) * (b - a)) * (((a + b) * sin(((0.005555555555555556 * angle_m) * pi))) * 2.0);
            	else
            		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m);
            	end
            	tmp_2 = angle_s * tmp;
            end
            
            angle\_m = N[Abs[angle], $MachinePrecision]
            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 4.3e+139], N[(N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 4.3 \cdot 10^{+139}:\\
            \;\;\;\;\left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\left(\left(a + b\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right) \cdot 2\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 4.2999999999999998e139

              1. Initial program 53.7%

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                8. lower-neg.f6456.4

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

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

                  \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, \color{blue}{b \cdot b}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                11. lower-*.f6456.4

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\left(\pi \cdot \frac{1}{180}\right) \cdot angle\right)} \]
                8. lower-*.f6456.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 4.2999999999999998e139 < angle

              1. Initial program 53.7%

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

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

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

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\frac{{b}^{2} - e^{\log a \cdot 2}}{b + a} \cdot b\right) \cdot \pi\right) \cdot angle\right) \]
                  14. associate-*l/N/A

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

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\frac{\left({b}^{2} - e^{\log a \cdot 2}\right) \cdot b}{b + a} \cdot \pi\right) \cdot angle\right) \]
                3. Applied rewrites38.4%

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

              Alternative 9: 63.7% accurate, 3.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 1.85 \cdot 10^{+81}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\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.85e+81)
                  (* (* (- b a) (* (* (+ a b) 0.011111111111111112) angle_m)) PI)
                  (*
                   0.011111111111111112
                   (* (* (/ (* (* (- b a) (+ a b)) b) (+ a b)) PI) angle_m)))))
              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.85e+81) {
              		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * ((double) M_PI);
              	} else {
              		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * ((double) M_PI)) * angle_m);
              	}
              	return angle_s * tmp;
              }
              
              angle\_m = Math.abs(angle);
              angle\_s = Math.copySign(1.0, angle);
              public static double code(double angle_s, double a, double b, double angle_m) {
              	double tmp;
              	if (angle_m <= 1.85e+81) {
              		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * Math.PI;
              	} else {
              		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * Math.PI) * angle_m);
              	}
              	return angle_s * tmp;
              }
              
              angle\_m = math.fabs(angle)
              angle\_s = math.copysign(1.0, angle)
              def code(angle_s, a, b, angle_m):
              	tmp = 0
              	if angle_m <= 1.85e+81:
              		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * math.pi
              	else:
              		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * math.pi) * angle_m)
              	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.85e+81)
              		tmp = Float64(Float64(Float64(b - a) * Float64(Float64(Float64(a + b) * 0.011111111111111112) * angle_m)) * pi);
              	else
              		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(Float64(Float64(b - a) * Float64(a + b)) * b) / Float64(a + b)) * pi) * angle_m));
              	end
              	return Float64(angle_s * tmp)
              end
              
              angle\_m = abs(angle);
              angle\_s = sign(angle) * abs(1.0);
              function tmp_2 = code(angle_s, a, b, angle_m)
              	tmp = 0.0;
              	if (angle_m <= 1.85e+81)
              		tmp = ((b - a) * (((a + b) * 0.011111111111111112) * angle_m)) * pi;
              	else
              		tmp = 0.011111111111111112 * ((((((b - a) * (a + b)) * b) / (a + b)) * pi) * angle_m);
              	end
              	tmp_2 = angle_s * tmp;
              end
              
              angle\_m = N[Abs[angle], $MachinePrecision]
              angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1.85e+81], N[(N[(N[(b - a), $MachinePrecision] * N[(N[(N[(a + b), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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.85 \cdot 10^{+81}:\\
              \;\;\;\;\left(\left(b - a\right) \cdot \left(\left(\left(a + b\right) \cdot 0.011111111111111112\right) \cdot angle\_m\right)\right) \cdot \pi\\
              
              \mathbf{else}:\\
              \;\;\;\;0.011111111111111112 \cdot \left(\left(\frac{\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot b}{a + b} \cdot \pi\right) \cdot angle\_m\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if angle < 1.85e81

                1. Initial program 53.7%

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

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

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

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

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

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                  7. lower-pow.f6450.3

                    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                4. Applied rewrites50.3%

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

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

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                  12. lower-*.f6462.3

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                8. Applied rewrites62.3%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot 0.011111111111111112\right) \cdot angle\right)\right) \cdot \pi \]
                  13. lift-+.f64N/A

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

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

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

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

                if 1.85e81 < angle

                1. Initial program 53.7%

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

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

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

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

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

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                  7. lower-pow.f6450.3

                    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                4. Applied rewrites50.3%

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

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

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\frac{{b}^{2} - e^{\log a \cdot 2}}{b + a} \cdot b\right) \cdot \pi\right) \cdot angle\right) \]
                    14. associate-*l/N/A

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

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\frac{\left({b}^{2} - e^{\log a \cdot 2}\right) \cdot b}{b + a} \cdot \pi\right) \cdot angle\right) \]
                  3. Applied rewrites38.4%

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

                Alternative 10: 63.7% accurate, 5.5× speedup?

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

                  1. Initial program 53.7%

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

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

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

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot 0.011111111111111112\right) \cdot angle\right)\right) \cdot \pi \]
                    13. lift-+.f64N/A

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

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

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

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

                  if 2.00000000000000013e-37 < angle

                  1. Initial program 53.7%

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

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

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

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

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

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

                      \[\leadsto \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. lower-*.f6450.3

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

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

                Alternative 11: 63.5% accurate, 5.5× speedup?

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

                  1. Initial program 53.7%

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

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

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

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

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

                  if 4.50000000000000009e-69 < angle

                  1. Initial program 53.7%

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

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

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

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
                    5. lift-pow.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right) \]
                    6. pow2N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
                    7. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
                    8. lower--.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{{a}^{2}}\right)\right) \]
                    9. lift-pow.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {a}^{\color{blue}{2}}\right)\right) \]
                    10. 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) \]
                    11. fp-cancel-sub-signN/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot a}\right)\right) \]
                    12. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot a\right)\right) \]
                    13. lift-neg.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \left(-a\right) \cdot a\right)\right) \]
                    14. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \left(-a\right) \cdot \color{blue}{a}\right)\right) \]
                    15. lift-fma.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, \color{blue}{b}, \left(-a\right) \cdot a\right)\right) \]
                    16. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right)} \]
                    17. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right)} \]
                    18. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \mathsf{fma}\left(\color{blue}{b}, b, \left(-a\right) \cdot a\right) \]
                    19. lower-*.f6452.7

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right) \]
                    20. lift-fma.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(b \cdot b + \color{blue}{\left(-a\right) \cdot a}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 12: 63.4% accurate, 5.5× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 4.6 \cdot 10^{-69}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\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 4.6e-69)
                    (* 0.011111111111111112 (* (+ b a) (* (* (- b a) PI) angle_m)))
                    (* (* (* 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 <= 4.6e-69) {
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * ((double) M_PI)) * angle_m));
                	} else {
                		tmp = ((0.011111111111111112 * angle_m) * ((double) M_PI)) * ((b + a) * (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 (angle_m <= 4.6e-69) {
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * Math.PI) * angle_m));
                	} else {
                		tmp = ((0.011111111111111112 * angle_m) * Math.PI) * ((b + a) * (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 angle_m <= 4.6e-69:
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * math.pi) * angle_m))
                	else:
                		tmp = ((0.011111111111111112 * angle_m) * math.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 <= 4.6e-69)
                		tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(Float64(Float64(b - a) * pi) * angle_m)));
                	else
                		tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * pi) * Float64(Float64(b + a) * 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 (angle_m <= 4.6e-69)
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * pi) * angle_m));
                	else
                		tmp = ((0.011111111111111112 * angle_m) * pi) * ((b + a) * (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[angle$95$m, 4.6e-69], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;angle\_m \leq 4.6 \cdot 10^{-69}:\\
                \;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \pi\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if angle < 4.6000000000000001e-69

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right) \cdot angle\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                    6. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot \color{blue}{angle}\right)\right) \]
                    8. lower-*.f6462.2

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)\right) \]
                  8. Applied rewrites62.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]

                  if 4.6000000000000001e-69 < angle

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
                    5. lift-pow.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right) \]
                    6. pow2N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
                    7. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
                    8. lower--.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{{a}^{2}}\right)\right) \]
                    9. lift-pow.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {a}^{\color{blue}{2}}\right)\right) \]
                    10. 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) \]
                    11. fp-cancel-sub-signN/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot a}\right)\right) \]
                    12. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot a\right)\right) \]
                    13. lift-neg.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \left(-a\right) \cdot a\right)\right) \]
                    14. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b + \left(-a\right) \cdot \color{blue}{a}\right)\right) \]
                    15. lift-fma.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \mathsf{fma}\left(b, \color{blue}{b}, \left(-a\right) \cdot a\right)\right) \]
                    16. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right)} \]
                    17. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right)} \]
                    18. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \mathsf{fma}\left(\color{blue}{b}, b, \left(-a\right) \cdot a\right) \]
                    19. lower-*.f6452.7

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right) \]
                    20. lift-fma.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(b \cdot b + \color{blue}{\left(-a\right) \cdot a}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 13: 63.4% accurate, 5.5× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 4.6 \cdot 10^{-69}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\_m\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 4.6e-69)
                    (* 0.011111111111111112 (* (+ b a) (* (* (- b a) PI) angle_m)))
                    (* 0.011111111111111112 (* (* (* (+ b a) (- b a)) PI) angle_m)))))
                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 <= 4.6e-69) {
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * ((double) M_PI)) * angle_m));
                	} else {
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * ((double) M_PI)) * angle_m);
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b, double angle_m) {
                	double tmp;
                	if (angle_m <= 4.6e-69) {
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * Math.PI) * angle_m));
                	} else {
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * Math.PI) * angle_m);
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	tmp = 0
                	if angle_m <= 4.6e-69:
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * math.pi) * angle_m))
                	else:
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * math.pi) * angle_m)
                	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 <= 4.6e-69)
                		tmp = Float64(0.011111111111111112 * Float64(Float64(b + a) * Float64(Float64(Float64(b - a) * pi) * angle_m)));
                	else
                		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(b + a) * Float64(b - a)) * pi) * angle_m));
                	end
                	return Float64(angle_s * tmp)
                end
                
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp_2 = code(angle_s, a, b, angle_m)
                	tmp = 0.0;
                	if (angle_m <= 4.6e-69)
                		tmp = 0.011111111111111112 * ((b + a) * (((b - a) * pi) * angle_m));
                	else
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * pi) * angle_m);
                	end
                	tmp_2 = angle_s * tmp;
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 4.6e-69], N[(0.011111111111111112 * N[(N[(b + a), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $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 4.6 \cdot 10^{-69}:\\
                \;\;\;\;0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\_m\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\_m\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if angle < 4.6000000000000001e-69

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right) \cdot angle\right) \]
                    5. associate-*l*N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                    6. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot \color{blue}{angle}\right)\right) \]
                    8. lower-*.f6462.2

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)\right) \]
                  8. Applied rewrites62.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]

                  if 4.6000000000000001e-69 < angle

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 14: 62.6% 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 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+148}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\right)\\ \end{array} \end{array} \end{array} \]
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b angle_m)
                 :precision binary64
                 (let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
                   (*
                    angle_s
                    (if (<= t_0 (- INFINITY))
                      (* (* 0.011111111111111112 (* a angle_m)) (* (- b a) PI))
                      (if (<= t_0 2e+148)
                        (* 0.011111111111111112 (* (* (* (+ b a) (- b a)) PI) angle_m))
                        (* (* (* 0.011111111111111112 angle_m) (+ b a)) (* b PI)))))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	double t_0 = 2.0 * (pow(b, 2.0) - pow(a, 2.0));
                	double tmp;
                	if (t_0 <= -((double) INFINITY)) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * ((double) M_PI));
                	} else if (t_0 <= 2e+148) {
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * ((double) M_PI)) * angle_m);
                	} else {
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * ((double) M_PI));
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b, double angle_m) {
                	double t_0 = 2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0));
                	double tmp;
                	if (t_0 <= -Double.POSITIVE_INFINITY) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * Math.PI);
                	} else if (t_0 <= 2e+148) {
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * Math.PI) * angle_m);
                	} else {
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * Math.PI);
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	t_0 = 2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))
                	tmp = 0
                	if t_0 <= -math.inf:
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * math.pi)
                	elif t_0 <= 2e+148:
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * math.pi) * angle_m)
                	else:
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * math.pi)
                	return angle_s * tmp
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	t_0 = Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0)))
                	tmp = 0.0
                	if (t_0 <= Float64(-Inf))
                		tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * Float64(Float64(b - a) * pi));
                	elseif (t_0 <= 2e+148)
                		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(Float64(b + a) * Float64(b - a)) * pi) * angle_m));
                	else
                		tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(b + a)) * Float64(b * pi));
                	end
                	return Float64(angle_s * tmp)
                end
                
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp_2 = code(angle_s, a, b, angle_m)
                	t_0 = 2.0 * ((b ^ 2.0) - (a ^ 2.0));
                	tmp = 0.0;
                	if (t_0 <= -Inf)
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * pi);
                	elseif (t_0 <= 2e+148)
                		tmp = 0.011111111111111112 * ((((b + a) * (b - a)) * pi) * angle_m);
                	else
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * pi);
                	end
                	tmp_2 = angle_s * tmp;
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+148], N[(0.011111111111111112 * N[(N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                \begin{array}{l}
                t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;t\_0 \leq -\infty:\\
                \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\
                
                \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+148}:\\
                \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\_m\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\right)\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -inf.0

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)}\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \]
                    7. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                  9. Taylor expanded in a around inf

                    \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - \color{blue}{a}\right) \cdot \pi\right) \]
                    2. lower-*.f6439.3

                      \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right) \]
                  11. Applied rewrites39.3%

                    \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]

                  if -inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 2.0000000000000001e148

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]

                  if 2.0000000000000001e148 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)}\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \]
                    7. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                  9. Taylor expanded in a around 0

                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) \]
                    2. lower-PI.f6442.1

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\right) \]
                  11. Applied rewrites42.1%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \color{blue}{\pi}\right) \]
                3. Recombined 3 regimes into one program.
                4. Add Preprocessing

                Alternative 15: 60.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 10^{-288}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\right)\\ \end{array} \end{array} \]
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b angle_m)
                 :precision binary64
                 (*
                  angle_s
                  (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-288)
                    (* (* 0.011111111111111112 (* a angle_m)) (* (- b a) PI))
                    (* (* (* 0.011111111111111112 angle_m) (+ b a)) (* b 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 ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e-288) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * ((double) M_PI));
                	} else {
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * ((double) M_PI));
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b, double angle_m) {
                	double tmp;
                	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= 1e-288) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * Math.PI);
                	} else {
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * Math.PI);
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	tmp = 0
                	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= 1e-288:
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * math.pi)
                	else:
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * math.pi)
                	return angle_s * tmp
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	tmp = 0.0
                	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e-288)
                		tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * Float64(Float64(b - a) * pi));
                	else
                		tmp = Float64(Float64(Float64(0.011111111111111112 * angle_m) * Float64(b + a)) * Float64(b * pi));
                	end
                	return Float64(angle_s * tmp)
                end
                
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp_2 = code(angle_s, a, b, angle_m)
                	tmp = 0.0;
                	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= 1e-288)
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * pi);
                	else
                		tmp = ((0.011111111111111112 * angle_m) * (b + a)) * (b * pi);
                	end
                	tmp_2 = angle_s * tmp;
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-288], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-288}:\\
                \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\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)))) < 1.00000000000000006e-288

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)}\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \]
                    7. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                  9. Taylor expanded in a around inf

                    \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - \color{blue}{a}\right) \cdot \pi\right) \]
                    2. lower-*.f6439.3

                      \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right) \]
                  11. Applied rewrites39.3%

                    \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]

                  if 1.00000000000000006e-288 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)}\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \]
                    7. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                  9. Taylor expanded in a around 0

                    \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) \]
                    2. lower-PI.f6442.1

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \pi\right) \]
                  11. Applied rewrites42.1%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b \cdot \color{blue}{\pi}\right) \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 16: 60.8% accurate, 2.1× 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 \pi\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-288}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot b\right)\right) \cdot t\_0\\ \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) PI)))
                   (*
                    angle_s
                    (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) 1e-288)
                      (* (* 0.011111111111111112 (* a angle_m)) t_0)
                      (* (* 0.011111111111111112 (* angle_m b)) 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) * ((double) M_PI);
                	double tmp;
                	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= 1e-288) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * t_0;
                	} else {
                		tmp = (0.011111111111111112 * (angle_m * b)) * t_0;
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b, double angle_m) {
                	double t_0 = (b - a) * Math.PI;
                	double tmp;
                	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= 1e-288) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * t_0;
                	} else {
                		tmp = (0.011111111111111112 * (angle_m * b)) * t_0;
                	}
                	return angle_s * tmp;
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	t_0 = (b - a) * math.pi
                	tmp = 0
                	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= 1e-288:
                		tmp = (0.011111111111111112 * (a * angle_m)) * t_0
                	else:
                		tmp = (0.011111111111111112 * (angle_m * b)) * 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) * pi)
                	tmp = 0.0
                	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= 1e-288)
                		tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * t_0);
                	else
                		tmp = Float64(Float64(0.011111111111111112 * Float64(angle_m * b)) * t_0);
                	end
                	return Float64(angle_s * tmp)
                end
                
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp_2 = code(angle_s, a, b, angle_m)
                	t_0 = (b - a) * pi;
                	tmp = 0.0;
                	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= 1e-288)
                		tmp = (0.011111111111111112 * (a * angle_m)) * t_0;
                	else
                		tmp = (0.011111111111111112 * (angle_m * b)) * t_0;
                	end
                	tmp_2 = angle_s * tmp;
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-288], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(0.011111111111111112 * N[(angle$95$m * b), $MachinePrecision]), $MachinePrecision] * t$95$0), $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 \pi\\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq 10^{-288}:\\
                \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot t\_0\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(0.011111111111111112 \cdot \left(angle\_m \cdot b\right)\right) \cdot t\_0\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.00000000000000006e-288

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)}\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \]
                    7. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                  9. Taylor expanded in a around inf

                    \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - \color{blue}{a}\right) \cdot \pi\right) \]
                    2. lower-*.f6439.3

                      \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right) \]
                  11. Applied rewrites39.3%

                    \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]

                  if 1.00000000000000006e-288 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)}\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \]
                    7. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                  9. Taylor expanded in a around 0

                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot b\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot b\right)\right) \cdot \left(\left(b - \color{blue}{a}\right) \cdot \pi\right) \]
                    2. lower-*.f6440.5

                      \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot b\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right) \]
                  11. Applied rewrites40.5%

                    \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot b\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 17: 60.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 10^{-288}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\_m\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))) 1e-288)
                    (* (* 0.011111111111111112 (* a angle_m)) (* (- b a) PI))
                    (* 0.011111111111111112 (* b (* (* PI (- b a)) angle_m))))))
                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))) <= 1e-288) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * ((double) M_PI));
                	} else {
                		tmp = 0.011111111111111112 * (b * ((((double) M_PI) * (b - a)) * angle_m));
                	}
                	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))) <= 1e-288) {
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * Math.PI);
                	} else {
                		tmp = 0.011111111111111112 * (b * ((Math.PI * (b - a)) * angle_m));
                	}
                	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))) <= 1e-288:
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * math.pi)
                	else:
                		tmp = 0.011111111111111112 * (b * ((math.pi * (b - a)) * angle_m))
                	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))) <= 1e-288)
                		tmp = Float64(Float64(0.011111111111111112 * Float64(a * angle_m)) * Float64(Float64(b - a) * pi));
                	else
                		tmp = Float64(0.011111111111111112 * Float64(b * Float64(Float64(pi * Float64(b - a)) * angle_m)));
                	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))) <= 1e-288)
                		tmp = (0.011111111111111112 * (a * angle_m)) * ((b - a) * pi);
                	else
                		tmp = 0.011111111111111112 * (b * ((pi * (b - a)) * angle_m));
                	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], 1e-288], N[(N[(0.011111111111111112 * N[(a * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b * N[(N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision] * angle$95$m), $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 10^{-288}:\\
                \;\;\;\;\left(0.011111111111111112 \cdot \left(a \cdot angle\_m\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\_m\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)))) < 1.00000000000000006e-288

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)}\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \]
                    7. associate-*l*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)}\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(\color{blue}{b} - a\right) \cdot \pi\right) \]
                    12. lower-*.f6462.3

                      \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right) \]
                  8. Applied rewrites62.3%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \pi\right)} \]
                  9. Taylor expanded in a around inf

                    \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]
                  10. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - \color{blue}{a}\right) \cdot \pi\right) \]
                    2. lower-*.f6439.3

                      \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\left(b - a\right) \cdot \pi\right) \]
                  11. Applied rewrites39.3%

                    \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot angle\right)\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \pi\right) \]

                  if 1.00000000000000006e-288 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Taylor expanded in a around 0

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                  8. Step-by-step derivation
                    1. Applied rewrites37.9%

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                      4. associate-*l*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \left(\left(b - a\right) \cdot \pi\right)\right) \cdot angle\right) \]
                      5. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \left(\left(b - a\right) \cdot \pi\right)\right) \cdot angle\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                      7. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                      8. lower-*.f6441.6

                        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot \color{blue}{angle}\right)\right) \]
                      9. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)\right) \]
                      10. *-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
                      11. lower-*.f6441.6

                        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
                    3. Applied rewrites41.6%

                      \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\right)}\right) \]
                  9. Recombined 2 regimes into one program.
                  10. Add Preprocessing

                  Alternative 18: 41.6% accurate, 7.8× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\_m\right)\right)\right) \end{array} \]
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a b angle_m)
                   :precision binary64
                   (* angle_s (* 0.011111111111111112 (* b (* (* PI (- b a)) angle_m)))))
                  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 * (b * ((((double) M_PI) * (b - a)) * angle_m)));
                  }
                  
                  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 * (b * ((Math.PI * (b - a)) * angle_m)));
                  }
                  
                  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 * (b * ((math.pi * (b - a)) * angle_m)))
                  
                  angle\_m = abs(angle)
                  angle\_s = copysign(1.0, angle)
                  function code(angle_s, a, b, angle_m)
                  	return Float64(angle_s * Float64(0.011111111111111112 * Float64(b * Float64(Float64(pi * Float64(b - a)) * angle_m))))
                  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 * (b * ((pi * (b - a)) * angle_m)));
                  end
                  
                  angle\_m = N[Abs[angle], $MachinePrecision]
                  angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(b * N[(N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\_m\right)\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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. lower-*.f64N/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)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                    3. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                  7. Taylor expanded in a around 0

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                  8. Step-by-step derivation
                    1. Applied rewrites37.9%

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \color{blue}{angle}\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot angle\right) \]
                      4. associate-*l*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \left(\left(b - a\right) \cdot \pi\right)\right) \cdot angle\right) \]
                      5. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \left(\left(b - a\right) \cdot \pi\right)\right) \cdot angle\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                      7. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)}\right) \]
                      8. lower-*.f6441.6

                        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot \color{blue}{angle}\right)\right) \]
                      9. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot angle\right)\right) \]
                      10. *-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
                      11. lower-*.f6441.6

                        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
                    3. Applied rewrites41.6%

                      \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \color{blue}{\left(\left(\pi \cdot \left(b - a\right)\right) \cdot angle\right)}\right) \]
                    4. Add Preprocessing

                    Reproduce

                    ?
                    herbie shell --seed 2025156 
                    (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)))))