ab-angle->ABCF B

Percentage Accurate: 53.9% → 67.1%
Time: 16.6s
Alternatives: 20
Speedup: 16.8×

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 20 alternatives:

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

Initial Program: 53.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: 67.1% accurate, 1.4× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\ t_1 := \left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot t\_0\right)\right)\\ t_2 := \frac{1}{b\_m - a}\\ \mathbf{if}\;b\_m \leq 10^{+70}:\\ \;\;\;\;t\_1 \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\ \mathbf{elif}\;b\_m \leq 5 \cdot 10^{+170}:\\ \;\;\;\;t\_1 \cdot \cos \left(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right) \cdot \frac{angle}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_2 \cdot \frac{t\_0 \cdot \left(\left(b\_m - a\right) \cdot 2\right)}{t\_2}\right)\right) \cdot 1\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (sin (* PI (* angle 0.005555555555555556))))
        (t_1 (* (+ b_m a) (* (- b_m a) (* 2.0 t_0))))
        (t_2 (/ 1.0 (- b_m a))))
   (if (<= b_m 1e+70)
     (* t_1 (cos (* angle (* PI 0.005555555555555556))))
     (if (<= b_m 5e+170)
       (*
        t_1
        (cos (* (* (sqrt (* PI (sqrt PI))) (sqrt (sqrt PI))) (/ angle 180.0))))
       (* (* (+ b_m a) (* t_2 (/ (* t_0 (* (- b_m a) 2.0)) t_2))) 1.0)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = sin((((double) M_PI) * (angle * 0.005555555555555556)));
	double t_1 = (b_m + a) * ((b_m - a) * (2.0 * t_0));
	double t_2 = 1.0 / (b_m - a);
	double tmp;
	if (b_m <= 1e+70) {
		tmp = t_1 * cos((angle * (((double) M_PI) * 0.005555555555555556)));
	} else if (b_m <= 5e+170) {
		tmp = t_1 * cos(((sqrt((((double) M_PI) * sqrt(((double) M_PI)))) * sqrt(sqrt(((double) M_PI)))) * (angle / 180.0)));
	} else {
		tmp = ((b_m + a) * (t_2 * ((t_0 * ((b_m - a) * 2.0)) / t_2))) * 1.0;
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = Math.sin((Math.PI * (angle * 0.005555555555555556)));
	double t_1 = (b_m + a) * ((b_m - a) * (2.0 * t_0));
	double t_2 = 1.0 / (b_m - a);
	double tmp;
	if (b_m <= 1e+70) {
		tmp = t_1 * Math.cos((angle * (Math.PI * 0.005555555555555556)));
	} else if (b_m <= 5e+170) {
		tmp = t_1 * Math.cos(((Math.sqrt((Math.PI * Math.sqrt(Math.PI))) * Math.sqrt(Math.sqrt(Math.PI))) * (angle / 180.0)));
	} else {
		tmp = ((b_m + a) * (t_2 * ((t_0 * ((b_m - a) * 2.0)) / t_2))) * 1.0;
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = math.sin((math.pi * (angle * 0.005555555555555556)))
	t_1 = (b_m + a) * ((b_m - a) * (2.0 * t_0))
	t_2 = 1.0 / (b_m - a)
	tmp = 0
	if b_m <= 1e+70:
		tmp = t_1 * math.cos((angle * (math.pi * 0.005555555555555556)))
	elif b_m <= 5e+170:
		tmp = t_1 * math.cos(((math.sqrt((math.pi * math.sqrt(math.pi))) * math.sqrt(math.sqrt(math.pi))) * (angle / 180.0)))
	else:
		tmp = ((b_m + a) * (t_2 * ((t_0 * ((b_m - a) * 2.0)) / t_2))) * 1.0
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = sin(Float64(pi * Float64(angle * 0.005555555555555556)))
	t_1 = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * t_0)))
	t_2 = Float64(1.0 / Float64(b_m - a))
	tmp = 0.0
	if (b_m <= 1e+70)
		tmp = Float64(t_1 * cos(Float64(angle * Float64(pi * 0.005555555555555556))));
	elseif (b_m <= 5e+170)
		tmp = Float64(t_1 * cos(Float64(Float64(sqrt(Float64(pi * sqrt(pi))) * sqrt(sqrt(pi))) * Float64(angle / 180.0))));
	else
		tmp = Float64(Float64(Float64(b_m + a) * Float64(t_2 * Float64(Float64(t_0 * Float64(Float64(b_m - a) * 2.0)) / t_2))) * 1.0);
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	t_0 = sin((pi * (angle * 0.005555555555555556)));
	t_1 = (b_m + a) * ((b_m - a) * (2.0 * t_0));
	t_2 = 1.0 / (b_m - a);
	tmp = 0.0;
	if (b_m <= 1e+70)
		tmp = t_1 * cos((angle * (pi * 0.005555555555555556)));
	elseif (b_m <= 5e+170)
		tmp = t_1 * cos(((sqrt((pi * sqrt(pi))) * sqrt(sqrt(pi))) * (angle / 180.0)));
	else
		tmp = ((b_m + a) * (t_2 * ((t_0 * ((b_m - a) * 2.0)) / t_2))) * 1.0;
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 1e+70], N[(t$95$1 * N[Cos[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 5e+170], N[(t$95$1 * N[Cos[N[(N[(N[Sqrt[N[(Pi * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(t$95$2 * N[(N[(t$95$0 * N[(N[(b$95$m - a), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]]]
\begin{array}{l}
b_m = \left|b\right|

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

\mathbf{elif}\;b\_m \leq 5 \cdot 10^{+170}:\\
\;\;\;\;t\_1 \cdot \cos \left(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right) \cdot \frac{angle}{180}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_2 \cdot \frac{t\_0 \cdot \left(\left(b\_m - a\right) \cdot 2\right)}{t\_2}\right)\right) \cdot 1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 1.00000000000000007e70

    1. Initial program 55.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 \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-*.f6465.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-eval65.1

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

      \[\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. *-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(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
      6. 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 \frac{1}{180}\right) \cdot angle\right)} \]
      7. 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(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{180}}\right) \cdot angle\right) \]
      8. 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(\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}} \cdot angle\right) \]
      9. 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{\mathsf{PI}\left(\right)}{180} \cdot angle\right)} \]
      10. 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(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right) \]
      11. 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(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{180}}\right) \cdot angle\right) \]
      12. lower-*.f6467.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(\color{blue}{\left(\pi \cdot 0.005555555555555556\right)} \cdot angle\right) \]
    6. Applied rewrites67.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(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)} \]

    if 1.00000000000000007e70 < b < 4.99999999999999977e170

    1. Initial program 50.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 \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-*.f6465.7

        \[\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-eval68.7

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

      \[\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. rem-square-sqrtN/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(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)} \cdot \frac{angle}{180}\right) \]
      2. sqrt-unprodN/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}{\sqrt{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}} \cdot \frac{angle}{180}\right) \]
      3. lift-PI.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(\sqrt{\mathsf{PI}\left(\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}} \cdot \frac{angle}{180}\right) \]
      4. add-sqr-sqrtN/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(\sqrt{\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\sqrt{\mathsf{PI}\left(\right)} \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}} \cdot \frac{angle}{180}\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 \left(\sqrt{\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot \frac{angle}{180}\right) \]
      6. sqrt-prodN/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(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot \frac{angle}{180}\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 \left(\color{blue}{\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right)} \cdot \frac{angle}{180}\right) \]
      8. lower-sqrt.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(\left(\color{blue}{\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \frac{angle}{180}\right) \]
      9. 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 \left(\left(\sqrt{\color{blue}{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \frac{angle}{180}\right) \]
      10. lift-PI.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(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \frac{angle}{180}\right) \]
      11. lower-sqrt.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(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}} \cdot \sqrt{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot \frac{angle}{180}\right) \]
      12. lower-sqrt.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(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \color{blue}{\sqrt{\sqrt{\mathsf{PI}\left(\right)}}}\right) \cdot \frac{angle}{180}\right) \]
      13. lift-PI.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(\left(\sqrt{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt{\sqrt{\color{blue}{\mathsf{PI}\left(\right)}}}\right) \cdot \frac{angle}{180}\right) \]
      14. lower-sqrt.f6477.9

        \[\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(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\color{blue}{\sqrt{\pi}}}\right) \cdot \frac{angle}{180}\right) \]
    6. Applied rewrites77.9%

      \[\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(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)} \cdot \frac{angle}{180}\right) \]

    if 4.99999999999999977e170 < b

    1. Initial program 44.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-*.f6479.9

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

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

      \[\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. Taylor expanded in angle around 0

      \[\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 \color{blue}{1} \]
    6. Step-by-step derivation
      1. Applied rewrites88.4%

        \[\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 \color{blue}{1} \]
      2. Applied rewrites88.5%

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\frac{1}{b - a} \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot 2\right)}{\frac{1}{b - a}}\right)}\right) \cdot 1 \]
    7. Recombined 3 regimes into one program.
    8. Final simplification71.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 10^{+70}:\\ \;\;\;\;\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(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\ \mathbf{elif}\;b \leq 5 \cdot 10^{+170}:\\ \;\;\;\;\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(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right) \cdot \frac{angle}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(\frac{1}{b - a} \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot 2\right)}{\frac{1}{b - a}}\right)\right) \cdot 1\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 66.8% accurate, 0.8× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle}{180}\\ \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 5 \cdot 10^{+274}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    (FPCore (a b_m angle)
     :precision binary64
     (let* ((t_0 (* PI (/ angle 180.0))))
       (if (<=
            (* (* (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
            5e+274)
         (* (+ b_m a) (* (- b_m a) (sin (* 0.011111111111111112 (* PI angle)))))
         (*
          1.0
          (*
           (+ b_m a)
           (*
            (- b_m a)
            (*
             2.0
             (*
              angle
              (fma
               -2.8577960676726107e-8
               (* (* angle angle) (* PI (* PI PI)))
               (* PI 0.005555555555555556))))))))))
    b_m = fabs(b);
    double code(double a, double b_m, double angle) {
    	double t_0 = ((double) M_PI) * (angle / 180.0);
    	double tmp;
    	if ((((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= 5e+274) {
    		tmp = (b_m + a) * ((b_m - a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
    	} else {
    		tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * (angle * fma(-2.8577960676726107e-8, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.005555555555555556))))));
    	}
    	return tmp;
    }
    
    b_m = abs(b)
    function code(a, b_m, angle)
    	t_0 = Float64(pi * Float64(angle / 180.0))
    	tmp = 0.0
    	if (Float64(Float64(Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= 5e+274)
    		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle)))));
    	else
    		tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * Float64(angle * fma(-2.8577960676726107e-8, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.005555555555555556)))))));
    	end
    	return tmp
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], 5e+274], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[(angle * N[(-2.8577960676726107e-8 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    
    \\
    \begin{array}{l}
    t_0 := \pi \cdot \frac{angle}{180}\\
    \mathbf{if}\;\left(\left(2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq 5 \cdot 10^{+274}:\\
    \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\
    
    
    \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))))) < 4.9999999999999998e274

      1. Initial program 60.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 rewrites63.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)} \]

      if 4.9999999999999998e274 < (*.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 37.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 \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-*.f6474.8

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

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

        \[\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. Taylor expanded in angle around 0

        \[\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 \color{blue}{1} \]
      6. Step-by-step derivation
        1. Applied rewrites82.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 \color{blue}{1} \]
        2. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{34992000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{180} \cdot \mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \cdot 1 \]
          15. lower-PI.f6470.9

            \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.005555555555555556 \cdot \color{blue}{\pi}\right)\right)\right)\right)\right) \cdot 1 \]
        4. Applied rewrites70.9%

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.005555555555555556 \cdot \pi\right)\right)}\right)\right)\right) \cdot 1 \]
      7. Recombined 2 regimes into one program.
      8. Final simplification65.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 5 \cdot 10^{+274}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 3: 66.7% accurate, 1.2× speedup?

      \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \mathbf{if}\;{b\_m}^{2} - {a}^{2} \leq -1 \cdot 10^{-129}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\mathsf{fma}\left(b\_m, \frac{b\_m}{a \cdot a}, -1\right) \cdot \sin \left(2 \cdot t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\right) \cdot 1\\ \end{array} \end{array} \]
      b_m = (fabs.f64 b)
      (FPCore (a b_m angle)
       :precision binary64
       (let* ((t_0 (* PI (* angle 0.005555555555555556))))
         (if (<= (- (pow b_m 2.0) (pow a 2.0)) -1e-129)
           (* a (* a (* (fma b_m (/ b_m (* a a)) -1.0) (sin (* 2.0 t_0)))))
           (* (* (+ b_m a) (* (- b_m a) (* 2.0 (sin t_0)))) 1.0))))
      b_m = fabs(b);
      double code(double a, double b_m, double angle) {
      	double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
      	double tmp;
      	if ((pow(b_m, 2.0) - pow(a, 2.0)) <= -1e-129) {
      		tmp = a * (a * (fma(b_m, (b_m / (a * a)), -1.0) * sin((2.0 * t_0))));
      	} else {
      		tmp = ((b_m + a) * ((b_m - a) * (2.0 * sin(t_0)))) * 1.0;
      	}
      	return tmp;
      }
      
      b_m = abs(b)
      function code(a, b_m, angle)
      	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
      	tmp = 0.0
      	if (Float64((b_m ^ 2.0) - (a ^ 2.0)) <= -1e-129)
      		tmp = Float64(a * Float64(a * Float64(fma(b_m, Float64(b_m / Float64(a * a)), -1.0) * sin(Float64(2.0 * t_0)))));
      	else
      		tmp = Float64(Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(t_0)))) * 1.0);
      	end
      	return tmp
      end
      
      b_m = N[Abs[b], $MachinePrecision]
      code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -1e-129], N[(a * N[(a * N[(N[(b$95$m * N[(b$95$m / N[(a * a), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] * N[Sin[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]
      
      \begin{array}{l}
      b_m = \left|b\right|
      
      \\
      \begin{array}{l}
      t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
      \mathbf{if}\;{b\_m}^{2} - {a}^{2} \leq -1 \cdot 10^{-129}:\\
      \;\;\;\;a \cdot \left(a \cdot \left(\mathsf{fma}\left(b\_m, \frac{b\_m}{a \cdot a}, -1\right) \cdot \sin \left(2 \cdot t\_0\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin t\_0\right)\right)\right) \cdot 1\\
      
      
      \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.9999999999999993e-130

        1. Initial program 61.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 \left(\left(2 \cdot \color{blue}{\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. sub-negN/A

            \[\leadsto \left(\left(2 \cdot \color{blue}{\left({b}^{2} + \left(\mathsf{neg}\left({a}^{2}\right)\right)\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(\left(2 \cdot \color{blue}{\left(\left(\mathsf{neg}\left({a}^{2}\right)\right) + {b}^{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) \]
          4. lift-pow.f64N/A

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

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

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

            \[\leadsto \left(\left(2 \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{{a}^{1}} + {b}^{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) \]
          8. sqr-powN/A

            \[\leadsto \left(\left(2 \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left({a}^{\left(\frac{1}{2}\right)} \cdot {a}^{\left(\frac{1}{2}\right)}\right)} + {b}^{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) \]
          9. associate-*r*N/A

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

            \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot {a}^{\left(\frac{1}{2}\right)}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
          11. lower-*.f64N/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot {a}^{\left(\frac{1}{2}\right)}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
          12. lower-neg.f64N/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot {a}^{\left(\frac{1}{2}\right)}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
          13. metadata-evalN/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot {a}^{\color{blue}{\frac{1}{2}}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
          14. unpow1/2N/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\sqrt{a}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
          15. lower-sqrt.f64N/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\sqrt{a}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
          16. metadata-evalN/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, {a}^{\color{blue}{\frac{1}{2}}}, {b}^{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) \]
          17. unpow1/2N/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, \color{blue}{\sqrt{a}}, {b}^{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) \]
          18. lower-sqrt.f6439.1

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

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, \sqrt{a}, \color{blue}{{b}^{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) \]
          20. unpow2N/A

            \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, \sqrt{a}, \color{blue}{b \cdot b}\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) \]
          21. lower-*.f6439.1

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(2 \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\right)} \]
        8. Step-by-step derivation
          1. Applied rewrites71.0%

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

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

          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. 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-*.f6464.9

              \[\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-eval64.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 rewrites64.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. Taylor expanded in angle around 0

            \[\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 \color{blue}{1} \]
          6. Step-by-step derivation
            1. Applied rewrites71.8%

              \[\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 \color{blue}{1} \]
          7. Recombined 2 regimes into one program.
          8. Final simplification71.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{-129}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\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 1\\ \end{array} \]
          9. Add Preprocessing

          Alternative 4: 66.9% accurate, 1.3× speedup?

          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\ t_1 := \frac{1}{b\_m - a}\\ \mathbf{if}\;{b\_m}^{2} \leq 10^{+197}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot t\_0\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_1 \cdot \frac{t\_0 \cdot \left(\left(b\_m - a\right) \cdot 2\right)}{t\_1}\right)\right) \cdot 1\\ \end{array} \end{array} \]
          b_m = (fabs.f64 b)
          (FPCore (a b_m angle)
           :precision binary64
           (let* ((t_0 (sin (* PI (* angle 0.005555555555555556))))
                  (t_1 (/ 1.0 (- b_m a))))
             (if (<= (pow b_m 2.0) 1e+197)
               (*
                (* (+ b_m a) (* (- b_m a) (* 2.0 t_0)))
                (cos (* angle (* PI 0.005555555555555556))))
               (* (* (+ b_m a) (* t_1 (/ (* t_0 (* (- b_m a) 2.0)) t_1))) 1.0))))
          b_m = fabs(b);
          double code(double a, double b_m, double angle) {
          	double t_0 = sin((((double) M_PI) * (angle * 0.005555555555555556)));
          	double t_1 = 1.0 / (b_m - a);
          	double tmp;
          	if (pow(b_m, 2.0) <= 1e+197) {
          		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_0))) * cos((angle * (((double) M_PI) * 0.005555555555555556)));
          	} else {
          		tmp = ((b_m + a) * (t_1 * ((t_0 * ((b_m - a) * 2.0)) / t_1))) * 1.0;
          	}
          	return tmp;
          }
          
          b_m = Math.abs(b);
          public static double code(double a, double b_m, double angle) {
          	double t_0 = Math.sin((Math.PI * (angle * 0.005555555555555556)));
          	double t_1 = 1.0 / (b_m - a);
          	double tmp;
          	if (Math.pow(b_m, 2.0) <= 1e+197) {
          		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_0))) * Math.cos((angle * (Math.PI * 0.005555555555555556)));
          	} else {
          		tmp = ((b_m + a) * (t_1 * ((t_0 * ((b_m - a) * 2.0)) / t_1))) * 1.0;
          	}
          	return tmp;
          }
          
          b_m = math.fabs(b)
          def code(a, b_m, angle):
          	t_0 = math.sin((math.pi * (angle * 0.005555555555555556)))
          	t_1 = 1.0 / (b_m - a)
          	tmp = 0
          	if math.pow(b_m, 2.0) <= 1e+197:
          		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_0))) * math.cos((angle * (math.pi * 0.005555555555555556)))
          	else:
          		tmp = ((b_m + a) * (t_1 * ((t_0 * ((b_m - a) * 2.0)) / t_1))) * 1.0
          	return tmp
          
          b_m = abs(b)
          function code(a, b_m, angle)
          	t_0 = sin(Float64(pi * Float64(angle * 0.005555555555555556)))
          	t_1 = Float64(1.0 / Float64(b_m - a))
          	tmp = 0.0
          	if ((b_m ^ 2.0) <= 1e+197)
          		tmp = Float64(Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * t_0))) * cos(Float64(angle * Float64(pi * 0.005555555555555556))));
          	else
          		tmp = Float64(Float64(Float64(b_m + a) * Float64(t_1 * Float64(Float64(t_0 * Float64(Float64(b_m - a) * 2.0)) / t_1))) * 1.0);
          	end
          	return tmp
          end
          
          b_m = abs(b);
          function tmp_2 = code(a, b_m, angle)
          	t_0 = sin((pi * (angle * 0.005555555555555556)));
          	t_1 = 1.0 / (b_m - a);
          	tmp = 0.0;
          	if ((b_m ^ 2.0) <= 1e+197)
          		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_0))) * cos((angle * (pi * 0.005555555555555556)));
          	else
          		tmp = ((b_m + a) * (t_1 * ((t_0 * ((b_m - a) * 2.0)) / t_1))) * 1.0;
          	end
          	tmp_2 = tmp;
          end
          
          b_m = N[Abs[b], $MachinePrecision]
          code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(1.0 / N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 1e+197], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(t$95$1 * N[(N[(t$95$0 * N[(N[(b$95$m - a), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
          
          \begin{array}{l}
          b_m = \left|b\right|
          
          \\
          \begin{array}{l}
          t_0 := \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
          t_1 := \frac{1}{b\_m - a}\\
          \mathbf{if}\;{b\_m}^{2} \leq 10^{+197}:\\
          \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot t\_0\right)\right)\right) \cdot \cos \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_1 \cdot \frac{t\_0 \cdot \left(\left(b\_m - a\right) \cdot 2\right)}{t\_1}\right)\right) \cdot 1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (pow.f64 b #s(literal 2 binary64)) < 9.9999999999999995e196

            1. Initial program 60.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-*.f6465.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-eval65.4

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

              \[\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. *-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(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\frac{1}{180} \cdot angle\right)}\right) \]
              6. 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 \frac{1}{180}\right) \cdot angle\right)} \]
              7. 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(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{180}}\right) \cdot angle\right) \]
              8. 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(\color{blue}{\frac{\mathsf{PI}\left(\right)}{180}} \cdot angle\right) \]
              9. 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{\mathsf{PI}\left(\right)}{180} \cdot angle\right)} \]
              10. 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(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{180}\right)} \cdot angle\right) \]
              11. 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(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{180}}\right) \cdot angle\right) \]
              12. lower-*.f6467.4

                \[\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 0.005555555555555556\right)} \cdot angle\right) \]
            6. Applied rewrites67.4%

              \[\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 0.005555555555555556\right) \cdot angle\right)} \]

            if 9.9999999999999995e196 < (pow.f64 b #s(literal 2 binary64))

            1. Initial program 41.9%

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

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

                \[\leadsto \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-*.f6471.1

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

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

              \[\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. Taylor expanded in angle around 0

              \[\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 \color{blue}{1} \]
            6. Step-by-step derivation
              1. Applied rewrites83.4%

                \[\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 \color{blue}{1} \]
              2. Applied rewrites83.4%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 10^{+197}:\\ \;\;\;\;\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(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(\frac{1}{b - a} \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot 2\right)}{\frac{1}{b - a}}\right)\right) \cdot 1\\ \end{array} \]
            9. Add Preprocessing

            Alternative 5: 66.5% accurate, 1.3× speedup?

            \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := \sin t\_0 \cdot \left(\left(b\_m - a\right) \cdot 2\right)\\ t_2 := \frac{1}{b\_m - a}\\ \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-115}:\\ \;\;\;\;t\_1 \cdot \left(\left(b\_m + a\right) \cdot \cos t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_2 \cdot \frac{t\_1}{t\_2}\right)\right) \cdot 1\\ \end{array} \end{array} \]
            b_m = (fabs.f64 b)
            (FPCore (a b_m angle)
             :precision binary64
             (let* ((t_0 (* PI (* angle 0.005555555555555556)))
                    (t_1 (* (sin t_0) (* (- b_m a) 2.0)))
                    (t_2 (/ 1.0 (- b_m a))))
               (if (<= (pow b_m 2.0) 2e-115)
                 (* t_1 (* (+ b_m a) (cos t_0)))
                 (* (* (+ b_m a) (* t_2 (/ t_1 t_2))) 1.0))))
            b_m = fabs(b);
            double code(double a, double b_m, double angle) {
            	double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
            	double t_1 = sin(t_0) * ((b_m - a) * 2.0);
            	double t_2 = 1.0 / (b_m - a);
            	double tmp;
            	if (pow(b_m, 2.0) <= 2e-115) {
            		tmp = t_1 * ((b_m + a) * cos(t_0));
            	} else {
            		tmp = ((b_m + a) * (t_2 * (t_1 / t_2))) * 1.0;
            	}
            	return tmp;
            }
            
            b_m = Math.abs(b);
            public static double code(double a, double b_m, double angle) {
            	double t_0 = Math.PI * (angle * 0.005555555555555556);
            	double t_1 = Math.sin(t_0) * ((b_m - a) * 2.0);
            	double t_2 = 1.0 / (b_m - a);
            	double tmp;
            	if (Math.pow(b_m, 2.0) <= 2e-115) {
            		tmp = t_1 * ((b_m + a) * Math.cos(t_0));
            	} else {
            		tmp = ((b_m + a) * (t_2 * (t_1 / t_2))) * 1.0;
            	}
            	return tmp;
            }
            
            b_m = math.fabs(b)
            def code(a, b_m, angle):
            	t_0 = math.pi * (angle * 0.005555555555555556)
            	t_1 = math.sin(t_0) * ((b_m - a) * 2.0)
            	t_2 = 1.0 / (b_m - a)
            	tmp = 0
            	if math.pow(b_m, 2.0) <= 2e-115:
            		tmp = t_1 * ((b_m + a) * math.cos(t_0))
            	else:
            		tmp = ((b_m + a) * (t_2 * (t_1 / t_2))) * 1.0
            	return tmp
            
            b_m = abs(b)
            function code(a, b_m, angle)
            	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
            	t_1 = Float64(sin(t_0) * Float64(Float64(b_m - a) * 2.0))
            	t_2 = Float64(1.0 / Float64(b_m - a))
            	tmp = 0.0
            	if ((b_m ^ 2.0) <= 2e-115)
            		tmp = Float64(t_1 * Float64(Float64(b_m + a) * cos(t_0)));
            	else
            		tmp = Float64(Float64(Float64(b_m + a) * Float64(t_2 * Float64(t_1 / t_2))) * 1.0);
            	end
            	return tmp
            end
            
            b_m = abs(b);
            function tmp_2 = code(a, b_m, angle)
            	t_0 = pi * (angle * 0.005555555555555556);
            	t_1 = sin(t_0) * ((b_m - a) * 2.0);
            	t_2 = 1.0 / (b_m - a);
            	tmp = 0.0;
            	if ((b_m ^ 2.0) <= 2e-115)
            		tmp = t_1 * ((b_m + a) * cos(t_0));
            	else
            		tmp = ((b_m + a) * (t_2 * (t_1 / t_2))) * 1.0;
            	end
            	tmp_2 = tmp;
            end
            
            b_m = N[Abs[b], $MachinePrecision]
            code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 / N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 2e-115], N[(t$95$1 * N[(N[(b$95$m + a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(t$95$2 * N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]]
            
            \begin{array}{l}
            b_m = \left|b\right|
            
            \\
            \begin{array}{l}
            t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
            t_1 := \sin t\_0 \cdot \left(\left(b\_m - a\right) \cdot 2\right)\\
            t_2 := \frac{1}{b\_m - a}\\
            \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-115}:\\
            \;\;\;\;t\_1 \cdot \left(\left(b\_m + a\right) \cdot \cos t\_0\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_2 \cdot \frac{t\_1}{t\_2}\right)\right) \cdot 1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (pow.f64 b #s(literal 2 binary64)) < 2.0000000000000001e-115

              1. Initial program 61.2%

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

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

                  \[\leadsto \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.2

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

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

                \[\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 \color{blue}{\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 \frac{angle}{180}\right)} \]
                2. lift-*.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 \left(angle \cdot \frac{1}{180}\right)\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                3. *-commutativeN/A

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

                  \[\leadsto \color{blue}{\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) \cdot \left(\left(b + a\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right)} \]
              6. Applied rewrites67.9%

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

              if 2.0000000000000001e-115 < (pow.f64 b #s(literal 2 binary64))

              1. Initial program 48.6%

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

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

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

                \[\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. Taylor expanded in angle around 0

                \[\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 \color{blue}{1} \]
              6. Step-by-step derivation
                1. Applied rewrites75.3%

                  \[\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 \color{blue}{1} \]
                2. Applied rewrites75.3%

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

              Alternative 6: 66.9% accurate, 1.7× speedup?

              \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \frac{1}{b\_m - a}\\ t_1 := \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\ \mathbf{if}\;b\_m \leq 4.7 \cdot 10^{+67}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot t\_1\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_0 \cdot \frac{t\_1 \cdot \left(\left(b\_m - a\right) \cdot 2\right)}{t\_0}\right)\right) \cdot 1\\ \end{array} \end{array} \]
              b_m = (fabs.f64 b)
              (FPCore (a b_m angle)
               :precision binary64
               (let* ((t_0 (/ 1.0 (- b_m a)))
                      (t_1 (sin (* PI (* angle 0.005555555555555556)))))
                 (if (<= b_m 4.7e+67)
                   (* (* (+ b_m a) (* (- b_m a) (* 2.0 t_1))) (cos (/ PI (/ 180.0 angle))))
                   (* (* (+ b_m a) (* t_0 (/ (* t_1 (* (- b_m a) 2.0)) t_0))) 1.0))))
              b_m = fabs(b);
              double code(double a, double b_m, double angle) {
              	double t_0 = 1.0 / (b_m - a);
              	double t_1 = sin((((double) M_PI) * (angle * 0.005555555555555556)));
              	double tmp;
              	if (b_m <= 4.7e+67) {
              		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_1))) * cos((((double) M_PI) / (180.0 / angle)));
              	} else {
              		tmp = ((b_m + a) * (t_0 * ((t_1 * ((b_m - a) * 2.0)) / t_0))) * 1.0;
              	}
              	return tmp;
              }
              
              b_m = Math.abs(b);
              public static double code(double a, double b_m, double angle) {
              	double t_0 = 1.0 / (b_m - a);
              	double t_1 = Math.sin((Math.PI * (angle * 0.005555555555555556)));
              	double tmp;
              	if (b_m <= 4.7e+67) {
              		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_1))) * Math.cos((Math.PI / (180.0 / angle)));
              	} else {
              		tmp = ((b_m + a) * (t_0 * ((t_1 * ((b_m - a) * 2.0)) / t_0))) * 1.0;
              	}
              	return tmp;
              }
              
              b_m = math.fabs(b)
              def code(a, b_m, angle):
              	t_0 = 1.0 / (b_m - a)
              	t_1 = math.sin((math.pi * (angle * 0.005555555555555556)))
              	tmp = 0
              	if b_m <= 4.7e+67:
              		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_1))) * math.cos((math.pi / (180.0 / angle)))
              	else:
              		tmp = ((b_m + a) * (t_0 * ((t_1 * ((b_m - a) * 2.0)) / t_0))) * 1.0
              	return tmp
              
              b_m = abs(b)
              function code(a, b_m, angle)
              	t_0 = Float64(1.0 / Float64(b_m - a))
              	t_1 = sin(Float64(pi * Float64(angle * 0.005555555555555556)))
              	tmp = 0.0
              	if (b_m <= 4.7e+67)
              		tmp = Float64(Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * t_1))) * cos(Float64(pi / Float64(180.0 / angle))));
              	else
              		tmp = Float64(Float64(Float64(b_m + a) * Float64(t_0 * Float64(Float64(t_1 * Float64(Float64(b_m - a) * 2.0)) / t_0))) * 1.0);
              	end
              	return tmp
              end
              
              b_m = abs(b);
              function tmp_2 = code(a, b_m, angle)
              	t_0 = 1.0 / (b_m - a);
              	t_1 = sin((pi * (angle * 0.005555555555555556)));
              	tmp = 0.0;
              	if (b_m <= 4.7e+67)
              		tmp = ((b_m + a) * ((b_m - a) * (2.0 * t_1))) * cos((pi / (180.0 / angle)));
              	else
              		tmp = ((b_m + a) * (t_0 * ((t_1 * ((b_m - a) * 2.0)) / t_0))) * 1.0;
              	end
              	tmp_2 = tmp;
              end
              
              b_m = N[Abs[b], $MachinePrecision]
              code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(1.0 / N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 4.7e+67], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(t$95$0 * N[(N[(t$95$1 * N[(N[(b$95$m - a), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
              
              \begin{array}{l}
              b_m = \left|b\right|
              
              \\
              \begin{array}{l}
              t_0 := \frac{1}{b\_m - a}\\
              t_1 := \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
              \mathbf{if}\;b\_m \leq 4.7 \cdot 10^{+67}:\\
              \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot t\_1\right)\right)\right) \cdot \cos \left(\frac{\pi}{\frac{180}{angle}}\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_0 \cdot \frac{t\_1 \cdot \left(\left(b\_m - a\right) \cdot 2\right)}{t\_0}\right)\right) \cdot 1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if b < 4.70000000000000017e67

                1. Initial program 55.6%

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

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

                  \[\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. 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 \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right) \]
                  4. un-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 \color{blue}{\left(\frac{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)} \]
                  5. 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{\mathsf{PI}\left(\right)}{\frac{180}{angle}}\right)} \]
                  6. lower-/.f6466.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(\frac{\pi}{\color{blue}{\frac{180}{angle}}}\right) \]
                6. Applied rewrites66.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(\frac{\pi}{\frac{180}{angle}}\right)} \]

                if 4.70000000000000017e67 < b

                1. Initial program 47.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 \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-*.f6474.4

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

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

                  \[\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. Taylor expanded in angle around 0

                  \[\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 \color{blue}{1} \]
                6. Step-by-step derivation
                  1. Applied rewrites79.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 \color{blue}{1} \]
                  2. Applied rewrites79.7%

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

                Alternative 7: 66.4% accurate, 1.9× speedup?

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

                  1. Initial program 61.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 rewrites66.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)} \]

                  if 2.00000000000000001e-150 < (pow.f64 b #s(literal 2 binary64))

                  1. Initial program 49.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 \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-*.f6466.8

                      \[\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-eval66.2

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

                    \[\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. Taylor expanded in angle around 0

                    \[\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 \color{blue}{1} \]
                  6. Step-by-step derivation
                    1. Applied rewrites74.5%

                      \[\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 \color{blue}{1} \]
                  7. Recombined 2 regimes into one program.
                  8. Final simplification71.3%

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

                  Alternative 8: 57.1% accurate, 2.0× speedup?

                  \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;{b\_m}^{2} - {a}^{2} \leq -5 \cdot 10^{-254}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \end{array} \end{array} \]
                  b_m = (fabs.f64 b)
                  (FPCore (a b_m angle)
                   :precision binary64
                   (if (<= (- (pow b_m 2.0) (pow a 2.0)) -5e-254)
                     (* -0.011111111111111112 (* a (* PI (* a angle))))
                     (* 0.011111111111111112 (* angle (* PI (* b_m b_m))))))
                  b_m = fabs(b);
                  double code(double a, double b_m, double angle) {
                  	double tmp;
                  	if ((pow(b_m, 2.0) - pow(a, 2.0)) <= -5e-254) {
                  		tmp = -0.011111111111111112 * (a * (((double) M_PI) * (a * angle)));
                  	} else {
                  		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b_m * b_m)));
                  	}
                  	return tmp;
                  }
                  
                  b_m = Math.abs(b);
                  public static double code(double a, double b_m, double angle) {
                  	double tmp;
                  	if ((Math.pow(b_m, 2.0) - Math.pow(a, 2.0)) <= -5e-254) {
                  		tmp = -0.011111111111111112 * (a * (Math.PI * (a * angle)));
                  	} else {
                  		tmp = 0.011111111111111112 * (angle * (Math.PI * (b_m * b_m)));
                  	}
                  	return tmp;
                  }
                  
                  b_m = math.fabs(b)
                  def code(a, b_m, angle):
                  	tmp = 0
                  	if (math.pow(b_m, 2.0) - math.pow(a, 2.0)) <= -5e-254:
                  		tmp = -0.011111111111111112 * (a * (math.pi * (a * angle)))
                  	else:
                  		tmp = 0.011111111111111112 * (angle * (math.pi * (b_m * b_m)))
                  	return tmp
                  
                  b_m = abs(b)
                  function code(a, b_m, angle)
                  	tmp = 0.0
                  	if (Float64((b_m ^ 2.0) - (a ^ 2.0)) <= -5e-254)
                  		tmp = Float64(-0.011111111111111112 * Float64(a * Float64(pi * Float64(a * angle))));
                  	else
                  		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b_m * b_m))));
                  	end
                  	return tmp
                  end
                  
                  b_m = abs(b);
                  function tmp_2 = code(a, b_m, angle)
                  	tmp = 0.0;
                  	if (((b_m ^ 2.0) - (a ^ 2.0)) <= -5e-254)
                  		tmp = -0.011111111111111112 * (a * (pi * (a * angle)));
                  	else
                  		tmp = 0.011111111111111112 * (angle * (pi * (b_m * b_m)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  b_m = N[Abs[b], $MachinePrecision]
                  code[a_, b$95$m_, angle_] := If[LessEqual[N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision], -5e-254], N[(-0.011111111111111112 * N[(a * N[(Pi * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  b_m = \left|b\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;{b\_m}^{2} - {a}^{2} \leq -5 \cdot 10^{-254}:\\
                  \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;0.011111111111111112 \cdot \left(angle \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))) < -5.0000000000000003e-254

                    1. Initial program 61.6%

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

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

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

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

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

                        1. Initial program 48.0%

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

                          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                        4. Step-by-step derivation
                          1. *-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.1

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

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

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

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

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

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

                          Alternative 9: 67.4% accurate, 2.4× speedup?

                          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \frac{1}{b\_m - a}\\ t_1 := \left(b\_m - a\right) \cdot 2\\ \mathbf{if}\;b\_m \leq 5.5 \cdot 10^{+204}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(t\_1 \cdot \left(\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_0 \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot t\_1}{t\_0}\right)\right) \cdot 1\\ \end{array} \end{array} \]
                          b_m = (fabs.f64 b)
                          (FPCore (a b_m angle)
                           :precision binary64
                           (let* ((t_0 (/ 1.0 (- b_m a))) (t_1 (* (- b_m a) 2.0)))
                             (if (<= b_m 5.5e+204)
                               (* (+ b_m a) (* t_1 (* (sin (* angle (* PI 0.011111111111111112))) 0.5)))
                               (*
                                (*
                                 (+ b_m a)
                                 (* t_0 (/ (* (sin (* PI (* angle 0.005555555555555556))) t_1) t_0)))
                                1.0))))
                          b_m = fabs(b);
                          double code(double a, double b_m, double angle) {
                          	double t_0 = 1.0 / (b_m - a);
                          	double t_1 = (b_m - a) * 2.0;
                          	double tmp;
                          	if (b_m <= 5.5e+204) {
                          		tmp = (b_m + a) * (t_1 * (sin((angle * (((double) M_PI) * 0.011111111111111112))) * 0.5));
                          	} else {
                          		tmp = ((b_m + a) * (t_0 * ((sin((((double) M_PI) * (angle * 0.005555555555555556))) * t_1) / t_0))) * 1.0;
                          	}
                          	return tmp;
                          }
                          
                          b_m = Math.abs(b);
                          public static double code(double a, double b_m, double angle) {
                          	double t_0 = 1.0 / (b_m - a);
                          	double t_1 = (b_m - a) * 2.0;
                          	double tmp;
                          	if (b_m <= 5.5e+204) {
                          		tmp = (b_m + a) * (t_1 * (Math.sin((angle * (Math.PI * 0.011111111111111112))) * 0.5));
                          	} else {
                          		tmp = ((b_m + a) * (t_0 * ((Math.sin((Math.PI * (angle * 0.005555555555555556))) * t_1) / t_0))) * 1.0;
                          	}
                          	return tmp;
                          }
                          
                          b_m = math.fabs(b)
                          def code(a, b_m, angle):
                          	t_0 = 1.0 / (b_m - a)
                          	t_1 = (b_m - a) * 2.0
                          	tmp = 0
                          	if b_m <= 5.5e+204:
                          		tmp = (b_m + a) * (t_1 * (math.sin((angle * (math.pi * 0.011111111111111112))) * 0.5))
                          	else:
                          		tmp = ((b_m + a) * (t_0 * ((math.sin((math.pi * (angle * 0.005555555555555556))) * t_1) / t_0))) * 1.0
                          	return tmp
                          
                          b_m = abs(b)
                          function code(a, b_m, angle)
                          	t_0 = Float64(1.0 / Float64(b_m - a))
                          	t_1 = Float64(Float64(b_m - a) * 2.0)
                          	tmp = 0.0
                          	if (b_m <= 5.5e+204)
                          		tmp = Float64(Float64(b_m + a) * Float64(t_1 * Float64(sin(Float64(angle * Float64(pi * 0.011111111111111112))) * 0.5)));
                          	else
                          		tmp = Float64(Float64(Float64(b_m + a) * Float64(t_0 * Float64(Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * t_1) / t_0))) * 1.0);
                          	end
                          	return tmp
                          end
                          
                          b_m = abs(b);
                          function tmp_2 = code(a, b_m, angle)
                          	t_0 = 1.0 / (b_m - a);
                          	t_1 = (b_m - a) * 2.0;
                          	tmp = 0.0;
                          	if (b_m <= 5.5e+204)
                          		tmp = (b_m + a) * (t_1 * (sin((angle * (pi * 0.011111111111111112))) * 0.5));
                          	else
                          		tmp = ((b_m + a) * (t_0 * ((sin((pi * (angle * 0.005555555555555556))) * t_1) / t_0))) * 1.0;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          b_m = N[Abs[b], $MachinePrecision]
                          code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(1.0 / N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b$95$m - a), $MachinePrecision] * 2.0), $MachinePrecision]}, If[LessEqual[b$95$m, 5.5e+204], N[(N[(b$95$m + a), $MachinePrecision] * N[(t$95$1 * N[(N[Sin[N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(t$95$0 * N[(N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
                          
                          \begin{array}{l}
                          b_m = \left|b\right|
                          
                          \\
                          \begin{array}{l}
                          t_0 := \frac{1}{b\_m - a}\\
                          t_1 := \left(b\_m - a\right) \cdot 2\\
                          \mathbf{if}\;b\_m \leq 5.5 \cdot 10^{+204}:\\
                          \;\;\;\;\left(b\_m + a\right) \cdot \left(t\_1 \cdot \left(\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot 0.5\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(t\_0 \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot t\_1}{t\_0}\right)\right) \cdot 1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if b < 5.4999999999999996e204

                            1. Initial program 54.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 \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-*.f6466.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-eval66.2

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

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

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

                            if 5.4999999999999996e204 < b

                            1. Initial program 45.6%

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

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

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

                              \[\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. Taylor expanded in angle around 0

                              \[\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 \color{blue}{1} \]
                            6. Step-by-step derivation
                              1. Applied rewrites88.8%

                                \[\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 \color{blue}{1} \]
                              2. Applied rewrites88.8%

                                \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\frac{1}{b - a} \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot 2\right)}{\frac{1}{b - a}}\right)}\right) \cdot 1 \]
                            7. Recombined 2 regimes into one program.
                            8. Final simplification69.9%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5.5 \cdot 10^{+204}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot 2\right) \cdot \left(\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(\frac{1}{b - a} \cdot \frac{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(b - a\right) \cdot 2\right)}{\frac{1}{b - a}}\right)\right) \cdot 1\\ \end{array} \]
                            9. Add Preprocessing

                            Alternative 10: 62.8% accurate, 2.7× speedup?

                            \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{+69}:\\ \;\;\;\;\mathsf{fma}\left(a, -0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right), \mathsf{fma}\left(0.011111111111111112, \pi \cdot \left(angle \cdot \left(b\_m \cdot b\_m\right)\right), 0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
                            b_m = (fabs.f64 b)
                            (FPCore (a b_m angle)
                             :precision binary64
                             (if (<= (pow b_m 2.0) 2e+69)
                               (fma
                                a
                                (* -0.011111111111111112 (* a (* PI angle)))
                                (fma 0.011111111111111112 (* PI (* angle (* b_m b_m))) 0.0))
                               (*
                                1.0
                                (*
                                 (+ b_m a)
                                 (*
                                  (- b_m a)
                                  (*
                                   2.0
                                   (*
                                    angle
                                    (fma
                                     -2.8577960676726107e-8
                                     (* (* angle angle) (* PI (* PI PI)))
                                     (* PI 0.005555555555555556)))))))))
                            b_m = fabs(b);
                            double code(double a, double b_m, double angle) {
                            	double tmp;
                            	if (pow(b_m, 2.0) <= 2e+69) {
                            		tmp = fma(a, (-0.011111111111111112 * (a * (((double) M_PI) * angle))), fma(0.011111111111111112, (((double) M_PI) * (angle * (b_m * b_m))), 0.0));
                            	} else {
                            		tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * (angle * fma(-2.8577960676726107e-8, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.005555555555555556))))));
                            	}
                            	return tmp;
                            }
                            
                            b_m = abs(b)
                            function code(a, b_m, angle)
                            	tmp = 0.0
                            	if ((b_m ^ 2.0) <= 2e+69)
                            		tmp = fma(a, Float64(-0.011111111111111112 * Float64(a * Float64(pi * angle))), fma(0.011111111111111112, Float64(pi * Float64(angle * Float64(b_m * b_m))), 0.0));
                            	else
                            		tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * Float64(angle * fma(-2.8577960676726107e-8, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.005555555555555556)))))));
                            	end
                            	return tmp
                            end
                            
                            b_m = N[Abs[b], $MachinePrecision]
                            code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 2e+69], N[(a * N[(-0.011111111111111112 * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(Pi * N[(angle * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[(angle * N[(-2.8577960676726107e-8 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            b_m = \left|b\right|
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{+69}:\\
                            \;\;\;\;\mathsf{fma}\left(a, -0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right), \mathsf{fma}\left(0.011111111111111112, \pi \cdot \left(angle \cdot \left(b\_m \cdot b\_m\right)\right), 0\right)\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if (pow.f64 b #s(literal 2 binary64)) < 2.0000000000000001e69

                              1. Initial program 60.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--.f6457.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 rewrites57.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 a around 0

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

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

                              if 2.0000000000000001e69 < (pow.f64 b #s(literal 2 binary64))

                              1. Initial program 45.2%

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

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

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

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

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

                                \[\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. Taylor expanded in angle around 0

                                \[\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 \color{blue}{1} \]
                              6. Step-by-step derivation
                                1. Applied rewrites79.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 \color{blue}{1} \]
                                2. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{34992000}, \left(angle \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{180} \cdot \mathsf{PI}\left(\right)}\right)\right)\right)\right)\right) \cdot 1 \]
                                  15. lower-PI.f6472.9

                                    \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.005555555555555556 \cdot \color{blue}{\pi}\right)\right)\right)\right)\right) \cdot 1 \]
                                4. Applied rewrites72.9%

                                  \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.005555555555555556 \cdot \pi\right)\right)}\right)\right)\right) \cdot 1 \]
                              7. Recombined 2 regimes into one program.
                              8. Final simplification66.4%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{+69}:\\ \;\;\;\;\mathsf{fma}\left(a, -0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot angle\right)\right), \mathsf{fma}\left(0.011111111111111112, \pi \cdot \left(angle \cdot \left(b \cdot b\right)\right), 0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \end{array} \]
                              9. Add Preprocessing

                              Alternative 11: 65.5% accurate, 2.7× speedup?

                              \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 4.3 \cdot 10^{+197}:\\ \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\sqrt{\pi} \cdot \left(angle \cdot \sqrt{\pi}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\mathsf{fma}\left(b\_m, \frac{b\_m}{a \cdot a}, -1\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
                              b_m = (fabs.f64 b)
                              (FPCore (a b_m angle)
                               :precision binary64
                               (if (<= a 4.3e+197)
                                 (*
                                  1.0
                                  (*
                                   (+ b_m a)
                                   (*
                                    (- b_m a)
                                    (*
                                     2.0
                                     (sin (* 0.005555555555555556 (* (sqrt PI) (* angle (sqrt PI)))))))))
                                 (*
                                  a
                                  (*
                                   a
                                   (*
                                    (fma b_m (/ b_m (* a a)) -1.0)
                                    (sin (* 2.0 (* PI (* angle 0.005555555555555556)))))))))
                              b_m = fabs(b);
                              double code(double a, double b_m, double angle) {
                              	double tmp;
                              	if (a <= 4.3e+197) {
                              		tmp = 1.0 * ((b_m + a) * ((b_m - a) * (2.0 * sin((0.005555555555555556 * (sqrt(((double) M_PI)) * (angle * sqrt(((double) M_PI)))))))));
                              	} else {
                              		tmp = a * (a * (fma(b_m, (b_m / (a * a)), -1.0) * sin((2.0 * (((double) M_PI) * (angle * 0.005555555555555556))))));
                              	}
                              	return tmp;
                              }
                              
                              b_m = abs(b)
                              function code(a, b_m, angle)
                              	tmp = 0.0
                              	if (a <= 4.3e+197)
                              		tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(2.0 * sin(Float64(0.005555555555555556 * Float64(sqrt(pi) * Float64(angle * sqrt(pi)))))))));
                              	else
                              		tmp = Float64(a * Float64(a * Float64(fma(b_m, Float64(b_m / Float64(a * a)), -1.0) * sin(Float64(2.0 * Float64(pi * Float64(angle * 0.005555555555555556)))))));
                              	end
                              	return tmp
                              end
                              
                              b_m = N[Abs[b], $MachinePrecision]
                              code[a_, b$95$m_, angle_] := If[LessEqual[a, 4.3e+197], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(2.0 * N[Sin[N[(0.005555555555555556 * N[(N[Sqrt[Pi], $MachinePrecision] * N[(angle * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(a * N[(N[(b$95$m * N[(b$95$m / N[(a * a), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                              
                              \begin{array}{l}
                              b_m = \left|b\right|
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;a \leq 4.3 \cdot 10^{+197}:\\
                              \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\sqrt{\pi} \cdot \left(angle \cdot \sqrt{\pi}\right)\right)\right)\right)\right)\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;a \cdot \left(a \cdot \left(\mathsf{fma}\left(b\_m, \frac{b\_m}{a \cdot a}, -1\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if a < 4.29999999999999996e197

                                1. Initial program 52.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 \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-*.f6465.2

                                    \[\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-eval64.7

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

                                  \[\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. Taylor expanded in angle around 0

                                  \[\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 \color{blue}{1} \]
                                6. Step-by-step derivation
                                  1. Applied rewrites69.3%

                                    \[\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 \color{blue}{1} \]
                                  2. 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 1 \]
                                    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 1 \]
                                    3. 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 \color{blue}{\frac{1}{180}}\right)\right)\right)\right)\right) \cdot 1 \]
                                    4. 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}{\frac{angle}{180}}\right)\right)\right)\right) \cdot 1 \]
                                    5. 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 \color{blue}{\frac{1}{\frac{180}{angle}}}\right)\right)\right)\right) \cdot 1 \]
                                    6. 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{\mathsf{PI}\left(\right) \cdot 1}{\frac{180}{angle}}\right)}\right)\right)\right) \cdot 1 \]
                                    7. *-commutativeN/A

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

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

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

                                      \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \frac{\pi}{\color{blue}{\frac{1}{angle}}}\right)\right)\right)\right) \cdot 1 \]
                                  3. Applied rewrites69.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\frac{1}{180} \cdot \left(\left(angle \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \sqrt{\color{blue}{\mathsf{PI}\left(\right)}}\right)\right)\right)\right)\right) \cdot 1 \]
                                    14. lower-sqrt.f6470.4

                                      \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\left(angle \cdot \sqrt{\pi}\right) \cdot \color{blue}{\sqrt{\pi}}\right)\right)\right)\right)\right) \cdot 1 \]
                                  5. Applied rewrites70.4%

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

                                  if 4.29999999999999996e197 < a

                                  1. Initial program 65.6%

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

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

                                      \[\leadsto \left(\left(2 \cdot \color{blue}{\left({b}^{2} + \left(\mathsf{neg}\left({a}^{2}\right)\right)\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(\left(2 \cdot \color{blue}{\left(\left(\mathsf{neg}\left({a}^{2}\right)\right) + {b}^{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) \]
                                    4. lift-pow.f64N/A

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

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

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

                                      \[\leadsto \left(\left(2 \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{{a}^{1}} + {b}^{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) \]
                                    8. sqr-powN/A

                                      \[\leadsto \left(\left(2 \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\left({a}^{\left(\frac{1}{2}\right)} \cdot {a}^{\left(\frac{1}{2}\right)}\right)} + {b}^{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) \]
                                    9. associate-*r*N/A

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

                                      \[\leadsto \left(\left(2 \cdot \color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot {a}^{\left(\frac{1}{2}\right)}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
                                    11. lower-*.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right) \cdot {a}^{\left(\frac{1}{2}\right)}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
                                    12. lower-neg.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \cdot {a}^{\left(\frac{1}{2}\right)}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
                                    13. metadata-evalN/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot {a}^{\color{blue}{\frac{1}{2}}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
                                    14. unpow1/2N/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\sqrt{a}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
                                    15. lower-sqrt.f64N/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \color{blue}{\sqrt{a}}, {a}^{\left(\frac{1}{2}\right)}, {b}^{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) \]
                                    16. metadata-evalN/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, {a}^{\color{blue}{\frac{1}{2}}}, {b}^{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) \]
                                    17. unpow1/2N/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, \color{blue}{\sqrt{a}}, {b}^{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) \]
                                    18. lower-sqrt.f6465.6

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

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, \sqrt{a}, \color{blue}{{b}^{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) \]
                                    20. unpow2N/A

                                      \[\leadsto \left(\left(2 \cdot \mathsf{fma}\left(\left(\mathsf{neg}\left(a\right)\right) \cdot \sqrt{a}, \sqrt{a}, \color{blue}{b \cdot b}\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) \]
                                    21. lower-*.f6465.6

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(2 \cdot \left(\left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\right)} \]
                                  8. Step-by-step derivation
                                    1. Applied rewrites95.0%

                                      \[\leadsto \left(a \cdot \left(\mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \color{blue}{a} \]
                                  9. Recombined 2 regimes into one program.
                                  10. Final simplification72.3%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 4.3 \cdot 10^{+197}:\\ \;\;\;\;1 \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\sqrt{\pi} \cdot \left(angle \cdot \sqrt{\pi}\right)\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot \left(a \cdot \left(\mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \end{array} \]
                                  11. Add Preprocessing

                                  Alternative 12: 67.1% accurate, 2.7× speedup?

                                  \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+24}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+92}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \sqrt{a \cdot \left(a \cdot \left(a \cdot a\right)\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\\ \end{array} \end{array} \]
                                  b_m = (fabs.f64 b)
                                  (FPCore (a b_m angle)
                                   :precision binary64
                                   (if (<= (/ angle 180.0) 4e+24)
                                     (* (+ b_m a) (* (- b_m a) (sin (* 0.011111111111111112 (* PI angle)))))
                                     (if (<= (/ angle 180.0) 1e+92)
                                       (* -0.011111111111111112 (* PI (* angle (sqrt (* a (* a (* a a)))))))
                                       (*
                                        (sin (* 2.0 (* PI (* angle 0.005555555555555556))))
                                        (* (+ b_m a) (- b_m a))))))
                                  b_m = fabs(b);
                                  double code(double a, double b_m, double angle) {
                                  	double tmp;
                                  	if ((angle / 180.0) <= 4e+24) {
                                  		tmp = (b_m + a) * ((b_m - a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
                                  	} else if ((angle / 180.0) <= 1e+92) {
                                  		tmp = -0.011111111111111112 * (((double) M_PI) * (angle * sqrt((a * (a * (a * a))))));
                                  	} else {
                                  		tmp = sin((2.0 * (((double) M_PI) * (angle * 0.005555555555555556)))) * ((b_m + a) * (b_m - a));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  b_m = Math.abs(b);
                                  public static double code(double a, double b_m, double angle) {
                                  	double tmp;
                                  	if ((angle / 180.0) <= 4e+24) {
                                  		tmp = (b_m + a) * ((b_m - a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
                                  	} else if ((angle / 180.0) <= 1e+92) {
                                  		tmp = -0.011111111111111112 * (Math.PI * (angle * Math.sqrt((a * (a * (a * a))))));
                                  	} else {
                                  		tmp = Math.sin((2.0 * (Math.PI * (angle * 0.005555555555555556)))) * ((b_m + a) * (b_m - a));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  b_m = math.fabs(b)
                                  def code(a, b_m, angle):
                                  	tmp = 0
                                  	if (angle / 180.0) <= 4e+24:
                                  		tmp = (b_m + a) * ((b_m - a) * math.sin((0.011111111111111112 * (math.pi * angle))))
                                  	elif (angle / 180.0) <= 1e+92:
                                  		tmp = -0.011111111111111112 * (math.pi * (angle * math.sqrt((a * (a * (a * a))))))
                                  	else:
                                  		tmp = math.sin((2.0 * (math.pi * (angle * 0.005555555555555556)))) * ((b_m + a) * (b_m - a))
                                  	return tmp
                                  
                                  b_m = abs(b)
                                  function code(a, b_m, angle)
                                  	tmp = 0.0
                                  	if (Float64(angle / 180.0) <= 4e+24)
                                  		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle)))));
                                  	elseif (Float64(angle / 180.0) <= 1e+92)
                                  		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * sqrt(Float64(a * Float64(a * Float64(a * a)))))));
                                  	else
                                  		tmp = Float64(sin(Float64(2.0 * Float64(pi * Float64(angle * 0.005555555555555556)))) * Float64(Float64(b_m + a) * Float64(b_m - a)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  b_m = abs(b);
                                  function tmp_2 = code(a, b_m, angle)
                                  	tmp = 0.0;
                                  	if ((angle / 180.0) <= 4e+24)
                                  		tmp = (b_m + a) * ((b_m - a) * sin((0.011111111111111112 * (pi * angle))));
                                  	elseif ((angle / 180.0) <= 1e+92)
                                  		tmp = -0.011111111111111112 * (pi * (angle * sqrt((a * (a * (a * a))))));
                                  	else
                                  		tmp = sin((2.0 * (pi * (angle * 0.005555555555555556)))) * ((b_m + a) * (b_m - a));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  b_m = N[Abs[b], $MachinePrecision]
                                  code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 4e+24], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+92], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[Sqrt[N[(a * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(2.0 * N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                  
                                  \begin{array}{l}
                                  b_m = \left|b\right|
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+24}:\\
                                  \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
                                  
                                  \mathbf{elif}\;\frac{angle}{180} \leq 10^{+92}:\\
                                  \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \sqrt{a \cdot \left(a \cdot \left(a \cdot a\right)\right)}\right)\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if (/.f64 angle #s(literal 180 binary64)) < 3.9999999999999999e24

                                    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 rewrites77.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)} \]

                                    if 3.9999999999999999e24 < (/.f64 angle #s(literal 180 binary64)) < 1e92

                                    1. Initial program 27.6%

                                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                    2. 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--.f6449.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 rewrites49.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 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 rewrites49.3%

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

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

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

                                        1. Initial program 35.0%

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

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

                                            \[\leadsto \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-*.f6441.7

                                            \[\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-eval41.2

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

                                          \[\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 \color{blue}{\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 \frac{angle}{180}\right)} \]
                                          2. lift-*.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 \left(angle \cdot \frac{1}{180}\right)\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                                        6. Applied rewrites45.5%

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

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

                                      Alternative 13: 67.1% accurate, 2.7× speedup?

                                      \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+24}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+92}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \sqrt{a \cdot \left(a \cdot \left(a \cdot a\right)\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(2 \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\ \end{array} \end{array} \]
                                      b_m = (fabs.f64 b)
                                      (FPCore (a b_m angle)
                                       :precision binary64
                                       (if (<= (/ angle 180.0) 4e+24)
                                         (* (+ b_m a) (* (- b_m a) (sin (* 0.011111111111111112 (* PI angle)))))
                                         (if (<= (/ angle 180.0) 1e+92)
                                           (* -0.011111111111111112 (* PI (* angle (sqrt (* a (* a (* a a)))))))
                                           (*
                                            (* (+ b_m a) (- b_m a))
                                            (sin (* 2.0 (* angle (* PI 0.005555555555555556))))))))
                                      b_m = fabs(b);
                                      double code(double a, double b_m, double angle) {
                                      	double tmp;
                                      	if ((angle / 180.0) <= 4e+24) {
                                      		tmp = (b_m + a) * ((b_m - a) * sin((0.011111111111111112 * (((double) M_PI) * angle))));
                                      	} else if ((angle / 180.0) <= 1e+92) {
                                      		tmp = -0.011111111111111112 * (((double) M_PI) * (angle * sqrt((a * (a * (a * a))))));
                                      	} else {
                                      		tmp = ((b_m + a) * (b_m - a)) * sin((2.0 * (angle * (((double) M_PI) * 0.005555555555555556))));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      b_m = Math.abs(b);
                                      public static double code(double a, double b_m, double angle) {
                                      	double tmp;
                                      	if ((angle / 180.0) <= 4e+24) {
                                      		tmp = (b_m + a) * ((b_m - a) * Math.sin((0.011111111111111112 * (Math.PI * angle))));
                                      	} else if ((angle / 180.0) <= 1e+92) {
                                      		tmp = -0.011111111111111112 * (Math.PI * (angle * Math.sqrt((a * (a * (a * a))))));
                                      	} else {
                                      		tmp = ((b_m + a) * (b_m - a)) * Math.sin((2.0 * (angle * (Math.PI * 0.005555555555555556))));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      b_m = math.fabs(b)
                                      def code(a, b_m, angle):
                                      	tmp = 0
                                      	if (angle / 180.0) <= 4e+24:
                                      		tmp = (b_m + a) * ((b_m - a) * math.sin((0.011111111111111112 * (math.pi * angle))))
                                      	elif (angle / 180.0) <= 1e+92:
                                      		tmp = -0.011111111111111112 * (math.pi * (angle * math.sqrt((a * (a * (a * a))))))
                                      	else:
                                      		tmp = ((b_m + a) * (b_m - a)) * math.sin((2.0 * (angle * (math.pi * 0.005555555555555556))))
                                      	return tmp
                                      
                                      b_m = abs(b)
                                      function code(a, b_m, angle)
                                      	tmp = 0.0
                                      	if (Float64(angle / 180.0) <= 4e+24)
                                      		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * sin(Float64(0.011111111111111112 * Float64(pi * angle)))));
                                      	elseif (Float64(angle / 180.0) <= 1e+92)
                                      		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * sqrt(Float64(a * Float64(a * Float64(a * a)))))));
                                      	else
                                      		tmp = Float64(Float64(Float64(b_m + a) * Float64(b_m - a)) * sin(Float64(2.0 * Float64(angle * Float64(pi * 0.005555555555555556)))));
                                      	end
                                      	return tmp
                                      end
                                      
                                      b_m = abs(b);
                                      function tmp_2 = code(a, b_m, angle)
                                      	tmp = 0.0;
                                      	if ((angle / 180.0) <= 4e+24)
                                      		tmp = (b_m + a) * ((b_m - a) * sin((0.011111111111111112 * (pi * angle))));
                                      	elseif ((angle / 180.0) <= 1e+92)
                                      		tmp = -0.011111111111111112 * (pi * (angle * sqrt((a * (a * (a * a))))));
                                      	else
                                      		tmp = ((b_m + a) * (b_m - a)) * sin((2.0 * (angle * (pi * 0.005555555555555556))));
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      b_m = N[Abs[b], $MachinePrecision]
                                      code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 4e+24], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+92], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[Sqrt[N[(a * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                                      
                                      \begin{array}{l}
                                      b_m = \left|b\right|
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+24}:\\
                                      \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
                                      
                                      \mathbf{elif}\;\frac{angle}{180} \leq 10^{+92}:\\
                                      \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \sqrt{a \cdot \left(a \cdot \left(a \cdot a\right)\right)}\right)\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(2 \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if (/.f64 angle #s(literal 180 binary64)) < 3.9999999999999999e24

                                        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 rewrites77.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)} \]

                                        if 3.9999999999999999e24 < (/.f64 angle #s(literal 180 binary64)) < 1e92

                                        1. Initial program 27.6%

                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                        2. 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--.f6449.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 rewrites49.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 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 rewrites49.3%

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

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

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

                                            1. Initial program 35.0%

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

                                                \[\leadsto \left(\left(2 \cdot \color{blue}{\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. flip--N/A

                                                \[\leadsto \left(\left(2 \cdot \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{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) \]
                                              3. div-invN/A

                                                \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot \frac{1}{{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) \]
                                              4. difference-of-squaresN/A

                                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left(\left({b}^{2} + {a}^{2}\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \frac{1}{{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) \]
                                              5. lift--.f64N/A

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

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

                                                \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left({b}^{2} + {a}^{2}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \frac{1}{{b}^{2} + {a}^{2}}\right)\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) \]
                                              8. +-commutativeN/A

                                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\left({a}^{2} + {b}^{2}\right)} \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \frac{1}{{b}^{2} + {a}^{2}}\right)\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) \]
                                              9. lift-pow.f64N/A

                                                \[\leadsto \left(\left(2 \cdot \left(\left(\color{blue}{{a}^{2}} + {b}^{2}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \frac{1}{{b}^{2} + {a}^{2}}\right)\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) \]
                                              10. unpow2N/A

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

                                                \[\leadsto \left(\left(2 \cdot \left(\color{blue}{\mathsf{fma}\left(a, a, {b}^{2}\right)} \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \frac{1}{{b}^{2} + {a}^{2}}\right)\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) \]
                                              12. lift-pow.f64N/A

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

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

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

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

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

                                                \[\leadsto \color{blue}{\left(\left(2 \cdot \left(\mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{\mathsf{fma}\left(a, a, b \cdot b\right)}\right)\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(\mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{\mathsf{fma}\left(a, a, b \cdot b\right)}\right)\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(\mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{\mathsf{fma}\left(a, a, b \cdot b\right)}\right)\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(\mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{\mathsf{fma}\left(a, a, b \cdot b\right)}\right)\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(\mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{\mathsf{fma}\left(a, a, b \cdot b\right)}\right)\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(\mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{\mathsf{fma}\left(a, a, b \cdot b\right)}\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)} \]
                                            6. Applied rewrites43.8%

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

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

                                          Alternative 14: 64.4% accurate, 3.1× speedup?

                                          \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+67}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\\ \end{array} \end{array} \]
                                          b_m = (fabs.f64 b)
                                          (FPCore (a b_m angle)
                                           :precision binary64
                                           (if (<= (/ angle 180.0) 1e+67)
                                             (* (+ b_m a) (* (- b_m a) (* angle (* PI 0.011111111111111112))))
                                             (* (sin (* 0.011111111111111112 (* PI angle))) (* (+ b_m a) (- b_m a)))))
                                          b_m = fabs(b);
                                          double code(double a, double b_m, double angle) {
                                          	double tmp;
                                          	if ((angle / 180.0) <= 1e+67) {
                                          		tmp = (b_m + a) * ((b_m - a) * (angle * (((double) M_PI) * 0.011111111111111112)));
                                          	} else {
                                          		tmp = sin((0.011111111111111112 * (((double) M_PI) * angle))) * ((b_m + a) * (b_m - a));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          b_m = Math.abs(b);
                                          public static double code(double a, double b_m, double angle) {
                                          	double tmp;
                                          	if ((angle / 180.0) <= 1e+67) {
                                          		tmp = (b_m + a) * ((b_m - a) * (angle * (Math.PI * 0.011111111111111112)));
                                          	} else {
                                          		tmp = Math.sin((0.011111111111111112 * (Math.PI * angle))) * ((b_m + a) * (b_m - a));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          b_m = math.fabs(b)
                                          def code(a, b_m, angle):
                                          	tmp = 0
                                          	if (angle / 180.0) <= 1e+67:
                                          		tmp = (b_m + a) * ((b_m - a) * (angle * (math.pi * 0.011111111111111112)))
                                          	else:
                                          		tmp = math.sin((0.011111111111111112 * (math.pi * angle))) * ((b_m + a) * (b_m - a))
                                          	return tmp
                                          
                                          b_m = abs(b)
                                          function code(a, b_m, angle)
                                          	tmp = 0.0
                                          	if (Float64(angle / 180.0) <= 1e+67)
                                          		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle * Float64(pi * 0.011111111111111112))));
                                          	else
                                          		tmp = Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle))) * Float64(Float64(b_m + a) * Float64(b_m - a)));
                                          	end
                                          	return tmp
                                          end
                                          
                                          b_m = abs(b);
                                          function tmp_2 = code(a, b_m, angle)
                                          	tmp = 0.0;
                                          	if ((angle / 180.0) <= 1e+67)
                                          		tmp = (b_m + a) * ((b_m - a) * (angle * (pi * 0.011111111111111112)));
                                          	else
                                          		tmp = sin((0.011111111111111112 * (pi * angle))) * ((b_m + a) * (b_m - a));
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          b_m = N[Abs[b], $MachinePrecision]
                                          code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+67], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          b_m = \left|b\right|
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;\frac{angle}{180} \leq 10^{+67}:\\
                                          \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999983e66

                                            1. Initial program 59.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--.f6462.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 rewrites62.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 rewrites73.6%

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

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

                                              1. Initial program 33.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. lower-*.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--.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) \]
                                                9. 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) \]
                                                10. 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) \]
                                                11. 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) \]
                                                12. 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) \]
                                                13. 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) \]
                                                14. lower-*.f64N/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) \]
                                                15. lower-+.f64N/A

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

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

                                                \[\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)} \]
                                            7. Recombined 2 regimes into one program.
                                            8. Final simplification66.1%

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

                                            Alternative 15: 57.3% accurate, 3.4× speedup?

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

                                              1. Initial program 59.2%

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

                                                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                                              4. Step-by-step derivation
                                                1. *-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--.f6455.5

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

                                                \[\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)} \]

                                              if 4.00000000000000033e218 < (pow.f64 a #s(literal 2 binary64))

                                              1. Initial program 42.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--.f6453.8

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

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

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

                                                    \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot angle\right) \cdot a\right) \cdot \pi\right) \]
                                                3. Recombined 2 regimes into one program.
                                                4. Final simplification59.3%

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

                                                Alternative 16: 62.2% accurate, 5.9× speedup?

                                                \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+78}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \end{array} \]
                                                b_m = (fabs.f64 b)
                                                (FPCore (a b_m angle)
                                                 :precision binary64
                                                 (if (<= (/ angle 180.0) 1.5e+78)
                                                   (* (+ b_m a) (* (- b_m a) (* angle (* PI 0.011111111111111112))))
                                                   (*
                                                    1.0
                                                    (*
                                                     (+ b_m a)
                                                     (*
                                                      (* b_m 2.0)
                                                      (*
                                                       angle
                                                       (fma
                                                        -2.8577960676726107e-8
                                                        (* (* angle angle) (* PI (* PI PI)))
                                                        (* PI 0.005555555555555556))))))))
                                                b_m = fabs(b);
                                                double code(double a, double b_m, double angle) {
                                                	double tmp;
                                                	if ((angle / 180.0) <= 1.5e+78) {
                                                		tmp = (b_m + a) * ((b_m - a) * (angle * (((double) M_PI) * 0.011111111111111112)));
                                                	} else {
                                                		tmp = 1.0 * ((b_m + a) * ((b_m * 2.0) * (angle * fma(-2.8577960676726107e-8, ((angle * angle) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.005555555555555556)))));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                b_m = abs(b)
                                                function code(a, b_m, angle)
                                                	tmp = 0.0
                                                	if (Float64(angle / 180.0) <= 1.5e+78)
                                                		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle * Float64(pi * 0.011111111111111112))));
                                                	else
                                                		tmp = Float64(1.0 * Float64(Float64(b_m + a) * Float64(Float64(b_m * 2.0) * Float64(angle * fma(-2.8577960676726107e-8, Float64(Float64(angle * angle) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.005555555555555556))))));
                                                	end
                                                	return tmp
                                                end
                                                
                                                b_m = N[Abs[b], $MachinePrecision]
                                                code[a_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1.5e+78], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m * 2.0), $MachinePrecision] * N[(angle * N[(-2.8577960676726107e-8 * N[(N[(angle * angle), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                b_m = \left|b\right|
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+78}:\\
                                                \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;1 \cdot \left(\left(b\_m + a\right) \cdot \left(\left(b\_m \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if (/.f64 angle #s(literal 180 binary64)) < 1.49999999999999991e78

                                                  1. Initial program 58.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--.f6462.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 rewrites62.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. Step-by-step derivation
                                                    1. Applied rewrites72.7%

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

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

                                                    1. Initial program 32.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-*.f6440.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-eval39.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 rewrites39.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. Taylor expanded in angle around 0

                                                      \[\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 \color{blue}{1} \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites36.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 \color{blue}{1} \]
                                                      2. Taylor expanded in b around inf

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

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

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

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

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

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

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

                                                          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(2 \cdot b\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right)\right)\right) \cdot 1 \]
                                                      4. Applied rewrites24.8%

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

                                                        \[\leadsto \left(\left(b + a\right) \cdot \left(\left(2 \cdot b\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{-1}{34992000} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right) + \frac{1}{180} \cdot \mathsf{PI}\left(\right)\right)}\right)\right)\right) \cdot 1 \]
                                                      6. Step-by-step derivation
                                                        1. Applied rewrites34.1%

                                                          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(2 \cdot b\right) \cdot \left(angle \cdot \color{blue}{\mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)}\right)\right)\right) \cdot 1 \]
                                                      7. Recombined 2 regimes into one program.
                                                      8. Final simplification65.3%

                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+78}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(b + a\right) \cdot \left(\left(b \cdot 2\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.8577960676726107 \cdot 10^{-8}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \]
                                                      9. Add Preprocessing

                                                      Alternative 17: 62.6% accurate, 6.0× speedup?

                                                      \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := angle \cdot \left(\pi \cdot 0.011111111111111112\right)\\ \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+54}:\\ \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot t\_0\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+244}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \sqrt{a \cdot \left(a \cdot \left(a \cdot a\right)\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\\ \end{array} \end{array} \]
                                                      b_m = (fabs.f64 b)
                                                      (FPCore (a b_m angle)
                                                       :precision binary64
                                                       (let* ((t_0 (* angle (* PI 0.011111111111111112))))
                                                         (if (<= (/ angle 180.0) 2e+54)
                                                           (* (+ b_m a) (* (- b_m a) t_0))
                                                           (if (<= (/ angle 180.0) 5e+244)
                                                             (* -0.011111111111111112 (* PI (* angle (sqrt (* a (* a (* a a)))))))
                                                             (* t_0 (* (+ b_m a) (- b_m a)))))))
                                                      b_m = fabs(b);
                                                      double code(double a, double b_m, double angle) {
                                                      	double t_0 = angle * (((double) M_PI) * 0.011111111111111112);
                                                      	double tmp;
                                                      	if ((angle / 180.0) <= 2e+54) {
                                                      		tmp = (b_m + a) * ((b_m - a) * t_0);
                                                      	} else if ((angle / 180.0) <= 5e+244) {
                                                      		tmp = -0.011111111111111112 * (((double) M_PI) * (angle * sqrt((a * (a * (a * a))))));
                                                      	} else {
                                                      		tmp = t_0 * ((b_m + a) * (b_m - a));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      b_m = Math.abs(b);
                                                      public static double code(double a, double b_m, double angle) {
                                                      	double t_0 = angle * (Math.PI * 0.011111111111111112);
                                                      	double tmp;
                                                      	if ((angle / 180.0) <= 2e+54) {
                                                      		tmp = (b_m + a) * ((b_m - a) * t_0);
                                                      	} else if ((angle / 180.0) <= 5e+244) {
                                                      		tmp = -0.011111111111111112 * (Math.PI * (angle * Math.sqrt((a * (a * (a * a))))));
                                                      	} else {
                                                      		tmp = t_0 * ((b_m + a) * (b_m - a));
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      b_m = math.fabs(b)
                                                      def code(a, b_m, angle):
                                                      	t_0 = angle * (math.pi * 0.011111111111111112)
                                                      	tmp = 0
                                                      	if (angle / 180.0) <= 2e+54:
                                                      		tmp = (b_m + a) * ((b_m - a) * t_0)
                                                      	elif (angle / 180.0) <= 5e+244:
                                                      		tmp = -0.011111111111111112 * (math.pi * (angle * math.sqrt((a * (a * (a * a))))))
                                                      	else:
                                                      		tmp = t_0 * ((b_m + a) * (b_m - a))
                                                      	return tmp
                                                      
                                                      b_m = abs(b)
                                                      function code(a, b_m, angle)
                                                      	t_0 = Float64(angle * Float64(pi * 0.011111111111111112))
                                                      	tmp = 0.0
                                                      	if (Float64(angle / 180.0) <= 2e+54)
                                                      		tmp = Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * t_0));
                                                      	elseif (Float64(angle / 180.0) <= 5e+244)
                                                      		tmp = Float64(-0.011111111111111112 * Float64(pi * Float64(angle * sqrt(Float64(a * Float64(a * Float64(a * a)))))));
                                                      	else
                                                      		tmp = Float64(t_0 * Float64(Float64(b_m + a) * Float64(b_m - a)));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      b_m = abs(b);
                                                      function tmp_2 = code(a, b_m, angle)
                                                      	t_0 = angle * (pi * 0.011111111111111112);
                                                      	tmp = 0.0;
                                                      	if ((angle / 180.0) <= 2e+54)
                                                      		tmp = (b_m + a) * ((b_m - a) * t_0);
                                                      	elseif ((angle / 180.0) <= 5e+244)
                                                      		tmp = -0.011111111111111112 * (pi * (angle * sqrt((a * (a * (a * a))))));
                                                      	else
                                                      		tmp = t_0 * ((b_m + a) * (b_m - a));
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      b_m = N[Abs[b], $MachinePrecision]
                                                      code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+54], N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+244], N[(-0.011111111111111112 * N[(Pi * N[(angle * N[Sqrt[N[(a * N[(a * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                      
                                                      \begin{array}{l}
                                                      b_m = \left|b\right|
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      t_0 := angle \cdot \left(\pi \cdot 0.011111111111111112\right)\\
                                                      \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+54}:\\
                                                      \;\;\;\;\left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot t\_0\right)\\
                                                      
                                                      \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+244}:\\
                                                      \;\;\;\;-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \sqrt{a \cdot \left(a \cdot \left(a \cdot a\right)\right)}\right)\right)\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_0 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 3 regimes
                                                      2. if (/.f64 angle #s(literal 180 binary64)) < 2.0000000000000002e54

                                                        1. Initial program 60.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--.f6463.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 rewrites63.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. Step-by-step derivation
                                                          1. Applied rewrites73.9%

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

                                                          if 2.0000000000000002e54 < (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000022e244

                                                          1. Initial program 30.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--.f6426.8

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

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

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

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

                                                              1. Initial program 40.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--.f6437.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 rewrites37.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)} \]
                                                            3. Recombined 3 regimes into one program.
                                                            4. Final simplification63.8%

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

                                                            Alternative 18: 62.4% accurate, 16.8× speedup?

                                                            \[\begin{array}{l} b_m = \left|b\right| \\ \left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \end{array} \]
                                                            b_m = (fabs.f64 b)
                                                            (FPCore (a b_m angle)
                                                             :precision binary64
                                                             (* (+ b_m a) (* (- b_m a) (* angle (* PI 0.011111111111111112)))))
                                                            b_m = fabs(b);
                                                            double code(double a, double b_m, double angle) {
                                                            	return (b_m + a) * ((b_m - a) * (angle * (((double) M_PI) * 0.011111111111111112)));
                                                            }
                                                            
                                                            b_m = Math.abs(b);
                                                            public static double code(double a, double b_m, double angle) {
                                                            	return (b_m + a) * ((b_m - a) * (angle * (Math.PI * 0.011111111111111112)));
                                                            }
                                                            
                                                            b_m = math.fabs(b)
                                                            def code(a, b_m, angle):
                                                            	return (b_m + a) * ((b_m - a) * (angle * (math.pi * 0.011111111111111112)))
                                                            
                                                            b_m = abs(b)
                                                            function code(a, b_m, angle)
                                                            	return Float64(Float64(b_m + a) * Float64(Float64(b_m - a) * Float64(angle * Float64(pi * 0.011111111111111112))))
                                                            end
                                                            
                                                            b_m = abs(b);
                                                            function tmp = code(a, b_m, angle)
                                                            	tmp = (b_m + a) * ((b_m - a) * (angle * (pi * 0.011111111111111112)));
                                                            end
                                                            
                                                            b_m = N[Abs[b], $MachinePrecision]
                                                            code[a_, b$95$m_, angle_] := N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                            
                                                            \begin{array}{l}
                                                            b_m = \left|b\right|
                                                            
                                                            \\
                                                            \left(b\_m + a\right) \cdot \left(\left(b\_m - a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Initial program 53.7%

                                                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                            2. 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.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 rewrites54.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 rewrites62.9%

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

                                                              Alternative 19: 38.5% accurate, 21.6× speedup?

                                                              \[\begin{array}{l} b_m = \left|b\right| \\ -0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right) \end{array} \]
                                                              b_m = (fabs.f64 b)
                                                              (FPCore (a b_m angle)
                                                               :precision binary64
                                                               (* -0.011111111111111112 (* a (* PI (* a angle)))))
                                                              b_m = fabs(b);
                                                              double code(double a, double b_m, double angle) {
                                                              	return -0.011111111111111112 * (a * (((double) M_PI) * (a * angle)));
                                                              }
                                                              
                                                              b_m = Math.abs(b);
                                                              public static double code(double a, double b_m, double angle) {
                                                              	return -0.011111111111111112 * (a * (Math.PI * (a * angle)));
                                                              }
                                                              
                                                              b_m = math.fabs(b)
                                                              def code(a, b_m, angle):
                                                              	return -0.011111111111111112 * (a * (math.pi * (a * angle)))
                                                              
                                                              b_m = abs(b)
                                                              function code(a, b_m, angle)
                                                              	return Float64(-0.011111111111111112 * Float64(a * Float64(pi * Float64(a * angle))))
                                                              end
                                                              
                                                              b_m = abs(b);
                                                              function tmp = code(a, b_m, angle)
                                                              	tmp = -0.011111111111111112 * (a * (pi * (a * angle)));
                                                              end
                                                              
                                                              b_m = N[Abs[b], $MachinePrecision]
                                                              code[a_, b$95$m_, angle_] := N[(-0.011111111111111112 * N[(a * N[(Pi * N[(a * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                              
                                                              \begin{array}{l}
                                                              b_m = \left|b\right|
                                                              
                                                              \\
                                                              -0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right)
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Initial program 53.7%

                                                                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                              2. 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.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 rewrites54.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 rewrites37.5%

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

                                                                    \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(\left(a \cdot angle\right) \cdot \color{blue}{\pi}\right)\right) \]
                                                                  2. Final simplification40.4%

                                                                    \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot \left(a \cdot angle\right)\right)\right) \]
                                                                  3. Add Preprocessing

                                                                  Alternative 20: 38.5% accurate, 21.6× speedup?

                                                                  \[\begin{array}{l} b_m = \left|b\right| \\ -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right) \end{array} \]
                                                                  b_m = (fabs.f64 b)
                                                                  (FPCore (a b_m angle)
                                                                   :precision binary64
                                                                   (* -0.011111111111111112 (* a (* a (* PI angle)))))
                                                                  b_m = fabs(b);
                                                                  double code(double a, double b_m, double angle) {
                                                                  	return -0.011111111111111112 * (a * (a * (((double) M_PI) * angle)));
                                                                  }
                                                                  
                                                                  b_m = Math.abs(b);
                                                                  public static double code(double a, double b_m, double angle) {
                                                                  	return -0.011111111111111112 * (a * (a * (Math.PI * angle)));
                                                                  }
                                                                  
                                                                  b_m = math.fabs(b)
                                                                  def code(a, b_m, angle):
                                                                  	return -0.011111111111111112 * (a * (a * (math.pi * angle)))
                                                                  
                                                                  b_m = abs(b)
                                                                  function code(a, b_m, angle)
                                                                  	return Float64(-0.011111111111111112 * Float64(a * Float64(a * Float64(pi * angle))))
                                                                  end
                                                                  
                                                                  b_m = abs(b);
                                                                  function tmp = code(a, b_m, angle)
                                                                  	tmp = -0.011111111111111112 * (a * (a * (pi * angle)));
                                                                  end
                                                                  
                                                                  b_m = N[Abs[b], $MachinePrecision]
                                                                  code[a_, b$95$m_, angle_] := N[(-0.011111111111111112 * N[(a * N[(a * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                  
                                                                  \begin{array}{l}
                                                                  b_m = \left|b\right|
                                                                  
                                                                  \\
                                                                  -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 53.7%

                                                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                                                  2. 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.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 rewrites54.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 rewrites37.5%

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

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

                                                                      Reproduce

                                                                      ?
                                                                      herbie shell --seed 2024235 
                                                                      (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)))))