ab-angle->ABCF B

Percentage Accurate: 52.9% → 66.4%
Time: 16.9s
Alternatives: 18
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 18 alternatives:

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

Initial Program: 52.9% 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.4% accurate, 1.0× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 9.4 \cdot 10^{+173}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(2 \cdot \sin \left(e^{\log \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)}\right)\right)\right)\right) \cdot \cos \left(\frac{1}{\frac{180}{\pi \cdot angle\_m}}\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b_m 9.4e+173)
    (*
     (+ b_m a_m)
     (*
      (- b_m a_m)
      (sin
       (*
        (pow PI 0.6666666666666666)
        (* (cbrt PI) (* angle_m 0.011111111111111112))))))
    (*
     (*
      (+ b_m a_m)
      (*
       (- b_m a_m)
       (* 2.0 (sin (exp (log (* PI (* angle_m 0.005555555555555556))))))))
     (cos (/ 1.0 (/ 180.0 (* PI angle_m))))))))
b_m = fabs(b);
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 9.4e+173) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((pow(((double) M_PI), 0.6666666666666666) * (cbrt(((double) M_PI)) * (angle_m * 0.011111111111111112)))));
	} else {
		tmp = ((b_m + a_m) * ((b_m - a_m) * (2.0 * sin(exp(log((((double) M_PI) * (angle_m * 0.005555555555555556)))))))) * cos((1.0 / (180.0 / (((double) M_PI) * angle_m))));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 9.4e+173) {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((Math.pow(Math.PI, 0.6666666666666666) * (Math.cbrt(Math.PI) * (angle_m * 0.011111111111111112)))));
	} else {
		tmp = ((b_m + a_m) * ((b_m - a_m) * (2.0 * Math.sin(Math.exp(Math.log((Math.PI * (angle_m * 0.005555555555555556)))))))) * Math.cos((1.0 / (180.0 / (Math.PI * angle_m))));
	}
	return angle_s * tmp;
}
b_m = abs(b)
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	tmp = 0.0
	if (b_m <= 9.4e+173)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64((pi ^ 0.6666666666666666) * Float64(cbrt(pi) * Float64(angle_m * 0.011111111111111112))))));
	else
		tmp = Float64(Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(2.0 * sin(exp(log(Float64(pi * Float64(angle_m * 0.005555555555555556)))))))) * cos(Float64(1.0 / Float64(180.0 / Float64(pi * angle_m)))));
	end
	return Float64(angle_s * tmp)
end
b_m = N[Abs[b], $MachinePrecision]
a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 9.4e+173], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(N[Power[Pi, 0.6666666666666666], $MachinePrecision] * N[(N[Power[Pi, 1/3], $MachinePrecision] * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[Exp[N[Log[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(1.0 / N[(180.0 / N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
a_m = \left|a\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 9.4 \cdot 10^{+173}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(2 \cdot \sin \left(e^{\log \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)}\right)\right)\right)\right) \cdot \cos \left(\frac{1}{\frac{180}{\pi \cdot angle\_m}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 9.4000000000000003e173

    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. 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. lift-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left({\mathsf{PI}\left(\right)}^{\frac{2}{3}} \cdot \left(\color{blue}{\sqrt[3]{\mathsf{PI}\left(\right)}} \cdot \left(angle \cdot \frac{1}{90}\right)\right)\right)\right) \]
      17. lower-*.f6471.1

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot \color{blue}{\left(angle \cdot 0.011111111111111112\right)}\right)\right)\right) \]
    6. Applied rewrites71.1%

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

    if 9.4000000000000003e173 < b

    1. Initial program 29.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 \left(\color{blue}{\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. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      22. metadata-eval71.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \color{blue}{\left(e^{\left(-\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot -1}\right)}\right)\right)\right) \cdot \cos \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification67.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 9.4 \cdot 10^{+173}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left({\pi}^{0.6666666666666666} \cdot \left(\sqrt[3]{\pi} \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)\right)\right) \cdot \cos \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 67.3% accurate, 0.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -\infty:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \sqrt{\pi}\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) (sin t_0)) (cos t_0))
         (- INFINITY))
      (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* PI angle_m))))
      (*
       (+ b_m a_m)
       (*
        (- b_m a_m)
        (sin
         (* (sqrt PI) (* (* angle_m 0.011111111111111112) (sqrt PI))))))))))
b_m = fabs(b);
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (pow(b_m, 2.0) - pow(a_m, 2.0))) * sin(t_0)) * cos(t_0)) <= -((double) INFINITY)) {
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (((double) M_PI) * angle_m)));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((sqrt(((double) M_PI)) * ((angle_m * 0.011111111111111112) * sqrt(((double) M_PI))))));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.PI * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= -Double.POSITIVE_INFINITY) {
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (Math.PI * angle_m)));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((Math.sqrt(Math.PI) * ((angle_m * 0.011111111111111112) * Math.sqrt(Math.PI)))));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = math.pi * (angle_m / 180.0)
	tmp = 0
	if (((2.0 * (math.pow(b_m, 2.0) - math.pow(a_m, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= -math.inf:
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (math.pi * angle_m)))
	else:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((math.sqrt(math.pi) * ((angle_m * 0.011111111111111112) * math.sqrt(math.pi)))))
	return angle_s * tmp
b_m = abs(b)
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a_m ^ 2.0))) * sin(t_0)) * cos(t_0)) <= Float64(-Inf))
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(pi * angle_m))));
	else
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(sqrt(pi) * Float64(Float64(angle_m * 0.011111111111111112) * sqrt(pi))))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	t_0 = pi * (angle_m / 180.0);
	tmp = 0.0;
	if ((((2.0 * ((b_m ^ 2.0) - (a_m ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -Inf)
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (pi * angle_m)));
	else
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((sqrt(pi) * ((angle_m * 0.011111111111111112) * sqrt(pi)))));
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $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]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
a_m = \left|a\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}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -\infty:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 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))))) < -inf.0

    1. Initial program 46.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 rewrites80.6%

      \[\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(\frac{1}{90} \cdot \left(angle \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(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
      2. lower-*.f64N/A

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

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

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \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 57.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 rewrites68.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. 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. lift-PI.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    \[\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 -\infty:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.1% accurate, 0.8× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -\infty:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (/ angle_m 180.0))))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b_m 2.0) (pow a_m 2.0))) (sin t_0)) (cos t_0))
         (- INFINITY))
      (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* PI angle_m))))
      (*
       (+ b_m a_m)
       (* (- b_m a_m) (sin (* PI (* angle_m 0.011111111111111112)))))))))
