ab-angle->ABCF B

Percentage Accurate: 54.0% → 66.7%
Time: 15.4s
Alternatives: 19
Speedup: 10.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 54.0% accurate, 1.0× speedup?

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

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

Alternative 1: 66.7% accurate, 0.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq 4 \cdot 10^{+263}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \sqrt{\pi}\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1
         (* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
   (*
    angle_s
    (if (<= t_1 4e+263)
      (*
       (+ b_m a)
       (*
        (- b_m a)
        (sin (* (sqrt PI) (* (* angle_m 0.011111111111111112) (sqrt PI))))))
      (if (<= t_1 INFINITY)
        (*
         (+ b_m a)
         (*
          (- b_m a)
          (*
           angle_m
           (fma
            -2.2862368541380886e-7
            (* (* angle_m angle_m) (* PI (* PI PI)))
            (* PI 0.011111111111111112)))))
        (*
         (+ b_m a)
         (* 0.011111111111111112 (* angle_m (* PI (- b_m a))))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
	double tmp;
	if (t_1 <= 4e+263) {
		tmp = (b_m + a) * ((b_m - a) * sin((sqrt(((double) M_PI)) * ((angle_m * 0.011111111111111112) * sqrt(((double) M_PI))))));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (b_m + a) * ((b_m - a) * (angle_m * fma(-2.2862368541380886e-7, ((angle_m * angle_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112))));
	} else {
		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (b_m - a))));
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0))
	tmp = 0.0
	if (t_1 <= 4e+263)
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(sqrt(pi) * Float64(Float64(angle_m * 0.011111111111111112) * sqrt(pi))))));
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle_m * fma(-2.2862368541380886e-7, Float64(Float64(angle_m * angle_m) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(b_m - a)))));
	end
	return Float64(angle_s * tmp)
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * N[(N[Power[b$95$m, 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]}, N[(angle$95$s * If[LessEqual[t$95$1, 4e+263], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle$95$m * N[(-2.2862368541380886e-7 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+263}:\\
\;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \sqrt{\pi}\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 4.00000000000000006e263

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(angle \cdot \frac{1}{90}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right) \]
      16. lower-sqrt.f6463.8

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

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

    if 4.00000000000000006e263 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < +inf.0

    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      6. cube-multN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
      15. lower-PI.f6482.0

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
    7. Applied rewrites82.0%

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(\left(\mathsf{neg}\left(\color{blue}{{a}^{\left(\frac{1}{2}\right)} \cdot {a}^{\left(\frac{1}{2}\right)}}\right)\right) + b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      6. distribute-rgt-neg-inN/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left({a}^{\color{blue}{\frac{1}{2}}}, \mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      9. unpow1/2N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \color{blue}{\mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right)}, b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \mathsf{neg}\left({a}^{\color{blue}{\frac{1}{2}}}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      13. unpow1/2N/A

        \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \mathsf{neg}\left(\color{blue}{\sqrt{a}}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      14. lower-sqrt.f6454.3

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq 4 \cdot 10^{+263}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \sqrt{\pi}\right)\right)\right)\\ \mathbf{elif}\;\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) \leq \infty:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 59.9% accurate, 0.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-304}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+121}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(b\_m \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0)))
        (t_1
         (* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
   (*
    angle_s
    (if (<= t_1 -1e-304)
      (* a (* -0.011111111111111112 (* a (* PI angle_m))))
      (if (<= t_1 1e+121)
        (* 0.011111111111111112 (* PI (* angle_m (* b_m b_m))))
        (* (+ b_m a) (* b_m (* 0.011111111111111112 (* PI angle_m)))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
	double tmp;
	if (t_1 <= -1e-304) {
		tmp = a * (-0.011111111111111112 * (a * (((double) M_PI) * angle_m)));
	} else if (t_1 <= 1e+121) {
		tmp = 0.011111111111111112 * (((double) M_PI) * (angle_m * (b_m * b_m)));
	} else {
		tmp = (b_m + a) * (b_m * (0.011111111111111112 * (((double) M_PI) * angle_m)));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = Math.PI * (angle_m / 180.0);
	double t_1 = ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
	double tmp;
	if (t_1 <= -1e-304) {
		tmp = a * (-0.011111111111111112 * (a * (Math.PI * angle_m)));
	} else if (t_1 <= 1e+121) {
		tmp = 0.011111111111111112 * (Math.PI * (angle_m * (b_m * b_m)));
	} else {
		tmp = (b_m + a) * (b_m * (0.011111111111111112 * (Math.PI * angle_m)));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = math.pi * (angle_m / 180.0)
	t_1 = ((2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
	tmp = 0
	if t_1 <= -1e-304:
		tmp = a * (-0.011111111111111112 * (a * (math.pi * angle_m)))
	elif t_1 <= 1e+121:
		tmp = 0.011111111111111112 * (math.pi * (angle_m * (b_m * b_m)))
	else:
		tmp = (b_m + a) * (b_m * (0.011111111111111112 * (math.pi * angle_m)))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0))
	tmp = 0.0
	if (t_1 <= -1e-304)
		tmp = Float64(a * Float64(-0.011111111111111112 * Float64(a * Float64(pi * angle_m))));
	elseif (t_1 <= 1e+121)
		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle_m * Float64(b_m * b_m))));
	else
		tmp = Float64(Float64(b_m + a) * Float64(b_m * Float64(0.011111111111111112 * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = pi * (angle_m / 180.0);
	t_1 = ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0);
	tmp = 0.0;
	if (t_1 <= -1e-304)
		tmp = a * (-0.011111111111111112 * (a * (pi * angle_m)));
	elseif (t_1 <= 1e+121)
		tmp = 0.011111111111111112 * (pi * (angle_m * (b_m * b_m)));
	else
		tmp = (b_m + a) * (b_m * (0.011111111111111112 * (pi * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * N[(N[Power[b$95$m, 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]}, N[(angle$95$s * If[LessEqual[t$95$1, -1e-304], N[(a * N[(-0.011111111111111112 * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+121], N[(0.011111111111111112 * N[(Pi * N[(angle$95$m * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle\_m}{180}\\
t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-304}:\\
\;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+121}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -9.99999999999999971e-305

    1. Initial program 52.2%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. 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)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites31.9%

        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
      2. Step-by-step derivation
        1. Applied rewrites36.5%

          \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \]
        2. Step-by-step derivation
          1. Applied rewrites36.6%

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

          if -9.99999999999999971e-305 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.00000000000000004e121

          1. Initial program 77.9%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in 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)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites60.7%

              \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
            2. Step-by-step derivation
              1. Applied rewrites51.8%

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

                \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              3. Step-by-step derivation
                1. Applied rewrites49.2%

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

                if 1.00000000000000004e121 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

                1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
                  6. lower-PI.f6447.9

                    \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                7. Applied rewrites47.9%

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

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

                    \[\leadsto \left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right) \]
                10. Recombined 3 regimes into one program.
                11. Final simplification42.7%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -1 \cdot 10^{-304}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\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) \leq 10^{+121}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]
                12. Add Preprocessing

                Alternative 3: 59.9% accurate, 0.5× speedup?

                \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-304}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+121}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
                b_m = (fabs.f64 b)
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b_m angle_m)
                 :precision binary64
                 (let* ((t_0 (* PI (/ angle_m 180.0)))
                        (t_1
                         (* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
                   (*
                    angle_s
                    (if (<= t_1 -1e-304)
                      (* a (* -0.011111111111111112 (* a (* PI angle_m))))
                      (if (<= t_1 1e+121)
                        (* 0.011111111111111112 (* PI (* angle_m (* b_m b_m))))
                        (* (+ b_m a) (* 0.011111111111111112 (* angle_m (* b_m PI)))))))))
                b_m = fabs(b);
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b_m, double angle_m) {
                	double t_0 = ((double) M_PI) * (angle_m / 180.0);
                	double t_1 = ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
                	double tmp;
                	if (t_1 <= -1e-304) {
                		tmp = a * (-0.011111111111111112 * (a * (((double) M_PI) * angle_m)));
                	} else if (t_1 <= 1e+121) {
                		tmp = 0.011111111111111112 * (((double) M_PI) * (angle_m * (b_m * b_m)));
                	} else {
                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (b_m * ((double) M_PI))));
                	}
                	return angle_s * tmp;
                }
                
                b_m = Math.abs(b);
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b_m, double angle_m) {
                	double t_0 = Math.PI * (angle_m / 180.0);
                	double t_1 = ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
                	double tmp;
                	if (t_1 <= -1e-304) {
                		tmp = a * (-0.011111111111111112 * (a * (Math.PI * angle_m)));
                	} else if (t_1 <= 1e+121) {
                		tmp = 0.011111111111111112 * (Math.PI * (angle_m * (b_m * b_m)));
                	} else {
                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (b_m * Math.PI)));
                	}
                	return angle_s * tmp;
                }
                
                b_m = math.fabs(b)
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b_m, angle_m):
                	t_0 = math.pi * (angle_m / 180.0)
                	t_1 = ((2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
                	tmp = 0
                	if t_1 <= -1e-304:
                		tmp = a * (-0.011111111111111112 * (a * (math.pi * angle_m)))
                	elif t_1 <= 1e+121:
                		tmp = 0.011111111111111112 * (math.pi * (angle_m * (b_m * b_m)))
                	else:
                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (b_m * math.pi)))
                	return angle_s * tmp
                
                b_m = abs(b)
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b_m, angle_m)
                	t_0 = Float64(pi * Float64(angle_m / 180.0))
                	t_1 = Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0))
                	tmp = 0.0
                	if (t_1 <= -1e-304)
                		tmp = Float64(a * Float64(-0.011111111111111112 * Float64(a * Float64(pi * angle_m))));
                	elseif (t_1 <= 1e+121)
                		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(angle_m * Float64(b_m * b_m))));
                	else
                		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(b_m * pi))));
                	end
                	return Float64(angle_s * tmp)
                end
                
                b_m = abs(b);
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp_2 = code(angle_s, a, b_m, angle_m)
                	t_0 = pi * (angle_m / 180.0);
                	t_1 = ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0);
                	tmp = 0.0;
                	if (t_1 <= -1e-304)
                		tmp = a * (-0.011111111111111112 * (a * (pi * angle_m)));
                	elseif (t_1 <= 1e+121)
                		tmp = 0.011111111111111112 * (pi * (angle_m * (b_m * b_m)));
                	else
                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (b_m * pi)));
                	end
                	tmp_2 = angle_s * tmp;
                end
                
                b_m = N[Abs[b], $MachinePrecision]
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(2.0 * N[(N[Power[b$95$m, 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]}, N[(angle$95$s * If[LessEqual[t$95$1, -1e-304], N[(a * N[(-0.011111111111111112 * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+121], N[(0.011111111111111112 * N[(Pi * N[(angle$95$m * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(b$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
                
                \begin{array}{l}
                b_m = \left|b\right|
                \\
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                \begin{array}{l}
                t_0 := \pi \cdot \frac{angle\_m}{180}\\
                t_1 := \left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
                angle\_s \cdot \begin{array}{l}
                \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-304}:\\
                \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
                
                \mathbf{elif}\;t\_1 \leq 10^{+121}:\\
                \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right)\right)\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -9.99999999999999971e-305

                  1. Initial program 52.2%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Add Preprocessing
                  3. 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)} \]
                  4. Step-by-step derivation
                    1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                  7. Step-by-step derivation
                    1. Applied rewrites31.9%

                      \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
                    2. Step-by-step derivation
                      1. Applied rewrites36.5%

                        \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \]
                      2. Step-by-step derivation
                        1. Applied rewrites36.6%

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

                        if -9.99999999999999971e-305 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.00000000000000004e121

                        1. Initial program 77.9%

                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                        2. Add Preprocessing
                        3. Taylor expanded in 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)} \]
                        4. Step-by-step derivation
                          1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                        7. Step-by-step derivation
                          1. Applied rewrites60.7%

                            \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
                          2. Step-by-step derivation
                            1. Applied rewrites51.8%

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

                              \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                            3. Step-by-step derivation
                              1. Applied rewrites49.2%

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

                              if 1.00000000000000004e121 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

                              1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
                                6. lower-PI.f6447.9

                                  \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                              7. Applied rewrites47.9%

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

                                \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                              9. Step-by-step derivation
                                1. Applied rewrites44.8%

                                  \[\leadsto \left(b + a\right) \cdot \left(0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(b \cdot \pi\right)\right)}\right) \]
                              10. Recombined 3 regimes into one program.
                              11. Final simplification42.7%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -1 \cdot 10^{-304}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\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) \leq 10^{+121}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
                              12. Add Preprocessing

                              Alternative 4: 63.8% accurate, 0.8× speedup?

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

                                1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                  6. cube-multN/A

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                                  15. lower-PI.f6466.1

                                    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                                7. Applied rewrites66.1%

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

                                if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.0000000000000001e216

                                1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(b \cdot b\right)} \]
                                  8. lower-*.f6461.8

                                    \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(b \cdot b\right)} \]
                                7. Applied rewrites61.8%

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

                                if 4.0000000000000001e216 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                1. Initial program 35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
                                  6. lower-PI.f6471.8

                                    \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                                7. Applied rewrites71.8%

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

                                  \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot \left(b \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) + \frac{1}{90} \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                                9. Step-by-step derivation
                                  1. Applied rewrites79.5%

                                    \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \color{blue}{\mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), b \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(b \cdot \pi\right)\right)}\right) \]
                                10. Recombined 3 regimes into one program.
                                11. Final simplification69.5%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 4 \cdot 10^{+216}:\\ \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), b \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
                                12. Add Preprocessing

                                Alternative 5: 62.8% accurate, 0.8× speedup?

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

                                  1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                    6. cube-multN/A

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                                    15. lower-PI.f6466.1

                                      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                                  7. Applied rewrites66.1%

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

                                  if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 5.0000000000000002e-220

                                  1. Initial program 71.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(b + a\right) \cdot \left(\left(\left(\mathsf{neg}\left(\color{blue}{{a}^{\left(\frac{1}{2}\right)} \cdot {a}^{\left(\frac{1}{2}\right)}}\right)\right) + b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                    6. distribute-rgt-neg-inN/A

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

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

                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left({a}^{\color{blue}{\frac{1}{2}}}, \mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                    9. unpow1/2N/A

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

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

                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \color{blue}{\mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right)}, b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                    12. metadata-evalN/A

                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \mathsf{neg}\left({a}^{\color{blue}{\frac{1}{2}}}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                    13. unpow1/2N/A

                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \mathsf{neg}\left(\color{blue}{\sqrt{a}}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                    14. lower-sqrt.f6434.3

                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, -\color{blue}{\sqrt{a}}, b\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
                                  6. Applied rewrites34.3%

                                    \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\mathsf{fma}\left(\sqrt{a}, -\sqrt{a}, b\right)} \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
                                  7. Applied rewrites2.9%

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

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

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

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

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

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

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

                                      \[\leadsto \left(a \cdot a\right) \cdot \sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
                                    7. lower-PI.f6471.5

                                      \[\leadsto \left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                                  10. Applied rewrites71.5%

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

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

                                  1. Initial program 40.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(b + a\right) \cdot \left(\sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
                                    6. lower-PI.f6467.2

                                      \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                                  7. Applied rewrites67.2%

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

                                    \[\leadsto \left(b + a\right) \cdot \left(\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right) \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites71.3%

                                      \[\leadsto \left(b + a\right) \cdot \left(\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right) \cdot b\right) \]
                                  10. Recombined 3 regimes into one program.
                                  11. Final simplification68.9%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-220}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
                                  12. Add Preprocessing

                                  Alternative 6: 62.9% accurate, 1.0× speedup?

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

                                    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                      6. cube-multN/A

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

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

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

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

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

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

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

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

                                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                                      15. lower-PI.f6481.7

                                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                                    7. Applied rewrites81.7%

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

                                    if -1.00000000000000004e264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2.00000000000000002e-50

                                    1. Initial program 60.0%

                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                    2. Add Preprocessing
                                    3. 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)} \]
                                    4. Step-by-step derivation
                                      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if 2.00000000000000002e-50 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                      1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                                      7. Applied rewrites69.1%

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

                                        \[\leadsto \left(b + a\right) \cdot \left(\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right) \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites74.1%

                                          \[\leadsto \left(b + a\right) \cdot \left(\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right) \cdot b\right) \]
                                      10. Recombined 3 regimes into one program.
                                      11. Final simplification68.8%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{+264}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{-50}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
                                      12. Add Preprocessing

                                      Alternative 7: 58.6% accurate, 1.0× speedup?

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

                                        1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \mathsf{neg}\left(\left(a \cdot a\right) \cdot \sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                                          9. lower-PI.f6467.9

                                            \[\leadsto -\left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                                        7. Applied rewrites67.9%

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

                                          \[\leadsto \mathsf{neg}\left(\left(a \cdot a\right) \cdot \left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                        9. Step-by-step derivation
                                          1. Applied rewrites69.4%

                                            \[\leadsto -\left(a \cdot a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right) \]

                                          if -1.00000000000000004e264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2.00000000000000002e-50

                                          1. Initial program 60.0%

                                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                          2. Add Preprocessing
                                          3. 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)} \]
                                          4. Step-by-step derivation
                                            1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 2.00000000000000002e-50 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                            1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                                            7. Applied rewrites69.1%

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

                                              \[\leadsto \left(b + a\right) \cdot \left(\left(angle \cdot \left(\frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right) \]
                                            9. Step-by-step derivation
                                              1. Applied rewrites74.1%

                                                \[\leadsto \left(b + a\right) \cdot \left(\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right) \cdot b\right) \]
                                            10. Recombined 3 regimes into one program.
                                            11. Final simplification66.0%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{+264}:\\ \;\;\;\;\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), \pi \cdot 0.011111111111111112\right)\right) \cdot \left(-a \cdot a\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{-50}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(0.011111111111111112 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
                                            12. Add Preprocessing

                                            Alternative 8: 66.3% accurate, 1.9× speedup?

                                            \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b\_m}^{2} \leq 4 \cdot 10^{+41}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
                                            b_m = (fabs.f64 b)
                                            angle\_m = (fabs.f64 angle)
                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                            (FPCore (angle_s a b_m angle_m)
                                             :precision binary64
                                             (*
                                              angle_s
                                              (if (<= (pow b_m 2.0) 4e+41)
                                                (* (- b_m a) (* (+ b_m a) (sin (* PI (* angle_m 0.011111111111111112)))))
                                                (*
                                                 (+ b_m a)
                                                 (*
                                                  (- b_m a)
                                                  (*
                                                   angle_m
                                                   (fma
                                                    -2.2862368541380886e-7
                                                    (* (* angle_m angle_m) (* PI (* PI PI)))
                                                    (* PI 0.011111111111111112))))))))
                                            b_m = fabs(b);
                                            angle\_m = fabs(angle);
                                            angle\_s = copysign(1.0, angle);
                                            double code(double angle_s, double a, double b_m, double angle_m) {
                                            	double tmp;
                                            	if (pow(b_m, 2.0) <= 4e+41) {
                                            		tmp = (b_m - a) * ((b_m + a) * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
                                            	} else {
                                            		tmp = (b_m + a) * ((b_m - a) * (angle_m * fma(-2.2862368541380886e-7, ((angle_m * angle_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112))));
                                            	}
                                            	return angle_s * tmp;
                                            }
                                            
                                            b_m = abs(b)
                                            angle\_m = abs(angle)
                                            angle\_s = copysign(1.0, angle)
                                            function code(angle_s, a, b_m, angle_m)
                                            	tmp = 0.0
                                            	if ((b_m ^ 2.0) <= 4e+41)
                                            		tmp = Float64(Float64(b_m - a) * Float64(Float64(b_m + a) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
                                            	else
                                            		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle_m * fma(-2.2862368541380886e-7, Float64(Float64(angle_m * angle_m) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112)))));
                                            	end
                                            	return Float64(angle_s * tmp)
                                            end
                                            
                                            b_m = N[Abs[b], $MachinePrecision]
                                            angle\_m = N[Abs[angle], $MachinePrecision]
                                            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                            code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 4e+41], N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle$95$m * N[(-2.2862368541380886e-7 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            b_m = \left|b\right|
                                            \\
                                            angle\_m = \left|angle\right|
                                            \\
                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                            
                                            \\
                                            angle\_s \cdot \begin{array}{l}
                                            \mathbf{if}\;{b\_m}^{2} \leq 4 \cdot 10^{+41}:\\
                                            \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if (pow.f64 b #s(literal 2 binary64)) < 4.00000000000000002e41

                                              1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
                                                8. lift-*.f64N/A

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

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

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

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

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

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

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

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

                                              if 4.00000000000000002e41 < (pow.f64 b #s(literal 2 binary64))

                                              1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                6. cube-multN/A

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                                                15. lower-PI.f6476.8

                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                                              7. Applied rewrites76.8%

                                                \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
                                            3. Recombined 2 regimes into one program.
                                            4. Final simplification71.0%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{+41}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
                                            5. Add Preprocessing

                                            Alternative 9: 66.1% accurate, 1.9× speedup?

                                            \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{+81}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
                                            b_m = (fabs.f64 b)
                                            angle\_m = (fabs.f64 angle)
                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                            (FPCore (angle_s a b_m angle_m)
                                             :precision binary64
                                             (*
                                              angle_s
                                              (if (<= (pow b_m 2.0) 2e+81)
                                                (* (+ b_m a) (* (- b_m a) (sin (* 0.011111111111111112 (* PI angle_m)))))
                                                (*
                                                 (+ b_m a)
                                                 (*
                                                  (- b_m a)
                                                  (*
                                                   angle_m
                                                   (fma
                                                    -2.2862368541380886e-7
                                                    (* (* angle_m angle_m) (* PI (* PI PI)))
                                                    (* PI 0.011111111111111112))))))))
                                            b_m = fabs(b);
                                            angle\_m = fabs(angle);
                                            angle\_s = copysign(1.0, angle);
                                            double code(double angle_s, double a, double b_m, double angle_m) {
                                            	double tmp;
                                            	if (pow(b_m, 2.0) <= 2e+81) {
                                            		tmp = (b_m + a) * ((b_m - a) * sin((0.011111111111111112 * (((double) M_PI) * angle_m))));
                                            	} else {
                                            		tmp = (b_m + a) * ((b_m - a) * (angle_m * fma(-2.2862368541380886e-7, ((angle_m * angle_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112))));
                                            	}
                                            	return angle_s * tmp;
                                            }
                                            
                                            b_m = abs(b)
                                            angle\_m = abs(angle)
                                            angle\_s = copysign(1.0, angle)
                                            function code(angle_s, a, b_m, angle_m)
                                            	tmp = 0.0
                                            	if ((b_m ^ 2.0) <= 2e+81)
                                            		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle_m)))));
                                            	else
                                            		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle_m * fma(-2.2862368541380886e-7, Float64(Float64(angle_m * angle_m) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112)))));
                                            	end
                                            	return Float64(angle_s * tmp)
                                            end
                                            
                                            b_m = N[Abs[b], $MachinePrecision]
                                            angle\_m = N[Abs[angle], $MachinePrecision]
                                            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                            code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 2e+81], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle$95$m * N[(-2.2862368541380886e-7 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                            
                                            \begin{array}{l}
                                            b_m = \left|b\right|
                                            \\
                                            angle\_m = \left|angle\right|
                                            \\
                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                            
                                            \\
                                            angle\_s \cdot \begin{array}{l}
                                            \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{+81}:\\
                                            \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if (pow.f64 b #s(literal 2 binary64)) < 1.99999999999999984e81

                                              1. Initial program 63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if 1.99999999999999984e81 < (pow.f64 b #s(literal 2 binary64))

                                              1. Initial program 41.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                6. cube-multN/A

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

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

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

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

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

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

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

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

                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                                                15. lower-PI.f6474.7

                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                                              7. Applied rewrites74.7%

                                                \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
                                            3. Recombined 2 regimes into one program.
                                            4. Final simplification70.9%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+81}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
                                            5. Add Preprocessing

                                            Alternative 10: 57.0% accurate, 2.0× speedup?

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

                                              1. Initial program 64.1%

                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                              2. Add Preprocessing
                                              3. 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)} \]
                                              4. Step-by-step derivation
                                                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                              7. Step-by-step derivation
                                                1. Applied rewrites52.3%

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

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

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

                                                    if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                                    1. Initial program 45.9%

                                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                    2. Add Preprocessing
                                                    3. Taylor expanded in 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)} \]
                                                    4. Step-by-step derivation
                                                      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites20.5%

                                                        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites17.0%

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

                                                          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites45.0%

                                                            \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(b \cdot b\right)\right) \cdot \pi\right)} \]
                                                        4. Recombined 2 regimes into one program.
                                                        5. Final simplification51.4%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]
                                                        6. Add Preprocessing

                                                        Alternative 11: 56.9% accurate, 2.0× speedup?

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

                                                          1. Initial program 64.1%

                                                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                          2. Add Preprocessing
                                                          3. 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)} \]
                                                          4. Step-by-step derivation
                                                            1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                          7. Step-by-step derivation
                                                            1. Applied rewrites52.3%

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

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

                                                              if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                                              1. Initial program 45.9%

                                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in 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)} \]
                                                              4. Step-by-step derivation
                                                                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                              7. Step-by-step derivation
                                                                1. Applied rewrites20.5%

                                                                  \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
                                                                2. Step-by-step derivation
                                                                  1. Applied rewrites17.0%

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

                                                                    \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites45.0%

                                                                      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(b \cdot b\right)\right) \cdot \pi\right)} \]
                                                                  4. Recombined 2 regimes into one program.
                                                                  5. Final simplification51.3%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-264}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]
                                                                  6. Add Preprocessing

                                                                  Alternative 12: 56.9% accurate, 2.0× speedup?

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

                                                                    1. Initial program 64.1%

                                                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                    2. Add Preprocessing
                                                                    3. 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)} \]
                                                                    4. Step-by-step derivation
                                                                      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites52.3%

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

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

                                                                        if -1e-264 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                                                                        1. Initial program 45.9%

                                                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                        2. Add Preprocessing
                                                                        3. Taylor expanded in 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)} \]
                                                                        4. Step-by-step derivation
                                                                          1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                        7. Step-by-step derivation
                                                                          1. Applied rewrites20.5%

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

                                                                            \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites45.0%

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

                                                                          Alternative 13: 64.8% accurate, 2.0× speedup?

                                                                          \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b\_m}^{2} \leq 4 \cdot 10^{-116}:\\ \;\;\;\;a \cdot \left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right) \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
                                                                          b_m = (fabs.f64 b)
                                                                          angle\_m = (fabs.f64 angle)
                                                                          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                          (FPCore (angle_s a b_m angle_m)
                                                                           :precision binary64
                                                                           (*
                                                                            angle_s
                                                                            (if (<= (pow b_m 2.0) 4e-116)
                                                                              (* a (* (sin (* PI (* angle_m 0.011111111111111112))) (- a)))
                                                                              (*
                                                                               (+ b_m a)
                                                                               (*
                                                                                (- b_m a)
                                                                                (*
                                                                                 angle_m
                                                                                 (fma
                                                                                  -2.2862368541380886e-7
                                                                                  (* (* angle_m angle_m) (* PI (* PI PI)))
                                                                                  (* PI 0.011111111111111112))))))))
                                                                          b_m = fabs(b);
                                                                          angle\_m = fabs(angle);
                                                                          angle\_s = copysign(1.0, angle);
                                                                          double code(double angle_s, double a, double b_m, double angle_m) {
                                                                          	double tmp;
                                                                          	if (pow(b_m, 2.0) <= 4e-116) {
                                                                          		tmp = a * (sin((((double) M_PI) * (angle_m * 0.011111111111111112))) * -a);
                                                                          	} else {
                                                                          		tmp = (b_m + a) * ((b_m - a) * (angle_m * fma(-2.2862368541380886e-7, ((angle_m * angle_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112))));
                                                                          	}
                                                                          	return angle_s * tmp;
                                                                          }
                                                                          
                                                                          b_m = abs(b)
                                                                          angle\_m = abs(angle)
                                                                          angle\_s = copysign(1.0, angle)
                                                                          function code(angle_s, a, b_m, angle_m)
                                                                          	tmp = 0.0
                                                                          	if ((b_m ^ 2.0) <= 4e-116)
                                                                          		tmp = Float64(a * Float64(sin(Float64(pi * Float64(angle_m * 0.011111111111111112))) * Float64(-a)));
                                                                          	else
                                                                          		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle_m * fma(-2.2862368541380886e-7, Float64(Float64(angle_m * angle_m) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112)))));
                                                                          	end
                                                                          	return Float64(angle_s * tmp)
                                                                          end
                                                                          
                                                                          b_m = N[Abs[b], $MachinePrecision]
                                                                          angle\_m = N[Abs[angle], $MachinePrecision]
                                                                          angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                          code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 4e-116], N[(a * N[(N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle$95$m * N[(-2.2862368541380886e-7 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                          
                                                                          \begin{array}{l}
                                                                          b_m = \left|b\right|
                                                                          \\
                                                                          angle\_m = \left|angle\right|
                                                                          \\
                                                                          angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                          
                                                                          \\
                                                                          angle\_s \cdot \begin{array}{l}
                                                                          \mathbf{if}\;{b\_m}^{2} \leq 4 \cdot 10^{-116}:\\
                                                                          \;\;\;\;a \cdot \left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right) \cdot \left(-a\right)\right)\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if (pow.f64 b #s(literal 2 binary64)) < 4e-116

                                                                            1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                \[\leadsto \mathsf{neg}\left(\left(a \cdot a\right) \cdot \sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                                                                              9. lower-PI.f6460.5

                                                                                \[\leadsto -\left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                                                                            7. Applied rewrites60.5%

                                                                              \[\leadsto \color{blue}{-\left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)} \]
                                                                            8. Step-by-step derivation
                                                                              1. Applied rewrites64.8%

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

                                                                              if 4e-116 < (pow.f64 b #s(literal 2 binary64))

                                                                              1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                6. cube-multN/A

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                                                                                15. lower-PI.f6475.1

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                                                                              7. Applied rewrites75.1%

                                                                                \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
                                                                            9. Recombined 2 regimes into one program.
                                                                            10. Final simplification70.3%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 4 \cdot 10^{-116}:\\ \;\;\;\;a \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
                                                                            11. Add Preprocessing

                                                                            Alternative 14: 63.2% accurate, 3.5× speedup?

                                                                            \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 3.8 \cdot 10^{-168}:\\ \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(-a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
                                                                            b_m = (fabs.f64 b)
                                                                            angle\_m = (fabs.f64 angle)
                                                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                            (FPCore (angle_s a b_m angle_m)
                                                                             :precision binary64
                                                                             (*
                                                                              angle_s
                                                                              (if (<= b_m 3.8e-168)
                                                                                (* (sin (* 0.011111111111111112 (* PI angle_m))) (- (* a a)))
                                                                                (*
                                                                                 (+ b_m a)
                                                                                 (*
                                                                                  (- b_m a)
                                                                                  (*
                                                                                   angle_m
                                                                                   (fma
                                                                                    -2.2862368541380886e-7
                                                                                    (* (* angle_m angle_m) (* PI (* PI PI)))
                                                                                    (* PI 0.011111111111111112))))))))
                                                                            b_m = fabs(b);
                                                                            angle\_m = fabs(angle);
                                                                            angle\_s = copysign(1.0, angle);
                                                                            double code(double angle_s, double a, double b_m, double angle_m) {
                                                                            	double tmp;
                                                                            	if (b_m <= 3.8e-168) {
                                                                            		tmp = sin((0.011111111111111112 * (((double) M_PI) * angle_m))) * -(a * a);
                                                                            	} else {
                                                                            		tmp = (b_m + a) * ((b_m - a) * (angle_m * fma(-2.2862368541380886e-7, ((angle_m * angle_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112))));
                                                                            	}
                                                                            	return angle_s * tmp;
                                                                            }
                                                                            
                                                                            b_m = abs(b)
                                                                            angle\_m = abs(angle)
                                                                            angle\_s = copysign(1.0, angle)
                                                                            function code(angle_s, a, b_m, angle_m)
                                                                            	tmp = 0.0
                                                                            	if (b_m <= 3.8e-168)
                                                                            		tmp = Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle_m))) * Float64(-Float64(a * a)));
                                                                            	else
                                                                            		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle_m * fma(-2.2862368541380886e-7, Float64(Float64(angle_m * angle_m) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112)))));
                                                                            	end
                                                                            	return Float64(angle_s * tmp)
                                                                            end
                                                                            
                                                                            b_m = N[Abs[b], $MachinePrecision]
                                                                            angle\_m = N[Abs[angle], $MachinePrecision]
                                                                            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                            code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 3.8e-168], N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[(a * a), $MachinePrecision])), $MachinePrecision], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle$95$m * N[(-2.2862368541380886e-7 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                            
                                                                            \begin{array}{l}
                                                                            b_m = \left|b\right|
                                                                            \\
                                                                            angle\_m = \left|angle\right|
                                                                            \\
                                                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                            
                                                                            \\
                                                                            angle\_s \cdot \begin{array}{l}
                                                                            \mathbf{if}\;b\_m \leq 3.8 \cdot 10^{-168}:\\
                                                                            \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(-a \cdot a\right)\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 2 regimes
                                                                            2. if b < 3.8e-168

                                                                              1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \mathsf{neg}\left(\left(a \cdot a\right) \cdot \sin \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                                                                                9. lower-PI.f6446.2

                                                                                  \[\leadsto -\left(a \cdot a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \]
                                                                              7. Applied rewrites46.2%

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

                                                                              if 3.8e-168 < b

                                                                              1. Initial program 47.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \color{blue}{\left(angle \cdot angle\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                6. cube-multN/A

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

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{{\mathsf{PI}\left(\right)}^{2}}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                8. lower-*.f64N/A

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {\mathsf{PI}\left(\right)}^{2}\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                9. lower-PI.f64N/A

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {\mathsf{PI}\left(\right)}^{2}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                10. unpow2N/A

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                11. lower-*.f64N/A

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                12. lower-PI.f64N/A

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right)\right)\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                13. lower-PI.f64N/A

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right), \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                14. lower-*.f64N/A

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                                                                                15. lower-PI.f6472.2

                                                                                  \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                                                                              7. Applied rewrites72.2%

                                                                                \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
                                                                            3. Recombined 2 regimes into one program.
                                                                            4. Final simplification56.4%

                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.8 \cdot 10^{-168}:\\ \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(-a \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
                                                                            5. Add Preprocessing

                                                                            Alternative 15: 61.9% accurate, 6.8× speedup?

                                                                            \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(b\_m + a\right) \cdot \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(t\_0, -a, b\_m \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\\ \end{array} \end{array} \end{array} \]
                                                                            b_m = (fabs.f64 b)
                                                                            angle\_m = (fabs.f64 angle)
                                                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                            (FPCore (angle_s a b_m angle_m)
                                                                             :precision binary64
                                                                             (let* ((t_0 (* (+ b_m a) (* PI (* angle_m 0.011111111111111112)))))
                                                                               (*
                                                                                angle_s
                                                                                (if (<= (/ angle_m 180.0) 1e+53)
                                                                                  (fma t_0 (- a) (* b_m t_0))
                                                                                  (* (* 0.011111111111111112 (* PI angle_m)) (* (+ b_m a) (- a)))))))
                                                                            b_m = fabs(b);
                                                                            angle\_m = fabs(angle);
                                                                            angle\_s = copysign(1.0, angle);
                                                                            double code(double angle_s, double a, double b_m, double angle_m) {
                                                                            	double t_0 = (b_m + a) * (((double) M_PI) * (angle_m * 0.011111111111111112));
                                                                            	double tmp;
                                                                            	if ((angle_m / 180.0) <= 1e+53) {
                                                                            		tmp = fma(t_0, -a, (b_m * t_0));
                                                                            	} else {
                                                                            		tmp = (0.011111111111111112 * (((double) M_PI) * angle_m)) * ((b_m + a) * -a);
                                                                            	}
                                                                            	return angle_s * tmp;
                                                                            }
                                                                            
                                                                            b_m = abs(b)
                                                                            angle\_m = abs(angle)
                                                                            angle\_s = copysign(1.0, angle)
                                                                            function code(angle_s, a, b_m, angle_m)
                                                                            	t_0 = Float64(Float64(b_m + a) * Float64(pi * Float64(angle_m * 0.011111111111111112)))
                                                                            	tmp = 0.0
                                                                            	if (Float64(angle_m / 180.0) <= 1e+53)
                                                                            		tmp = fma(t_0, Float64(-a), Float64(b_m * t_0));
                                                                            	else
                                                                            		tmp = Float64(Float64(0.011111111111111112 * Float64(pi * angle_m)) * Float64(Float64(b_m + a) * Float64(-a)));
                                                                            	end
                                                                            	return Float64(angle_s * tmp)
                                                                            end
                                                                            
                                                                            b_m = N[Abs[b], $MachinePrecision]
                                                                            angle\_m = N[Abs[angle], $MachinePrecision]
                                                                            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                            code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(b$95$m + a), $MachinePrecision] * N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+53], N[(t$95$0 * (-a) + N[(b$95$m * t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
                                                                            
                                                                            \begin{array}{l}
                                                                            b_m = \left|b\right|
                                                                            \\
                                                                            angle\_m = \left|angle\right|
                                                                            \\
                                                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                            
                                                                            \\
                                                                            \begin{array}{l}
                                                                            t_0 := \left(b\_m + a\right) \cdot \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\\
                                                                            angle\_s \cdot \begin{array}{l}
                                                                            \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+53}:\\
                                                                            \;\;\;\;\mathsf{fma}\left(t\_0, -a, b\_m \cdot t\_0\right)\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 2 regimes
                                                                            2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999999e52

                                                                              1. Initial program 63.0%

                                                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                              2. Add Preprocessing
                                                                              3. 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)} \]
                                                                              4. Step-by-step derivation
                                                                                1. associate-*r*N/A

                                                                                  \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                2. associate-*r*N/A

                                                                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                3. lower-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                4. lower-*.f64N/A

                                                                                  \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                5. lower-*.f64N/A

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                6. lower-PI.f64N/A

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                7. unpow2N/A

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                8. unpow2N/A

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                9. difference-of-squaresN/A

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                10. lower-*.f64N/A

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                11. lower-+.f64N/A

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                12. lower--.f6458.9

                                                                                  \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                              5. Applied rewrites58.9%

                                                                                \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                              6. Step-by-step derivation
                                                                                1. Applied rewrites72.2%

                                                                                  \[\leadsto \mathsf{fma}\left(\left(b + a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right), \color{blue}{-a}, \left(\left(b + a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right) \cdot b\right) \]

                                                                                if 9.9999999999999999e52 < (/.f64 angle #s(literal 180 binary64))

                                                                                1. Initial program 28.5%

                                                                                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                2. Add Preprocessing
                                                                                3. Taylor expanded in 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)} \]
                                                                                4. Step-by-step derivation
                                                                                  1. associate-*r*N/A

                                                                                    \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                  2. associate-*r*N/A

                                                                                    \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                  3. lower-*.f64N/A

                                                                                    \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                  4. lower-*.f64N/A

                                                                                    \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                  5. lower-*.f64N/A

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                  6. lower-PI.f64N/A

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                  7. unpow2N/A

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                  8. unpow2N/A

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                  9. difference-of-squaresN/A

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                  10. lower-*.f64N/A

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                  11. lower-+.f64N/A

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                  12. lower--.f6420.5

                                                                                    \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                                5. Applied rewrites20.5%

                                                                                  \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                6. Taylor expanded in b around 0

                                                                                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot \color{blue}{a}\right)\right) \]
                                                                                7. Step-by-step derivation
                                                                                  1. Applied rewrites21.2%

                                                                                    \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right) \]
                                                                                8. Recombined 2 regimes into one program.
                                                                                9. Final simplification59.4%

                                                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+53}:\\ \;\;\;\;\mathsf{fma}\left(\left(b + a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right), -a, b \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right)\\ \end{array} \]
                                                                                10. Add Preprocessing

                                                                                Alternative 16: 62.8% accurate, 10.3× speedup?

                                                                                \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 1.2 \cdot 10^{+122}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\\ \end{array} \end{array} \]
                                                                                b_m = (fabs.f64 b)
                                                                                angle\_m = (fabs.f64 angle)
                                                                                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                (FPCore (angle_s a b_m angle_m)
                                                                                 :precision binary64
                                                                                 (*
                                                                                  angle_s
                                                                                  (if (<= (/ angle_m 180.0) 1.2e+122)
                                                                                    (* (+ b_m a) (* 0.011111111111111112 (* angle_m (* PI (- b_m a)))))
                                                                                    (* (* 0.011111111111111112 (* PI angle_m)) (* (+ b_m a) (- a))))))
                                                                                b_m = fabs(b);
                                                                                angle\_m = fabs(angle);
                                                                                angle\_s = copysign(1.0, angle);
                                                                                double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                	double tmp;
                                                                                	if ((angle_m / 180.0) <= 1.2e+122) {
                                                                                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (b_m - a))));
                                                                                	} else {
                                                                                		tmp = (0.011111111111111112 * (((double) M_PI) * angle_m)) * ((b_m + a) * -a);
                                                                                	}
                                                                                	return angle_s * tmp;
                                                                                }
                                                                                
                                                                                b_m = Math.abs(b);
                                                                                angle\_m = Math.abs(angle);
                                                                                angle\_s = Math.copySign(1.0, angle);
                                                                                public static double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                	double tmp;
                                                                                	if ((angle_m / 180.0) <= 1.2e+122) {
                                                                                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (Math.PI * (b_m - a))));
                                                                                	} else {
                                                                                		tmp = (0.011111111111111112 * (Math.PI * angle_m)) * ((b_m + a) * -a);
                                                                                	}
                                                                                	return angle_s * tmp;
                                                                                }
                                                                                
                                                                                b_m = math.fabs(b)
                                                                                angle\_m = math.fabs(angle)
                                                                                angle\_s = math.copysign(1.0, angle)
                                                                                def code(angle_s, a, b_m, angle_m):
                                                                                	tmp = 0
                                                                                	if (angle_m / 180.0) <= 1.2e+122:
                                                                                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (math.pi * (b_m - a))))
                                                                                	else:
                                                                                		tmp = (0.011111111111111112 * (math.pi * angle_m)) * ((b_m + a) * -a)
                                                                                	return angle_s * tmp
                                                                                
                                                                                b_m = abs(b)
                                                                                angle\_m = abs(angle)
                                                                                angle\_s = copysign(1.0, angle)
                                                                                function code(angle_s, a, b_m, angle_m)
                                                                                	tmp = 0.0
                                                                                	if (Float64(angle_m / 180.0) <= 1.2e+122)
                                                                                		tmp = Float64(Float64(b_m + a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(b_m - a)))));
                                                                                	else
                                                                                		tmp = Float64(Float64(0.011111111111111112 * Float64(pi * angle_m)) * Float64(Float64(b_m + a) * Float64(-a)));
                                                                                	end
                                                                                	return Float64(angle_s * tmp)
                                                                                end
                                                                                
                                                                                b_m = abs(b);
                                                                                angle\_m = abs(angle);
                                                                                angle\_s = sign(angle) * abs(1.0);
                                                                                function tmp_2 = code(angle_s, a, b_m, angle_m)
                                                                                	tmp = 0.0;
                                                                                	if ((angle_m / 180.0) <= 1.2e+122)
                                                                                		tmp = (b_m + a) * (0.011111111111111112 * (angle_m * (pi * (b_m - a))));
                                                                                	else
                                                                                		tmp = (0.011111111111111112 * (pi * angle_m)) * ((b_m + a) * -a);
                                                                                	end
                                                                                	tmp_2 = angle_s * tmp;
                                                                                end
                                                                                
                                                                                b_m = N[Abs[b], $MachinePrecision]
                                                                                angle\_m = N[Abs[angle], $MachinePrecision]
                                                                                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1.2e+122], N[(N[(b$95$m + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                
                                                                                \begin{array}{l}
                                                                                b_m = \left|b\right|
                                                                                \\
                                                                                angle\_m = \left|angle\right|
                                                                                \\
                                                                                angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                
                                                                                \\
                                                                                angle\_s \cdot \begin{array}{l}
                                                                                \mathbf{if}\;\frac{angle\_m}{180} \leq 1.2 \cdot 10^{+122}:\\
                                                                                \;\;\;\;\left(b\_m + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b\_m - a\right)\right)\right)\right)\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 2 regimes
                                                                                2. if (/.f64 angle #s(literal 180 binary64)) < 1.2000000000000001e122

                                                                                  1. Initial program 61.2%

                                                                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                  2. Add Preprocessing
                                                                                  3. Step-by-step derivation
                                                                                    1. lift-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
                                                                                    2. lift-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                                                                    3. associate-*l*N/A

                                                                                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
                                                                                    4. lift-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
                                                                                    5. *-commutativeN/A

                                                                                      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \]
                                                                                    6. associate-*l*N/A

                                                                                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)} \]
                                                                                    7. lift--.f64N/A

                                                                                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                                                    8. lift-pow.f64N/A

                                                                                      \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                                                    9. unpow2N/A

                                                                                      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                                                    10. lift-pow.f64N/A

                                                                                      \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                                                    11. unpow2N/A

                                                                                      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                                                    12. difference-of-squaresN/A

                                                                                      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right) \]
                                                                                    13. associate-*l*N/A

                                                                                      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
                                                                                    14. lower-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)\right)\right)} \]
                                                                                  4. Applied rewrites77.4%

                                                                                    \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
                                                                                  5. Step-by-step derivation
                                                                                    1. lift--.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    2. sub-negN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\left(b + \left(\mathsf{neg}\left(a\right)\right)\right)} \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    3. +-commutativeN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\left(\left(\mathsf{neg}\left(a\right)\right) + b\right)} \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    4. unpow1N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\left(\left(\mathsf{neg}\left(\color{blue}{{a}^{1}}\right)\right) + b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    5. sqr-powN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\left(\left(\mathsf{neg}\left(\color{blue}{{a}^{\left(\frac{1}{2}\right)} \cdot {a}^{\left(\frac{1}{2}\right)}}\right)\right) + b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    6. distribute-rgt-neg-inN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\left(\color{blue}{{a}^{\left(\frac{1}{2}\right)} \cdot \left(\mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right)\right)} + b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    7. lower-fma.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\mathsf{fma}\left({a}^{\left(\frac{1}{2}\right)}, \mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right), b\right)} \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    8. metadata-evalN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left({a}^{\color{blue}{\frac{1}{2}}}, \mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    9. unpow1/2N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\color{blue}{\sqrt{a}}, \mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    10. lower-sqrt.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\color{blue}{\sqrt{a}}, \mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    11. lower-neg.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \color{blue}{\mathsf{neg}\left({a}^{\left(\frac{1}{2}\right)}\right)}, b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    12. metadata-evalN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \mathsf{neg}\left({a}^{\color{blue}{\frac{1}{2}}}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    13. unpow1/2N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, \mathsf{neg}\left(\color{blue}{\sqrt{a}}\right), b\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
                                                                                    14. lower-sqrt.f6436.6

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\mathsf{fma}\left(\sqrt{a}, -\color{blue}{\sqrt{a}}, b\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
                                                                                  6. Applied rewrites36.6%

                                                                                    \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\mathsf{fma}\left(\sqrt{a}, -\sqrt{a}, b\right)} \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
                                                                                  7. Taylor expanded in angle around 0

                                                                                    \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot a\right)\right)\right)\right)} \]
                                                                                  8. Step-by-step derivation
                                                                                    1. lower-*.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot a\right)\right)\right)\right)} \]
                                                                                    2. lower-*.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot a\right)\right)\right)}\right) \]
                                                                                    3. *-commutativeN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(b + -1 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                                                                                    4. lower-*.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(b + -1 \cdot a\right) \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                                                                                    5. mul-1-negN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                    6. sub-negN/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\left(b - a\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                    7. lower--.f64N/A

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\left(b - a\right)} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                                                                                    8. lower-PI.f6470.4

                                                                                      \[\leadsto \left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \color{blue}{\pi}\right)\right)\right) \]
                                                                                  9. Applied rewrites70.4%

                                                                                    \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)} \]

                                                                                  if 1.2000000000000001e122 < (/.f64 angle #s(literal 180 binary64))

                                                                                  1. Initial program 26.4%

                                                                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                  2. Add Preprocessing
                                                                                  3. Taylor expanded in 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)} \]
                                                                                  4. Step-by-step derivation
                                                                                    1. associate-*r*N/A

                                                                                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                    2. associate-*r*N/A

                                                                                      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                    3. lower-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                    4. lower-*.f64N/A

                                                                                      \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                    5. lower-*.f64N/A

                                                                                      \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                    6. lower-PI.f64N/A

                                                                                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                    7. unpow2N/A

                                                                                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                    8. unpow2N/A

                                                                                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                    9. difference-of-squaresN/A

                                                                                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                    10. lower-*.f64N/A

                                                                                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                    11. lower-+.f64N/A

                                                                                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                    12. lower--.f6415.4

                                                                                      \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                                  5. Applied rewrites15.4%

                                                                                    \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                  6. Taylor expanded in b around 0

                                                                                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot \color{blue}{a}\right)\right) \]
                                                                                  7. Step-by-step derivation
                                                                                    1. Applied rewrites20.2%

                                                                                      \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right) \]
                                                                                  8. Recombined 2 regimes into one program.
                                                                                  9. Final simplification60.6%

                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 1.2 \cdot 10^{+122}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right)\\ \end{array} \]
                                                                                  10. Add Preprocessing

                                                                                  Alternative 17: 62.8% accurate, 10.3× speedup?

                                                                                  \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 1.2 \cdot 10^{+122}:\\ \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\\ \end{array} \end{array} \]
                                                                                  b_m = (fabs.f64 b)
                                                                                  angle\_m = (fabs.f64 angle)
                                                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                  (FPCore (angle_s a b_m angle_m)
                                                                                   :precision binary64
                                                                                   (*
                                                                                    angle_s
                                                                                    (if (<= (/ angle_m 180.0) 1.2e+122)
                                                                                      (* (- b_m a) (* (+ b_m a) (* PI (* angle_m 0.011111111111111112))))
                                                                                      (* (* 0.011111111111111112 (* PI angle_m)) (* (+ b_m a) (- a))))))
                                                                                  b_m = fabs(b);
                                                                                  angle\_m = fabs(angle);
                                                                                  angle\_s = copysign(1.0, angle);
                                                                                  double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                  	double tmp;
                                                                                  	if ((angle_m / 180.0) <= 1.2e+122) {
                                                                                  		tmp = (b_m - a) * ((b_m + a) * (((double) M_PI) * (angle_m * 0.011111111111111112)));
                                                                                  	} else {
                                                                                  		tmp = (0.011111111111111112 * (((double) M_PI) * angle_m)) * ((b_m + a) * -a);
                                                                                  	}
                                                                                  	return angle_s * tmp;
                                                                                  }
                                                                                  
                                                                                  b_m = Math.abs(b);
                                                                                  angle\_m = Math.abs(angle);
                                                                                  angle\_s = Math.copySign(1.0, angle);
                                                                                  public static double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                  	double tmp;
                                                                                  	if ((angle_m / 180.0) <= 1.2e+122) {
                                                                                  		tmp = (b_m - a) * ((b_m + a) * (Math.PI * (angle_m * 0.011111111111111112)));
                                                                                  	} else {
                                                                                  		tmp = (0.011111111111111112 * (Math.PI * angle_m)) * ((b_m + a) * -a);
                                                                                  	}
                                                                                  	return angle_s * tmp;
                                                                                  }
                                                                                  
                                                                                  b_m = math.fabs(b)
                                                                                  angle\_m = math.fabs(angle)
                                                                                  angle\_s = math.copysign(1.0, angle)
                                                                                  def code(angle_s, a, b_m, angle_m):
                                                                                  	tmp = 0
                                                                                  	if (angle_m / 180.0) <= 1.2e+122:
                                                                                  		tmp = (b_m - a) * ((b_m + a) * (math.pi * (angle_m * 0.011111111111111112)))
                                                                                  	else:
                                                                                  		tmp = (0.011111111111111112 * (math.pi * angle_m)) * ((b_m + a) * -a)
                                                                                  	return angle_s * tmp
                                                                                  
                                                                                  b_m = abs(b)
                                                                                  angle\_m = abs(angle)
                                                                                  angle\_s = copysign(1.0, angle)
                                                                                  function code(angle_s, a, b_m, angle_m)
                                                                                  	tmp = 0.0
                                                                                  	if (Float64(angle_m / 180.0) <= 1.2e+122)
                                                                                  		tmp = Float64(Float64(b_m - a) * Float64(Float64(b_m + a) * Float64(pi * Float64(angle_m * 0.011111111111111112))));
                                                                                  	else
                                                                                  		tmp = Float64(Float64(0.011111111111111112 * Float64(pi * angle_m)) * Float64(Float64(b_m + a) * Float64(-a)));
                                                                                  	end
                                                                                  	return Float64(angle_s * tmp)
                                                                                  end
                                                                                  
                                                                                  b_m = abs(b);
                                                                                  angle\_m = abs(angle);
                                                                                  angle\_s = sign(angle) * abs(1.0);
                                                                                  function tmp_2 = code(angle_s, a, b_m, angle_m)
                                                                                  	tmp = 0.0;
                                                                                  	if ((angle_m / 180.0) <= 1.2e+122)
                                                                                  		tmp = (b_m - a) * ((b_m + a) * (pi * (angle_m * 0.011111111111111112)));
                                                                                  	else
                                                                                  		tmp = (0.011111111111111112 * (pi * angle_m)) * ((b_m + a) * -a);
                                                                                  	end
                                                                                  	tmp_2 = angle_s * tmp;
                                                                                  end
                                                                                  
                                                                                  b_m = N[Abs[b], $MachinePrecision]
                                                                                  angle\_m = N[Abs[angle], $MachinePrecision]
                                                                                  angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                  code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1.2e+122], N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  b_m = \left|b\right|
                                                                                  \\
                                                                                  angle\_m = \left|angle\right|
                                                                                  \\
                                                                                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                  
                                                                                  \\
                                                                                  angle\_s \cdot \begin{array}{l}
                                                                                  \mathbf{if}\;\frac{angle\_m}{180} \leq 1.2 \cdot 10^{+122}:\\
                                                                                  \;\;\;\;\left(b\_m - a\right) \cdot \left(\left(b\_m + a\right) \cdot \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if (/.f64 angle #s(literal 180 binary64)) < 1.2000000000000001e122

                                                                                    1. Initial program 61.2%

                                                                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                    2. Add Preprocessing
                                                                                    3. 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)} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. associate-*r*N/A

                                                                                        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                      2. associate-*r*N/A

                                                                                        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                      3. lower-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                      4. lower-*.f64N/A

                                                                                        \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                      5. lower-*.f64N/A

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                      6. lower-PI.f64N/A

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                      7. unpow2N/A

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                      8. unpow2N/A

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                      9. difference-of-squaresN/A

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                      10. lower-*.f64N/A

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                      11. lower-+.f64N/A

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                      12. lower--.f6457.5

                                                                                        \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                                    5. Applied rewrites57.5%

                                                                                      \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                    6. Step-by-step derivation
                                                                                      1. Applied rewrites70.4%

                                                                                        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)} \]

                                                                                      if 1.2000000000000001e122 < (/.f64 angle #s(literal 180 binary64))

                                                                                      1. Initial program 26.4%

                                                                                        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                      2. Add Preprocessing
                                                                                      3. Taylor expanded in 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)} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. associate-*r*N/A

                                                                                          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                        2. associate-*r*N/A

                                                                                          \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                        3. lower-*.f64N/A

                                                                                          \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                        4. lower-*.f64N/A

                                                                                          \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                        5. lower-*.f64N/A

                                                                                          \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                        6. lower-PI.f64N/A

                                                                                          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                        7. unpow2N/A

                                                                                          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                        8. unpow2N/A

                                                                                          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                        9. difference-of-squaresN/A

                                                                                          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                        10. lower-*.f64N/A

                                                                                          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                        11. lower-+.f64N/A

                                                                                          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                        12. lower--.f6415.4

                                                                                          \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                                      5. Applied rewrites15.4%

                                                                                        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                      6. Taylor expanded in b around 0

                                                                                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-1 \cdot \color{blue}{a}\right)\right) \]
                                                                                      7. Step-by-step derivation
                                                                                        1. Applied rewrites20.2%

                                                                                          \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right) \]
                                                                                      8. Recombined 2 regimes into one program.
                                                                                      9. Final simplification60.6%

                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 1.2 \cdot 10^{+122}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(b + a\right) \cdot \left(-a\right)\right)\\ \end{array} \]
                                                                                      10. Add Preprocessing

                                                                                      Alternative 18: 40.2% accurate, 11.9× speedup?

                                                                                      \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 1.5 \cdot 10^{-20}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(a \cdot a\right)\right)\right)\\ \end{array} \end{array} \]
                                                                                      b_m = (fabs.f64 b)
                                                                                      angle\_m = (fabs.f64 angle)
                                                                                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                      (FPCore (angle_s a b_m angle_m)
                                                                                       :precision binary64
                                                                                       (*
                                                                                        angle_s
                                                                                        (if (<= (/ angle_m 180.0) 1.5e-20)
                                                                                          (* -0.011111111111111112 (* a (* a (* PI angle_m))))
                                                                                          (* -0.011111111111111112 (* PI (* angle_m (* a a)))))))
                                                                                      b_m = fabs(b);
                                                                                      angle\_m = fabs(angle);
                                                                                      angle\_s = copysign(1.0, angle);
                                                                                      double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                      	double tmp;
                                                                                      	if ((angle_m / 180.0) <= 1.5e-20) {
                                                                                      		tmp = -0.011111111111111112 * (a * (a * (((double) M_PI) * angle_m)));
                                                                                      	} else {
                                                                                      		tmp = -0.011111111111111112 * (((double) M_PI) * (angle_m * (a * a)));
                                                                                      	}
                                                                                      	return angle_s * tmp;
                                                                                      }
                                                                                      
                                                                                      b_m = Math.abs(b);
                                                                                      angle\_m = Math.abs(angle);
                                                                                      angle\_s = Math.copySign(1.0, angle);
                                                                                      public static double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                      	double tmp;
                                                                                      	if ((angle_m / 180.0) <= 1.5e-20) {
                                                                                      		tmp = -0.011111111111111112 * (a * (a * (Math.PI * angle_m)));
                                                                                      	} else {
                                                                                      		tmp = -0.011111111111111112 * (Math.PI * (angle_m * (a * a)));
                                                                                      	}
                                                                                      	return angle_s * tmp;
                                                                                      }
                                                                                      
                                                                                      b_m = math.fabs(b)
                                                                                      angle\_m = math.fabs(angle)
                                                                                      angle\_s = math.copysign(1.0, angle)
                                                                                      def code(angle_s, a, b_m, angle_m):
                                                                                      	tmp = 0
                                                                                      	if (angle_m / 180.0) <= 1.5e-20:
                                                                                      		tmp = -0.011111111111111112 * (a * (a * (math.pi * angle_m)))
                                                                                      	else:
                                                                                      		tmp = -0.011111111111111112 * (math.pi * (angle_m * (a * a)))
                                                                                      	return angle_s * tmp
                                                                                      
                                                                                      b_m = abs(b)
                                                                                      angle\_m = abs(angle)
                                                                                      angle\_s = copysign(1.0, angle)
                                                                                      function code(angle_s, a, b_m, angle_m)
                                                                                      	tmp = 0.0
                                                                                      	if (Float64(angle_m / 180.0) <= 1.5e-20)
                                                                                      		tmp = Float64(-0.011111111111111112 * Float64(a * Float64(a * Float64(pi * angle_m))));
                                                                                      	else
                                                                                      		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle_m * Float64(a * a))));
                                                                                      	end
                                                                                      	return Float64(angle_s * tmp)
                                                                                      end
                                                                                      
                                                                                      b_m = abs(b);
                                                                                      angle\_m = abs(angle);
                                                                                      angle\_s = sign(angle) * abs(1.0);
                                                                                      function tmp_2 = code(angle_s, a, b_m, angle_m)
                                                                                      	tmp = 0.0;
                                                                                      	if ((angle_m / 180.0) <= 1.5e-20)
                                                                                      		tmp = -0.011111111111111112 * (a * (a * (pi * angle_m)));
                                                                                      	else
                                                                                      		tmp = -0.011111111111111112 * (pi * (angle_m * (a * a)));
                                                                                      	end
                                                                                      	tmp_2 = angle_s * tmp;
                                                                                      end
                                                                                      
                                                                                      b_m = N[Abs[b], $MachinePrecision]
                                                                                      angle\_m = N[Abs[angle], $MachinePrecision]
                                                                                      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                      code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1.5e-20], N[(-0.011111111111111112 * N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.011111111111111112 * N[(Pi * N[(angle$95$m * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      b_m = \left|b\right|
                                                                                      \\
                                                                                      angle\_m = \left|angle\right|
                                                                                      \\
                                                                                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                      
                                                                                      \\
                                                                                      angle\_s \cdot \begin{array}{l}
                                                                                      \mathbf{if}\;\frac{angle\_m}{180} \leq 1.5 \cdot 10^{-20}:\\
                                                                                      \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle\_m \cdot \left(a \cdot a\right)\right)\right)\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 2 regimes
                                                                                      2. if (/.f64 angle #s(literal 180 binary64)) < 1.50000000000000014e-20

                                                                                        1. Initial program 62.4%

                                                                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                        2. Add Preprocessing
                                                                                        3. Taylor expanded in 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)} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. associate-*r*N/A

                                                                                            \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                          2. associate-*r*N/A

                                                                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                          3. lower-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                          4. lower-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                          5. lower-*.f64N/A

                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                          6. lower-PI.f64N/A

                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                          7. unpow2N/A

                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                          8. unpow2N/A

                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                          9. difference-of-squaresN/A

                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                          10. lower-*.f64N/A

                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                          11. lower-+.f64N/A

                                                                                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                          12. lower--.f6460.1

                                                                                            \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                                        5. Applied rewrites60.1%

                                                                                          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                        6. Taylor expanded in b around 0

                                                                                          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                                        7. Step-by-step derivation
                                                                                          1. Applied rewrites41.2%

                                                                                            \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
                                                                                          2. Step-by-step derivation
                                                                                            1. Applied rewrites43.7%

                                                                                              \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \]

                                                                                            if 1.50000000000000014e-20 < (/.f64 angle #s(literal 180 binary64))

                                                                                            1. Initial program 34.0%

                                                                                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                            2. Add Preprocessing
                                                                                            3. 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)} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. associate-*r*N/A

                                                                                                \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                              2. associate-*r*N/A

                                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                              3. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                              4. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                              5. lower-*.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                              6. lower-PI.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                              7. unpow2N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                              8. unpow2N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                              9. difference-of-squaresN/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                              10. lower-*.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                              11. lower-+.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                              12. lower--.f6421.6

                                                                                                \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                                            5. Applied rewrites21.6%

                                                                                              \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                            6. Taylor expanded in b around 0

                                                                                              \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                                            7. Step-by-step derivation
                                                                                              1. Applied rewrites20.5%

                                                                                                \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
                                                                                            8. Recombined 2 regimes into one program.
                                                                                            9. Final simplification37.2%

                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 1.5 \cdot 10^{-20}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \end{array} \]
                                                                                            10. Add Preprocessing

                                                                                            Alternative 19: 38.7% accurate, 21.6× speedup?

                                                                                            \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right) \end{array} \]
                                                                                            b_m = (fabs.f64 b)
                                                                                            angle\_m = (fabs.f64 angle)
                                                                                            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                                            (FPCore (angle_s a b_m angle_m)
                                                                                             :precision binary64
                                                                                             (* angle_s (* -0.011111111111111112 (* a (* a (* PI angle_m))))))
                                                                                            b_m = fabs(b);
                                                                                            angle\_m = fabs(angle);
                                                                                            angle\_s = copysign(1.0, angle);
                                                                                            double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                            	return angle_s * (-0.011111111111111112 * (a * (a * (((double) M_PI) * angle_m))));
                                                                                            }
                                                                                            
                                                                                            b_m = Math.abs(b);
                                                                                            angle\_m = Math.abs(angle);
                                                                                            angle\_s = Math.copySign(1.0, angle);
                                                                                            public static double code(double angle_s, double a, double b_m, double angle_m) {
                                                                                            	return angle_s * (-0.011111111111111112 * (a * (a * (Math.PI * angle_m))));
                                                                                            }
                                                                                            
                                                                                            b_m = math.fabs(b)
                                                                                            angle\_m = math.fabs(angle)
                                                                                            angle\_s = math.copysign(1.0, angle)
                                                                                            def code(angle_s, a, b_m, angle_m):
                                                                                            	return angle_s * (-0.011111111111111112 * (a * (a * (math.pi * angle_m))))
                                                                                            
                                                                                            b_m = abs(b)
                                                                                            angle\_m = abs(angle)
                                                                                            angle\_s = copysign(1.0, angle)
                                                                                            function code(angle_s, a, b_m, angle_m)
                                                                                            	return Float64(angle_s * Float64(-0.011111111111111112 * Float64(a * Float64(a * Float64(pi * angle_m)))))
                                                                                            end
                                                                                            
                                                                                            b_m = abs(b);
                                                                                            angle\_m = abs(angle);
                                                                                            angle\_s = sign(angle) * abs(1.0);
                                                                                            function tmp = code(angle_s, a, b_m, angle_m)
                                                                                            	tmp = angle_s * (-0.011111111111111112 * (a * (a * (pi * angle_m))));
                                                                                            end
                                                                                            
                                                                                            b_m = N[Abs[b], $MachinePrecision]
                                                                                            angle\_m = N[Abs[angle], $MachinePrecision]
                                                                                            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                            code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(-0.011111111111111112 * N[(a * N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                            
                                                                                            \begin{array}{l}
                                                                                            b_m = \left|b\right|
                                                                                            \\
                                                                                            angle\_m = \left|angle\right|
                                                                                            \\
                                                                                            angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                                            
                                                                                            \\
                                                                                            angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Initial program 54.4%

                                                                                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                                            2. Add Preprocessing
                                                                                            3. Taylor expanded in 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)} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. associate-*r*N/A

                                                                                                \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
                                                                                              2. associate-*r*N/A

                                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                              3. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
                                                                                              4. lower-*.f64N/A

                                                                                                \[\leadsto \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                              5. lower-*.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                              6. lower-PI.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
                                                                                              7. unpow2N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
                                                                                              8. unpow2N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
                                                                                              9. difference-of-squaresN/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                              10. lower-*.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                              11. lower-+.f64N/A

                                                                                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                                                                              12. lower--.f6449.3

                                                                                                \[\leadsto \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
                                                                                            5. Applied rewrites49.3%

                                                                                              \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                                            6. Taylor expanded in b around 0

                                                                                              \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                                                                            7. Step-by-step derivation
                                                                                              1. Applied rewrites35.4%

                                                                                                \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right)} \]
                                                                                              2. Step-by-step derivation
                                                                                                1. Applied rewrites36.4%

                                                                                                  \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right)\right) \]
                                                                                                2. Add Preprocessing

                                                                                                Reproduce

                                                                                                ?
                                                                                                herbie shell --seed 2024219 
                                                                                                (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)))))