b_m = fabs(b);
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (pow(b_m, 2.0) - pow(a_m, 2.0))) * sin(t_0)) * cos(t_0)) <= -((double) INFINITY)) {
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (((double) M_PI) * angle_m)));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.PI * (angle_m / 180.0);
	double tmp;
	if ((((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= -Double.POSITIVE_INFINITY) {
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (Math.PI * angle_m)));
	} else {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = math.pi * (angle_m / 180.0)
	tmp = 0
	if (((2.0 * (math.pow(b_m, 2.0) - math.pow(a_m, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= -math.inf:
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (math.pi * angle_m)))
	else:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((math.pi * (angle_m * 0.011111111111111112))))
	return angle_s * tmp
b_m = abs(b)
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a_m ^ 2.0))) * sin(t_0)) * cos(t_0)) <= Float64(-Inf))
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(pi * angle_m))));
	else
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	t_0 = pi * (angle_m / 180.0);
	tmp = 0.0;
	if ((((2.0 * ((b_m ^ 2.0) - (a_m ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -Inf)
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (pi * angle_m)));
	else
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((pi * (angle_m * 0.011111111111111112))));
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
a_m = \left|a\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}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -\infty:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 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))))) < -inf.0

    1. Initial program 46.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 rewrites80.6%

      \[\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(\frac{1}{90} \cdot \left(angle \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(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
      2. lower-*.f64N/A

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

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

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \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 57.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 rewrites68.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. 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 \color{blue}{\left(\left(angle \cdot \frac{1}{90}\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
      5. lower-*.f64N/A

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

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

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(angle \cdot 0.011111111111111112\right) \cdot \pi\right)}\right) \]
  3. Recombined 2 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 -\infty:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 62.5% accurate, 1.0× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a\_m}^{2}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a\_m \cdot \pi\right) \cdot \left(a\_m \cdot angle\_m\right)\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-282}:\\ \;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(b\_m \cdot \left(b\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (- (pow b_m 2.0) (pow a_m 2.0))))
   (*
    angle_s
    (if (<= t_0 (- INFINITY))
      (* -0.011111111111111112 (* (* a_m PI) (* a_m angle_m)))
      (if (<= t_0 2e-282)
        (* (* PI angle_m) (* (* a_m a_m) -0.011111111111111112))
        (* 0.011111111111111112 (* b_m (* b_m (* PI angle_m)))))))))
b_m = fabs(b);
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = pow(b_m, 2.0) - pow(a_m, 2.0);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = -0.011111111111111112 * ((a_m * ((double) M_PI)) * (a_m * angle_m));
	} else if (t_0 <= 2e-282) {
		tmp = (((double) M_PI) * angle_m) * ((a_m * a_m) * -0.011111111111111112);
	} else {
		tmp = 0.011111111111111112 * (b_m * (b_m * (((double) M_PI) * angle_m)));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = -0.011111111111111112 * ((a_m * Math.PI) * (a_m * angle_m));
	} else if (t_0 <= 2e-282) {
		tmp = (Math.PI * angle_m) * ((a_m * a_m) * -0.011111111111111112);
	} else {
		tmp = 0.011111111111111112 * (b_m * (b_m * (Math.PI * angle_m)));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = math.pow(b_m, 2.0) - math.pow(a_m, 2.0)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = -0.011111111111111112 * ((a_m * math.pi) * (a_m * angle_m))
	elif t_0 <= 2e-282:
		tmp = (math.pi * angle_m) * ((a_m * a_m) * -0.011111111111111112)
	else:
		tmp = 0.011111111111111112 * (b_m * (b_m * (math.pi * angle_m)))
	return angle_s * tmp
b_m = abs(b)
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = Float64((b_m ^ 2.0) - (a_m ^ 2.0))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(-0.011111111111111112 * Float64(Float64(a_m * pi) * Float64(a_m * angle_m)));
	elseif (t_0 <= 2e-282)
		tmp = Float64(Float64(pi * angle_m) * Float64(Float64(a_m * a_m) * -0.011111111111111112));
	else
		tmp = Float64(0.011111111111111112 * Float64(b_m * Float64(b_m * Float64(pi * angle_m))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b_m, angle_m)
	t_0 = (b_m ^ 2.0) - (a_m ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = -0.011111111111111112 * ((a_m * pi) * (a_m * angle_m));
	elseif (t_0 <= 2e-282)
		tmp = (pi * angle_m) * ((a_m * a_m) * -0.011111111111111112);
	else
		tmp = 0.011111111111111112 * (b_m * (b_m * (pi * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(-0.011111111111111112 * N[(N[(a$95$m * Pi), $MachinePrecision] * N[(a$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e-282], N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(a$95$m * a$95$m), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(b$95$m * N[(b$95$m * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a\_m}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(a\_m \cdot \pi\right) \cdot \left(a\_m \cdot angle\_m\right)\right)\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-282}:\\
\;\;\;\;\left(\pi \cdot angle\_m\right) \cdot \left(\left(a\_m \cdot a\_m\right) \cdot -0.011111111111111112\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b\_m \cdot \left(b\_m \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 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -inf.0

    1. Initial program 48.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. 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. 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)} \]
    7. Step-by-step derivation
      1. Applied rewrites4.6%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
      2. 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)} \]
      3. Step-by-step derivation
        1. Applied rewrites54.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 rewrites77.7%

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

          if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 2e-282

          1. Initial program 71.3%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\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 rewrites67.2%

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

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

            1. Initial program 46.7%

              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            2. Add Preprocessing
            3. Taylor expanded in 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
            6. 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)} \]
            7. Step-by-step derivation
              1. Applied rewrites53.1%

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

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\pi \cdot angle\right) \cdot b\right) \cdot b\right) \]
              3. Recombined 3 regimes into one program.
              4. Final simplification67.9%

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

              Alternative 5: 62.5% accurate, 1.0× speedup?

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

                1. Initial program 53.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                6. 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)} \]
                7. Step-by-step derivation
                  1. Applied rewrites5.5%

                    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                  2. 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)} \]
                  3. Step-by-step derivation
                    1. Applied rewrites54.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 rewrites69.4%

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

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

                      1. Initial program 74.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                      6. 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)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites46.8%

                          \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                        2. 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)} \]
                        3. Step-by-step derivation
                          1. Applied rewrites70.9%

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

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

                          1. Initial program 46.7%

                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                          2. Add Preprocessing
                          3. Taylor expanded in 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                          6. 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)} \]
                          7. Step-by-step derivation
                            1. Applied rewrites53.1%

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

                                \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(\pi \cdot angle\right) \cdot b\right) \cdot b\right) \]
                            3. Recombined 3 regimes into one program.
                            4. Final simplification67.9%

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

                            Alternative 6: 62.5% accurate, 1.0× speedup?

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

                              1. Initial program 53.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                              6. 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)} \]
                              7. Step-by-step derivation
                                1. Applied rewrites5.5%

                                  \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                                2. 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)} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites54.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 rewrites69.4%

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

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

                                    1. Initial program 74.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                    6. 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)} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites46.8%

                                        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                                      2. 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)} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites70.9%

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

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

                                        1. Initial program 46.7%

                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                        6. 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)} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites53.1%

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

                                              \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(b \cdot \pi\right)\right) \cdot b\right) \]
                                          3. Recombined 3 regimes into one program.
                                          4. Final simplification67.8%

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

                                          Alternative 7: 65.3% accurate, 1.3× speedup?

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

                                            1. Initial program 64.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 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 0

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

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

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

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

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

                                            1. Initial program 46.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 rewrites68.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 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.f6468.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 rewrites68.8%

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

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

                                          Alternative 8: 67.0% accurate, 1.8× speedup?

                                          \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot -0.005555555555555556\right)\right) \cdot \left(2 \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \end{array} \]
                                          b_m = (fabs.f64 b)
                                          a_m = (fabs.f64 a)
                                          angle\_m = (fabs.f64 angle)
                                          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                          (FPCore (angle_s a_m b_m angle_m)
                                           :precision binary64
                                           (*
                                            angle_s
                                            (*
                                             (* (+ b_m a_m) (cos (* (* PI angle_m) -0.005555555555555556)))
                                             (* 2.0 (* (- b_m a_m) (sin (* PI (* angle_m 0.005555555555555556))))))))
                                          b_m = fabs(b);
                                          a_m = fabs(a);
                                          angle\_m = fabs(angle);
                                          angle\_s = copysign(1.0, angle);
                                          double code(double angle_s, double a_m, double b_m, double angle_m) {
                                          	return angle_s * (((b_m + a_m) * cos(((((double) M_PI) * angle_m) * -0.005555555555555556))) * (2.0 * ((b_m - a_m) * sin((((double) M_PI) * (angle_m * 0.005555555555555556))))));
                                          }
                                          
                                          b_m = Math.abs(b);
                                          a_m = Math.abs(a);
                                          angle\_m = Math.abs(angle);
                                          angle\_s = Math.copySign(1.0, angle);
                                          public static double code(double angle_s, double a_m, double b_m, double angle_m) {
                                          	return angle_s * (((b_m + a_m) * Math.cos(((Math.PI * angle_m) * -0.005555555555555556))) * (2.0 * ((b_m - a_m) * Math.sin((Math.PI * (angle_m * 0.005555555555555556))))));
                                          }
                                          
                                          b_m = math.fabs(b)
                                          a_m = math.fabs(a)
                                          angle\_m = math.fabs(angle)
                                          angle\_s = math.copysign(1.0, angle)
                                          def code(angle_s, a_m, b_m, angle_m):
                                          	return angle_s * (((b_m + a_m) * math.cos(((math.pi * angle_m) * -0.005555555555555556))) * (2.0 * ((b_m - a_m) * math.sin((math.pi * (angle_m * 0.005555555555555556))))))
                                          
                                          b_m = abs(b)
                                          a_m = abs(a)
                                          angle\_m = abs(angle)
                                          angle\_s = copysign(1.0, angle)
                                          function code(angle_s, a_m, b_m, angle_m)
                                          	return Float64(angle_s * Float64(Float64(Float64(b_m + a_m) * cos(Float64(Float64(pi * angle_m) * -0.005555555555555556))) * Float64(2.0 * Float64(Float64(b_m - a_m) * sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))))))
                                          end
                                          
                                          b_m = abs(b);
                                          a_m = abs(a);
                                          angle\_m = abs(angle);
                                          angle\_s = sign(angle) * abs(1.0);
                                          function tmp = code(angle_s, a_m, b_m, angle_m)
                                          	tmp = angle_s * (((b_m + a_m) * cos(((pi * angle_m) * -0.005555555555555556))) * (2.0 * ((b_m - a_m) * sin((pi * (angle_m * 0.005555555555555556))))));
                                          end
                                          
                                          b_m = N[Abs[b], $MachinePrecision]
                                          a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[Cos[N[(N[(Pi * angle$95$m), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          b_m = \left|b\right|
                                          \\
                                          a_m = \left|a\right|
                                          \\
                                          angle\_m = \left|angle\right|
                                          \\
                                          angle\_s = \mathsf{copysign}\left(1, angle\right)
                                          
                                          \\
                                          angle\_s \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \cos \left(\left(\pi \cdot angle\_m\right) \cdot -0.005555555555555556\right)\right) \cdot \left(2 \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right)
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 55.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 \left(\color{blue}{\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. *-commutativeN/A

                                              \[\leadsto \left(\color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\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) \]
                                            4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                            22. metadata-eval69.6

                                              \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                          4. Applied rewrites69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \left(\left(b + a\right) \cdot \cos \left(\left(\pi \cdot angle\right) \cdot -0.005555555555555556\right)\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \]
                                          9. Add Preprocessing

                                          Alternative 9: 57.5% accurate, 2.0× speedup?

                                          \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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\_m}^{2} \leq -1 \cdot 10^{-266}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \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)
                                          a_m = (fabs.f64 a)
                                          angle\_m = (fabs.f64 angle)
                                          angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                          (FPCore (angle_s a_m b_m angle_m)
                                           :precision binary64
                                           (*
                                            angle_s
                                            (if (<= (- (pow b_m 2.0) (pow a_m 2.0)) -1e-266)
                                              (* -0.011111111111111112 (* a_m (* a_m (* PI angle_m))))
                                              (* 0.011111111111111112 (* angle_m (* PI (* b_m b_m)))))))
                                          b_m = fabs(b);
                                          a_m = fabs(a);
                                          angle\_m = fabs(angle);
                                          angle\_s = copysign(1.0, angle);
                                          double code(double angle_s, double a_m, double b_m, double angle_m) {
                                          	double tmp;
                                          	if ((pow(b_m, 2.0) - pow(a_m, 2.0)) <= -1e-266) {
                                          		tmp = -0.011111111111111112 * (a_m * (a_m * (((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);
                                          a_m = Math.abs(a);
                                          angle\_m = Math.abs(angle);
                                          angle\_s = Math.copySign(1.0, angle);
                                          public static double code(double angle_s, double a_m, double b_m, double angle_m) {
                                          	double tmp;
                                          	if ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) <= -1e-266) {
                                          		tmp = -0.011111111111111112 * (a_m * (a_m * (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)
                                          a_m = math.fabs(a)
                                          angle\_m = math.fabs(angle)
                                          angle\_s = math.copysign(1.0, angle)
                                          def code(angle_s, a_m, b_m, angle_m):
                                          	tmp = 0
                                          	if (math.pow(b_m, 2.0) - math.pow(a_m, 2.0)) <= -1e-266:
                                          		tmp = -0.011111111111111112 * (a_m * (a_m * (math.pi * angle_m)))
                                          	else:
                                          		tmp = 0.011111111111111112 * (angle_m * (math.pi * (b_m * b_m)))
                                          	return angle_s * tmp
                                          
                                          b_m = abs(b)
                                          a_m = abs(a)
                                          angle\_m = abs(angle)
                                          angle\_s = copysign(1.0, angle)
                                          function code(angle_s, a_m, b_m, angle_m)
                                          	tmp = 0.0
                                          	if (Float64((b_m ^ 2.0) - (a_m ^ 2.0)) <= -1e-266)
                                          		tmp = Float64(-0.011111111111111112 * Float64(a_m * Float64(a_m * 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);
                                          a_m = abs(a);
                                          angle\_m = abs(angle);
                                          angle\_s = sign(angle) * abs(1.0);
                                          function tmp_2 = code(angle_s, a_m, b_m, angle_m)
                                          	tmp = 0.0;
                                          	if (((b_m ^ 2.0) - (a_m ^ 2.0)) <= -1e-266)
                                          		tmp = -0.011111111111111112 * (a_m * (a_m * (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]
                                          a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -1e-266], N[(-0.011111111111111112 * N[(a$95$m * N[(a$95$m * 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|
                                          \\
                                          a_m = \left|a\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\_m}^{2} \leq -1 \cdot 10^{-266}:\\
                                          \;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \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))) < -9.9999999999999998e-267

                                            1. Initial program 58.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                            6. 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)} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites13.9%

                                                \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                                              2. 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)} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites56.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 rewrites65.4%

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

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

                                                  1. Initial program 53.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                  6. 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)} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites57.6%

                                                      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                                                  8. Recombined 2 regimes into one program.
                                                  9. Add Preprocessing

                                                  Alternative 10: 62.1% accurate, 2.9× speedup?

                                                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+102}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot t\_0\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+192}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), \left(b\_m - a\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin t\_0 \cdot \left(-a\_m \cdot a\_m\right)\\ \end{array} \end{array} \end{array} \]
                                                  b_m = (fabs.f64 b)
                                                  a_m = (fabs.f64 a)
                                                  angle\_m = (fabs.f64 angle)
                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                  (FPCore (angle_s a_m b_m angle_m)
                                                   :precision binary64
                                                   (let* ((t_0 (* 0.011111111111111112 (* PI angle_m))))
                                                     (*
                                                      angle_s
                                                      (if (<= (/ angle_m 180.0) 1e+102)
                                                        (* (+ b_m a_m) (* (- b_m a_m) t_0))
                                                        (if (<= (/ angle_m 180.0) 5e+192)
                                                          (*
                                                           (+ b_m a_m)
                                                           (*
                                                            angle_m
                                                            (fma
                                                             (* -2.2862368541380886e-7 (* angle_m angle_m))
                                                             (* (- b_m a_m) (* PI (* PI PI)))
                                                             (* 0.011111111111111112 (* (- b_m a_m) PI)))))
                                                          (* (sin t_0) (- (* a_m a_m))))))))
                                                  b_m = fabs(b);
                                                  a_m = fabs(a);
                                                  angle\_m = fabs(angle);
                                                  angle\_s = copysign(1.0, angle);
                                                  double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                  	double t_0 = 0.011111111111111112 * (((double) M_PI) * angle_m);
                                                  	double tmp;
                                                  	if ((angle_m / 180.0) <= 1e+102) {
                                                  		tmp = (b_m + a_m) * ((b_m - a_m) * t_0);
                                                  	} else if ((angle_m / 180.0) <= 5e+192) {
                                                  		tmp = (b_m + a_m) * (angle_m * fma((-2.2862368541380886e-7 * (angle_m * angle_m)), ((b_m - a_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (0.011111111111111112 * ((b_m - a_m) * ((double) M_PI)))));
                                                  	} else {
                                                  		tmp = sin(t_0) * -(a_m * a_m);
                                                  	}
                                                  	return angle_s * tmp;
                                                  }
                                                  
                                                  b_m = abs(b)
                                                  a_m = abs(a)
                                                  angle\_m = abs(angle)
                                                  angle\_s = copysign(1.0, angle)
                                                  function code(angle_s, a_m, b_m, angle_m)
                                                  	t_0 = Float64(0.011111111111111112 * Float64(pi * angle_m))
                                                  	tmp = 0.0
                                                  	if (Float64(angle_m / 180.0) <= 1e+102)
                                                  		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * t_0));
                                                  	elseif (Float64(angle_m / 180.0) <= 5e+192)
                                                  		tmp = Float64(Float64(b_m + a_m) * Float64(angle_m * fma(Float64(-2.2862368541380886e-7 * Float64(angle_m * angle_m)), Float64(Float64(b_m - a_m) * Float64(pi * Float64(pi * pi))), Float64(0.011111111111111112 * Float64(Float64(b_m - a_m) * pi)))));
                                                  	else
                                                  		tmp = Float64(sin(t_0) * Float64(-Float64(a_m * a_m)));
                                                  	end
                                                  	return Float64(angle_s * tmp)
                                                  end
                                                  
                                                  b_m = N[Abs[b], $MachinePrecision]
                                                  a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+102], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+192], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(-2.2862368541380886e-7 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[t$95$0], $MachinePrecision] * (-N[(a$95$m * a$95$m), $MachinePrecision])), $MachinePrecision]]]), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  b_m = \left|b\right|
                                                  \\
                                                  a_m = \left|a\right|
                                                  \\
                                                  angle\_m = \left|angle\right|
                                                  \\
                                                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\\
                                                  angle\_s \cdot \begin{array}{l}
                                                  \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+102}:\\
                                                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot t\_0\right)\\
                                                  
                                                  \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+192}:\\
                                                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), \left(b\_m - a\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\sin t\_0 \cdot \left(-a\_m \cdot a\_m\right)\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 3 regimes
                                                  2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999977e101

                                                    1. Initial program 60.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 rewrites78.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 angle around 0

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

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

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

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

                                                    if 9.99999999999999977e101 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000033e192

                                                    1. Initial program 11.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. 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 rewrites18.6%

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      11. unpow2N/A

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

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

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

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      15. lower-*.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      16. lower-PI.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      17. lower-PI.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      18. lower-*.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                                                    7. Applied rewrites44.0%

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

                                                    if 5.00000000000000033e192 < (/.f64 angle #s(literal 180 binary64))

                                                    1. Initial program 29.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 rewrites27.6%

                                                      \[\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.f6421.4

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

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

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

                                                  Alternative 11: 65.2% accurate, 3.1× speedup?

                                                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 10^{+95}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
                                                  b_m = (fabs.f64 b)
                                                  a_m = (fabs.f64 a)
                                                  angle\_m = (fabs.f64 angle)
                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                  (FPCore (angle_s a_m b_m angle_m)
                                                   :precision binary64
                                                   (*
                                                    angle_s
                                                    (if (<= (/ angle_m 180.0) 1e+95)
                                                      (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* PI angle_m))))
                                                      (*
                                                       (* (+ b_m a_m) (- b_m a_m))
                                                       (sin (* angle_m (* PI 0.011111111111111112)))))))
                                                  b_m = fabs(b);
                                                  a_m = fabs(a);
                                                  angle\_m = fabs(angle);
                                                  angle\_s = copysign(1.0, angle);
                                                  double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                  	double tmp;
                                                  	if ((angle_m / 180.0) <= 1e+95) {
                                                  		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (((double) M_PI) * angle_m)));
                                                  	} else {
                                                  		tmp = ((b_m + a_m) * (b_m - a_m)) * sin((angle_m * (((double) M_PI) * 0.011111111111111112)));
                                                  	}
                                                  	return angle_s * tmp;
                                                  }
                                                  
                                                  b_m = Math.abs(b);
                                                  a_m = Math.abs(a);
                                                  angle\_m = Math.abs(angle);
                                                  angle\_s = Math.copySign(1.0, angle);
                                                  public static double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                  	double tmp;
                                                  	if ((angle_m / 180.0) <= 1e+95) {
                                                  		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (Math.PI * angle_m)));
                                                  	} else {
                                                  		tmp = ((b_m + a_m) * (b_m - a_m)) * Math.sin((angle_m * (Math.PI * 0.011111111111111112)));
                                                  	}
                                                  	return angle_s * tmp;
                                                  }
                                                  
                                                  b_m = math.fabs(b)
                                                  a_m = math.fabs(a)
                                                  angle\_m = math.fabs(angle)
                                                  angle\_s = math.copysign(1.0, angle)
                                                  def code(angle_s, a_m, b_m, angle_m):
                                                  	tmp = 0
                                                  	if (angle_m / 180.0) <= 1e+95:
                                                  		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (math.pi * angle_m)))
                                                  	else:
                                                  		tmp = ((b_m + a_m) * (b_m - a_m)) * math.sin((angle_m * (math.pi * 0.011111111111111112)))
                                                  	return angle_s * tmp
                                                  
                                                  b_m = abs(b)
                                                  a_m = abs(a)
                                                  angle\_m = abs(angle)
                                                  angle\_s = copysign(1.0, angle)
                                                  function code(angle_s, a_m, b_m, angle_m)
                                                  	tmp = 0.0
                                                  	if (Float64(angle_m / 180.0) <= 1e+95)
                                                  		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(pi * angle_m))));
                                                  	else
                                                  		tmp = Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * sin(Float64(angle_m * Float64(pi * 0.011111111111111112))));
                                                  	end
                                                  	return Float64(angle_s * tmp)
                                                  end
                                                  
                                                  b_m = abs(b);
                                                  a_m = abs(a);
                                                  angle\_m = abs(angle);
                                                  angle\_s = sign(angle) * abs(1.0);
                                                  function tmp_2 = code(angle_s, a_m, b_m, angle_m)
                                                  	tmp = 0.0;
                                                  	if ((angle_m / 180.0) <= 1e+95)
                                                  		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (pi * angle_m)));
                                                  	else
                                                  		tmp = ((b_m + a_m) * (b_m - a_m)) * sin((angle_m * (pi * 0.011111111111111112)));
                                                  	end
                                                  	tmp_2 = angle_s * tmp;
                                                  end
                                                  
                                                  b_m = N[Abs[b], $MachinePrecision]
                                                  a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+95], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  b_m = \left|b\right|
                                                  \\
                                                  a_m = \left|a\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 10^{+95}:\\
                                                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000002e95

                                                    1. Initial program 60.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 rewrites78.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(\frac{1}{90} \cdot \left(angle \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(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                                                      2. lower-*.f64N/A

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

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

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

                                                    if 1.00000000000000002e95 < (/.f64 angle #s(literal 180 binary64))

                                                    1. Initial program 25.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 rewrites27.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 \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. lift-+.f64N/A

                                                        \[\leadsto \left(\color{blue}{\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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right) \]
                                                      18. difference-of-squaresN/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) \]
                                                      19. lift-+.f64N/A

                                                        \[\leadsto \left(\color{blue}{\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) \]
                                                      20. lift--.f64N/A

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

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

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

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

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

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

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

                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+95}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
                                                  5. Add Preprocessing

                                                  Alternative 12: 67.5% accurate, 3.6× speedup?

                                                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right) \end{array} \]
                                                  b_m = (fabs.f64 b)
                                                  a_m = (fabs.f64 a)
                                                  angle\_m = (fabs.f64 angle)
                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                  (FPCore (angle_s a_m b_m angle_m)
                                                   :precision binary64
                                                   (*
                                                    angle_s
                                                    (*
                                                     (+ b_m a_m)
                                                     (* (- b_m a_m) (sin (* 0.011111111111111112 (* PI angle_m)))))))
                                                  b_m = fabs(b);
                                                  a_m = fabs(a);
                                                  angle\_m = fabs(angle);
                                                  angle\_s = copysign(1.0, angle);
                                                  double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                  	return angle_s * ((b_m + a_m) * ((b_m - a_m) * sin((0.011111111111111112 * (((double) M_PI) * angle_m)))));
                                                  }
                                                  
                                                  b_m = Math.abs(b);
                                                  a_m = Math.abs(a);
                                                  angle\_m = Math.abs(angle);
                                                  angle\_s = Math.copySign(1.0, angle);
                                                  public static double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                  	return angle_s * ((b_m + a_m) * ((b_m - a_m) * Math.sin((0.011111111111111112 * (Math.PI * angle_m)))));
                                                  }
                                                  
                                                  b_m = math.fabs(b)
                                                  a_m = math.fabs(a)
                                                  angle\_m = math.fabs(angle)
                                                  angle\_s = math.copysign(1.0, angle)
                                                  def code(angle_s, a_m, b_m, angle_m):
                                                  	return angle_s * ((b_m + a_m) * ((b_m - a_m) * math.sin((0.011111111111111112 * (math.pi * angle_m)))))
                                                  
                                                  b_m = abs(b)
                                                  a_m = abs(a)
                                                  angle\_m = abs(angle)
                                                  angle\_s = copysign(1.0, angle)
                                                  function code(angle_s, a_m, b_m, angle_m)
                                                  	return Float64(angle_s * Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(0.011111111111111112 * Float64(pi * angle_m))))))
                                                  end
                                                  
                                                  b_m = abs(b);
                                                  a_m = abs(a);
                                                  angle\_m = abs(angle);
                                                  angle\_s = sign(angle) * abs(1.0);
                                                  function tmp = code(angle_s, a_m, b_m, angle_m)
                                                  	tmp = angle_s * ((b_m + a_m) * ((b_m - a_m) * sin((0.011111111111111112 * (pi * angle_m)))));
                                                  end
                                                  
                                                  b_m = N[Abs[b], $MachinePrecision]
                                                  a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  b_m = \left|b\right|
                                                  \\
                                                  a_m = \left|a\right|
                                                  \\
                                                  angle\_m = \left|angle\right|
                                                  \\
                                                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                  
                                                  \\
                                                  angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Initial program 55.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 rewrites70.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. Final simplification70.5%

                                                    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right) \]
                                                  6. Add Preprocessing

                                                  Alternative 13: 63.1% accurate, 4.8× speedup?

                                                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 10^{+102}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+192}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), \left(b\_m - a\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
                                                  b_m = (fabs.f64 b)
                                                  a_m = (fabs.f64 a)
                                                  angle\_m = (fabs.f64 angle)
                                                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                  (FPCore (angle_s a_m b_m angle_m)
                                                   :precision binary64
                                                   (*
                                                    angle_s
                                                    (if (<= (/ angle_m 180.0) 1e+102)
                                                      (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* PI angle_m))))
                                                      (if (<= (/ angle_m 180.0) 5e+192)
                                                        (*
                                                         (+ b_m a_m)
                                                         (*
                                                          angle_m
                                                          (fma
                                                           (* -2.2862368541380886e-7 (* angle_m angle_m))
                                                           (* (- b_m a_m) (* PI (* PI PI)))
                                                           (* 0.011111111111111112 (* (- b_m a_m) PI)))))
                                                        (*
                                                         angle_m
                                                         (* (* (+ b_m a_m) (- b_m a_m)) (* PI 0.011111111111111112)))))))
                                                  b_m = fabs(b);
                                                  a_m = fabs(a);
                                                  angle\_m = fabs(angle);
                                                  angle\_s = copysign(1.0, angle);
                                                  double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                  	double tmp;
                                                  	if ((angle_m / 180.0) <= 1e+102) {
                                                  		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (((double) M_PI) * angle_m)));
                                                  	} else if ((angle_m / 180.0) <= 5e+192) {
                                                  		tmp = (b_m + a_m) * (angle_m * fma((-2.2862368541380886e-7 * (angle_m * angle_m)), ((b_m - a_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (0.011111111111111112 * ((b_m - a_m) * ((double) M_PI)))));
                                                  	} else {
                                                  		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (((double) M_PI) * 0.011111111111111112));
                                                  	}
                                                  	return angle_s * tmp;
                                                  }
                                                  
                                                  b_m = abs(b)
                                                  a_m = abs(a)
                                                  angle\_m = abs(angle)
                                                  angle\_s = copysign(1.0, angle)
                                                  function code(angle_s, a_m, b_m, angle_m)
                                                  	tmp = 0.0
                                                  	if (Float64(angle_m / 180.0) <= 1e+102)
                                                  		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(pi * angle_m))));
                                                  	elseif (Float64(angle_m / 180.0) <= 5e+192)
                                                  		tmp = Float64(Float64(b_m + a_m) * Float64(angle_m * fma(Float64(-2.2862368541380886e-7 * Float64(angle_m * angle_m)), Float64(Float64(b_m - a_m) * Float64(pi * Float64(pi * pi))), Float64(0.011111111111111112 * Float64(Float64(b_m - a_m) * pi)))));
                                                  	else
                                                  		tmp = Float64(angle_m * Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * Float64(pi * 0.011111111111111112)));
                                                  	end
                                                  	return Float64(angle_s * tmp)
                                                  end
                                                  
                                                  b_m = N[Abs[b], $MachinePrecision]
                                                  a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+102], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+192], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(angle$95$m * N[(N[(-2.2862368541380886e-7 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle$95$m * N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  b_m = \left|b\right|
                                                  \\
                                                  a_m = \left|a\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 10^{+102}:\\
                                                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
                                                  
                                                  \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+192}:\\
                                                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right), \left(b\_m - a\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 3 regimes
                                                  2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999977e101

                                                    1. Initial program 60.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 rewrites78.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 angle around 0

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

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

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

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

                                                    if 9.99999999999999977e101 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000033e192

                                                    1. Initial program 11.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. 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 rewrites18.6%

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      11. unpow2N/A

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

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

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

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      15. lower-*.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      16. lower-PI.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      17. lower-PI.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
                                                      18. lower-*.f64N/A

                                                        \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\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 \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                                                    7. Applied rewrites44.0%

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

                                                    if 5.00000000000000033e192 < (/.f64 angle #s(literal 180 binary64))

                                                    1. Initial program 29.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    Alternative 14: 63.1% accurate, 5.2× speedup?

                                                    \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 10^{+102}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+192}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(0.011111111111111112, \pi, \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
                                                    b_m = (fabs.f64 b)
                                                    a_m = (fabs.f64 a)
                                                    angle\_m = (fabs.f64 angle)
                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                    (FPCore (angle_s a_m b_m angle_m)
                                                     :precision binary64
                                                     (*
                                                      angle_s
                                                      (if (<= (/ angle_m 180.0) 1e+102)
                                                        (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* PI angle_m))))
                                                        (if (<= (/ angle_m 180.0) 5e+192)
                                                          (*
                                                           (+ b_m a_m)
                                                           (*
                                                            (- b_m a_m)
                                                            (*
                                                             angle_m
                                                             (fma
                                                              0.011111111111111112
                                                              PI
                                                              (*
                                                               (* -2.2862368541380886e-7 (* angle_m angle_m))
                                                               (* PI (* PI PI)))))))
                                                          (*
                                                           angle_m
                                                           (* (* (+ b_m a_m) (- b_m a_m)) (* PI 0.011111111111111112)))))))
                                                    b_m = fabs(b);
                                                    a_m = fabs(a);
                                                    angle\_m = fabs(angle);
                                                    angle\_s = copysign(1.0, angle);
                                                    double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                    	double tmp;
                                                    	if ((angle_m / 180.0) <= 1e+102) {
                                                    		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (((double) M_PI) * angle_m)));
                                                    	} else if ((angle_m / 180.0) <= 5e+192) {
                                                    		tmp = (b_m + a_m) * ((b_m - a_m) * (angle_m * fma(0.011111111111111112, ((double) M_PI), ((-2.2862368541380886e-7 * (angle_m * angle_m)) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))))));
                                                    	} else {
                                                    		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (((double) M_PI) * 0.011111111111111112));
                                                    	}
                                                    	return angle_s * tmp;
                                                    }
                                                    
                                                    b_m = abs(b)
                                                    a_m = abs(a)
                                                    angle\_m = abs(angle)
                                                    angle\_s = copysign(1.0, angle)
                                                    function code(angle_s, a_m, b_m, angle_m)
                                                    	tmp = 0.0
                                                    	if (Float64(angle_m / 180.0) <= 1e+102)
                                                    		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(pi * angle_m))));
                                                    	elseif (Float64(angle_m / 180.0) <= 5e+192)
                                                    		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(angle_m * fma(0.011111111111111112, pi, Float64(Float64(-2.2862368541380886e-7 * Float64(angle_m * angle_m)) * Float64(pi * Float64(pi * pi)))))));
                                                    	else
                                                    		tmp = Float64(angle_m * Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * Float64(pi * 0.011111111111111112)));
                                                    	end
                                                    	return Float64(angle_s * tmp)
                                                    end
                                                    
                                                    b_m = N[Abs[b], $MachinePrecision]
                                                    a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+102], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+192], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(angle$95$m * N[(0.011111111111111112 * Pi + N[(N[(-2.2862368541380886e-7 * N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle$95$m * N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                                                    
                                                    \begin{array}{l}
                                                    b_m = \left|b\right|
                                                    \\
                                                    a_m = \left|a\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 10^{+102}:\\
                                                    \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
                                                    
                                                    \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+192}:\\
                                                    \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(0.011111111111111112, \pi, \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle\_m \cdot angle\_m\right)\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right)\right)\right)\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 3 regimes
                                                    2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999977e101

                                                      1. Initial program 60.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 rewrites78.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 angle around 0

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

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

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

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

                                                      if 9.99999999999999977e101 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000033e192

                                                      1. Initial program 11.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. 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 rewrites18.6%

                                                        \[\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. +-commutativeN/A

                                                          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right) + \frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)}\right)\right) \]
                                                        3. 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}{90}, \mathsf{PI}\left(\right), \frac{-1}{4374000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right)}\right)\right) \]
                                                        4. lower-PI.f64N/A

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

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

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

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

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

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

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

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

                                                          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{1}{90}, \mathsf{PI}\left(\right), \left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right)\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {\mathsf{PI}\left(\right)}^{2}\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}{90}, \mathsf{PI}\left(\right), \left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right)\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)\right)\right) \]
                                                        14. unpow2N/A

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

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

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

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

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

                                                      if 5.00000000000000033e192 < (/.f64 angle #s(literal 180 binary64))

                                                      1. Initial program 29.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 15: 64.1% accurate, 10.3× speedup?

                                                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 5 \cdot 10^{-9}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
                                                      b_m = (fabs.f64 b)
                                                      a_m = (fabs.f64 a)
                                                      angle\_m = (fabs.f64 angle)
                                                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                      (FPCore (angle_s a_m b_m angle_m)
                                                       :precision binary64
                                                       (*
                                                        angle_s
                                                        (if (<= (/ angle_m 180.0) 5e-9)
                                                          (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* PI angle_m))))
                                                          (* angle_m (* (* (+ b_m a_m) (- b_m a_m)) (* PI 0.011111111111111112))))))
                                                      b_m = fabs(b);
                                                      a_m = fabs(a);
                                                      angle\_m = fabs(angle);
                                                      angle\_s = copysign(1.0, angle);
                                                      double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                      	double tmp;
                                                      	if ((angle_m / 180.0) <= 5e-9) {
                                                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (((double) M_PI) * angle_m)));
                                                      	} else {
                                                      		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (((double) M_PI) * 0.011111111111111112));
                                                      	}
                                                      	return angle_s * tmp;
                                                      }
                                                      
                                                      b_m = Math.abs(b);
                                                      a_m = Math.abs(a);
                                                      angle\_m = Math.abs(angle);
                                                      angle\_s = Math.copySign(1.0, angle);
                                                      public static double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                      	double tmp;
                                                      	if ((angle_m / 180.0) <= 5e-9) {
                                                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (Math.PI * angle_m)));
                                                      	} else {
                                                      		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (Math.PI * 0.011111111111111112));
                                                      	}
                                                      	return angle_s * tmp;
                                                      }
                                                      
                                                      b_m = math.fabs(b)
                                                      a_m = math.fabs(a)
                                                      angle\_m = math.fabs(angle)
                                                      angle\_s = math.copysign(1.0, angle)
                                                      def code(angle_s, a_m, b_m, angle_m):
                                                      	tmp = 0
                                                      	if (angle_m / 180.0) <= 5e-9:
                                                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (math.pi * angle_m)))
                                                      	else:
                                                      		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (math.pi * 0.011111111111111112))
                                                      	return angle_s * tmp
                                                      
                                                      b_m = abs(b)
                                                      a_m = abs(a)
                                                      angle\_m = abs(angle)
                                                      angle\_s = copysign(1.0, angle)
                                                      function code(angle_s, a_m, b_m, angle_m)
                                                      	tmp = 0.0
                                                      	if (Float64(angle_m / 180.0) <= 5e-9)
                                                      		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(pi * angle_m))));
                                                      	else
                                                      		tmp = Float64(angle_m * Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * Float64(pi * 0.011111111111111112)));
                                                      	end
                                                      	return Float64(angle_s * tmp)
                                                      end
                                                      
                                                      b_m = abs(b);
                                                      a_m = abs(a);
                                                      angle\_m = abs(angle);
                                                      angle\_s = sign(angle) * abs(1.0);
                                                      function tmp_2 = code(angle_s, a_m, b_m, angle_m)
                                                      	tmp = 0.0;
                                                      	if ((angle_m / 180.0) <= 5e-9)
                                                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (pi * angle_m)));
                                                      	else
                                                      		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (pi * 0.011111111111111112));
                                                      	end
                                                      	tmp_2 = angle_s * tmp;
                                                      end
                                                      
                                                      b_m = N[Abs[b], $MachinePrecision]
                                                      a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e-9], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle$95$m * N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                      
                                                      \begin{array}{l}
                                                      b_m = \left|b\right|
                                                      \\
                                                      a_m = \left|a\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 5 \cdot 10^{-9}:\\
                                                      \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if (/.f64 angle #s(literal 180 binary64)) < 5.0000000000000001e-9

                                                        1. Initial program 63.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. 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 rewrites82.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(\frac{1}{90} \cdot \left(angle \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(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                                                          2. lower-*.f64N/A

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

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

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

                                                        if 5.0000000000000001e-9 < (/.f64 angle #s(literal 180 binary64))

                                                        1. Initial program 31.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{angle} \]
                                                        7. Recombined 2 regimes into one program.
                                                        8. Final simplification66.8%

                                                          \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-9}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
                                                        9. Add Preprocessing

                                                        Alternative 16: 64.1% accurate, 10.3× speedup?

                                                        \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\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 0.04:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
                                                        b_m = (fabs.f64 b)
                                                        a_m = (fabs.f64 a)
                                                        angle\_m = (fabs.f64 angle)
                                                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                        (FPCore (angle_s a_m b_m angle_m)
                                                         :precision binary64
                                                         (*
                                                          angle_s
                                                          (if (<= (/ angle_m 180.0) 0.04)
                                                            (* (+ b_m a_m) (* (* angle_m 0.011111111111111112) (* (- b_m a_m) PI)))
                                                            (* angle_m (* (* (+ b_m a_m) (- b_m a_m)) (* PI 0.011111111111111112))))))
                                                        b_m = fabs(b);
                                                        a_m = fabs(a);
                                                        angle\_m = fabs(angle);
                                                        angle\_s = copysign(1.0, angle);
                                                        double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                        	double tmp;
                                                        	if ((angle_m / 180.0) <= 0.04) {
                                                        		tmp = (b_m + a_m) * ((angle_m * 0.011111111111111112) * ((b_m - a_m) * ((double) M_PI)));
                                                        	} else {
                                                        		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (((double) M_PI) * 0.011111111111111112));
                                                        	}
                                                        	return angle_s * tmp;
                                                        }
                                                        
                                                        b_m = Math.abs(b);
                                                        a_m = Math.abs(a);
                                                        angle\_m = Math.abs(angle);
                                                        angle\_s = Math.copySign(1.0, angle);
                                                        public static double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                        	double tmp;
                                                        	if ((angle_m / 180.0) <= 0.04) {
                                                        		tmp = (b_m + a_m) * ((angle_m * 0.011111111111111112) * ((b_m - a_m) * Math.PI));
                                                        	} else {
                                                        		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (Math.PI * 0.011111111111111112));
                                                        	}
                                                        	return angle_s * tmp;
                                                        }
                                                        
                                                        b_m = math.fabs(b)
                                                        a_m = math.fabs(a)
                                                        angle\_m = math.fabs(angle)
                                                        angle\_s = math.copysign(1.0, angle)
                                                        def code(angle_s, a_m, b_m, angle_m):
                                                        	tmp = 0
                                                        	if (angle_m / 180.0) <= 0.04:
                                                        		tmp = (b_m + a_m) * ((angle_m * 0.011111111111111112) * ((b_m - a_m) * math.pi))
                                                        	else:
                                                        		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (math.pi * 0.011111111111111112))
                                                        	return angle_s * tmp
                                                        
                                                        b_m = abs(b)
                                                        a_m = abs(a)
                                                        angle\_m = abs(angle)
                                                        angle\_s = copysign(1.0, angle)
                                                        function code(angle_s, a_m, b_m, angle_m)
                                                        	tmp = 0.0
                                                        	if (Float64(angle_m / 180.0) <= 0.04)
                                                        		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(angle_m * 0.011111111111111112) * Float64(Float64(b_m - a_m) * pi)));
                                                        	else
                                                        		tmp = Float64(angle_m * Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * Float64(pi * 0.011111111111111112)));
                                                        	end
                                                        	return Float64(angle_s * tmp)
                                                        end
                                                        
                                                        b_m = abs(b);
                                                        a_m = abs(a);
                                                        angle\_m = abs(angle);
                                                        angle\_s = sign(angle) * abs(1.0);
                                                        function tmp_2 = code(angle_s, a_m, b_m, angle_m)
                                                        	tmp = 0.0;
                                                        	if ((angle_m / 180.0) <= 0.04)
                                                        		tmp = (b_m + a_m) * ((angle_m * 0.011111111111111112) * ((b_m - a_m) * pi));
                                                        	else
                                                        		tmp = angle_m * (((b_m + a_m) * (b_m - a_m)) * (pi * 0.011111111111111112));
                                                        	end
                                                        	tmp_2 = angle_s * tmp;
                                                        end
                                                        
                                                        b_m = N[Abs[b], $MachinePrecision]
                                                        a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 0.04], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle$95$m * N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                        
                                                        \begin{array}{l}
                                                        b_m = \left|b\right|
                                                        \\
                                                        a_m = \left|a\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 0.04:\\
                                                        \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;angle\_m \cdot \left(\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if (/.f64 angle #s(literal 180 binary64)) < 0.0400000000000000008

                                                          1. Initial program 63.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 rewrites82.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. 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 - a\right)\right)\right)\right)} \]
                                                          6. Step-by-step derivation
                                                            1. associate-*r*N/A

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

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

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

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

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

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

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

                                                          if 0.0400000000000000008 < (/.f64 angle #s(literal 180 binary64))

                                                          1. Initial program 30.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \left(\left(\pi \cdot 0.011111111111111112\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{angle} \]
                                                          7. Recombined 2 regimes into one program.
                                                          8. Final simplification66.7%

                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 0.04:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\\ \end{array} \]
                                                          9. Add Preprocessing

                                                          Alternative 17: 40.0% accurate, 16.8× speedup?

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

                                                            1. Initial program 59.7%

                                                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                            2. Add Preprocessing
                                                            3. Taylor expanded in 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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                            6. 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)} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites45.4%

                                                                \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                                                              2. 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)} \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites34.8%

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

                                                                if 1.00000000000000006e63 < a

                                                                1. Initial program 34.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                  \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                6. 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)} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites19.6%

                                                                    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                                                                  2. 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)} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites39.1%

                                                                      \[\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.6%

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

                                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 10^{+63}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(a \cdot \pi\right) \cdot \left(a \cdot angle\right)\right)\\ \end{array} \]
                                                                    5. Add Preprocessing

                                                                    Alternative 18: 38.6% accurate, 21.6× speedup?

                                                                    \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right) \end{array} \]
                                                                    b_m = (fabs.f64 b)
                                                                    a_m = (fabs.f64 a)
                                                                    angle\_m = (fabs.f64 angle)
                                                                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                                                                    (FPCore (angle_s a_m b_m angle_m)
                                                                     :precision binary64
                                                                     (* angle_s (* -0.011111111111111112 (* a_m (* a_m (* PI angle_m))))))
                                                                    b_m = fabs(b);
                                                                    a_m = fabs(a);
                                                                    angle\_m = fabs(angle);
                                                                    angle\_s = copysign(1.0, angle);
                                                                    double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                                    	return angle_s * (-0.011111111111111112 * (a_m * (a_m * (((double) M_PI) * angle_m))));
                                                                    }
                                                                    
                                                                    b_m = Math.abs(b);
                                                                    a_m = Math.abs(a);
                                                                    angle\_m = Math.abs(angle);
                                                                    angle\_s = Math.copySign(1.0, angle);
                                                                    public static double code(double angle_s, double a_m, double b_m, double angle_m) {
                                                                    	return angle_s * (-0.011111111111111112 * (a_m * (a_m * (Math.PI * angle_m))));
                                                                    }
                                                                    
                                                                    b_m = math.fabs(b)
                                                                    a_m = math.fabs(a)
                                                                    angle\_m = math.fabs(angle)
                                                                    angle\_s = math.copysign(1.0, angle)
                                                                    def code(angle_s, a_m, b_m, angle_m):
                                                                    	return angle_s * (-0.011111111111111112 * (a_m * (a_m * (math.pi * angle_m))))
                                                                    
                                                                    b_m = abs(b)
                                                                    a_m = abs(a)
                                                                    angle\_m = abs(angle)
                                                                    angle\_s = copysign(1.0, angle)
                                                                    function code(angle_s, a_m, b_m, angle_m)
                                                                    	return Float64(angle_s * Float64(-0.011111111111111112 * Float64(a_m * Float64(a_m * Float64(pi * angle_m)))))
                                                                    end
                                                                    
                                                                    b_m = abs(b);
                                                                    a_m = abs(a);
                                                                    angle\_m = abs(angle);
                                                                    angle\_s = sign(angle) * abs(1.0);
                                                                    function tmp = code(angle_s, a_m, b_m, angle_m)
                                                                    	tmp = angle_s * (-0.011111111111111112 * (a_m * (a_m * (pi * angle_m))));
                                                                    end
                                                                    
                                                                    b_m = N[Abs[b], $MachinePrecision]
                                                                    a_m = N[Abs[a], $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$95$m_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(-0.011111111111111112 * N[(a$95$m * N[(a$95$m * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                    
                                                                    \begin{array}{l}
                                                                    b_m = \left|b\right|
                                                                    \\
                                                                    a_m = \left|a\right|
                                                                    \\
                                                                    angle\_m = \left|angle\right|
                                                                    \\
                                                                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                                                                    
                                                                    \\
                                                                    angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(\pi \cdot angle\_m\right)\right)\right)\right)
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Initial program 55.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                                    6. 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)} \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites40.9%

                                                                        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                                                                      2. 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)} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites35.6%

                                                                          \[\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 rewrites37.0%

                                                                            \[\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 2024232 
                                                                          (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)))))