ab-angle->ABCF B

Percentage Accurate: 53.9% → 67.1%
Time: 15.0s
Alternatives: 18
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 18 alternatives:

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

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

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

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

\mathbf{else}:\\
\;\;\;\;1 \cdot t\_0\\


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

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

        \[\leadsto \left(\color{blue}{\left(a + b\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) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(a + b\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) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(a + b\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) \]
      17. lower--.f64N/A

        \[\leadsto \left(\left(a + b\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) \]
      18. lower-*.f6465.5

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

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

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

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

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

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

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

      \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 2\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. +-commutativeN/A

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

        \[\leadsto \left(\color{blue}{\left(a + b\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) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(a + b\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) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(a + b\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) \]
      17. lower--.f64N/A

        \[\leadsto \left(\left(a + b\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) \]
      18. lower-*.f6465.7

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

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

        \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot 2\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. add-sqr-sqrtN/A

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \cos \left(\color{blue}{\left(\sqrt{\sqrt{\pi} \cdot \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. +-commutativeN/A

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

        \[\leadsto \left(\color{blue}{\left(a + b\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) \]
      15. *-commutativeN/A

        \[\leadsto \left(\left(a + b\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) \]
      16. lower-*.f64N/A

        \[\leadsto \left(\left(a + b\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) \]
      17. lower--.f64N/A

        \[\leadsto \left(\left(a + b\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) \]
      18. lower-*.f6479.9

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

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

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

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

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

    Alternative 2: 65.1% accurate, 0.8× speedup?

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

      1. Initial program 63.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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

        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. Applied rewrites11.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        1. Initial program 44.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. +-commutativeN/A

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

            \[\leadsto \left(\color{blue}{\left(a + b\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) \]
          15. *-commutativeN/A

            \[\leadsto \left(\left(a + b\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) \]
          16. lower-*.f64N/A

            \[\leadsto \left(\left(a + b\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) \]
          17. lower--.f64N/A

            \[\leadsto \left(\left(a + b\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) \]
          18. lower-*.f6465.9

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

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

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

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

            \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\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)} \cdot 2\right)\right)\right) \cdot 1 \]
          3. Step-by-step derivation
            1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 3: 64.9% accurate, 0.8× speedup?

        \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := {b\_m}^{2} - {a}^{2}\\ \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-254}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+50}:\\ \;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.8577960676726107 \cdot 10^{-8}, \left(\pi \cdot \pi\right) \cdot \pi, \pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\ \end{array} \end{array} \]
        b_m = (fabs.f64 b)
        (FPCore (a b_m angle)
         :precision binary64
         (let* ((t_0 (- (pow b_m 2.0) (pow a 2.0))))
           (if (<= t_0 -5e-254)
             (* (* (* -0.011111111111111112 a) angle) (* PI a))
             (if (<= t_0 2e+50)
               (* (* b_m b_m) (sin (* (* PI angle) 0.011111111111111112)))
               (*
                (*
                 (*
                  (*
                   (*
                    (fma
                     (* (* angle angle) -2.8577960676726107e-8)
                     (* (* PI PI) PI)
                     (* PI 0.005555555555555556))
                    angle)
                   2.0)
                  (- b_m a))
                 (+ a b_m))
                1.0)))))
        b_m = fabs(b);
        double code(double a, double b_m, double angle) {
        	double t_0 = pow(b_m, 2.0) - pow(a, 2.0);
        	double tmp;
        	if (t_0 <= -5e-254) {
        		tmp = ((-0.011111111111111112 * a) * angle) * (((double) M_PI) * a);
        	} else if (t_0 <= 2e+50) {
        		tmp = (b_m * b_m) * sin(((((double) M_PI) * angle) * 0.011111111111111112));
        	} else {
        		tmp = ((((fma(((angle * angle) * -2.8577960676726107e-8), ((((double) M_PI) * ((double) M_PI)) * ((double) M_PI)), (((double) M_PI) * 0.005555555555555556)) * angle) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
        	}
        	return tmp;
        }
        
        b_m = abs(b)
        function code(a, b_m, angle)
        	t_0 = Float64((b_m ^ 2.0) - (a ^ 2.0))
        	tmp = 0.0
        	if (t_0 <= -5e-254)
        		tmp = Float64(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a));
        	elseif (t_0 <= 2e+50)
        		tmp = Float64(Float64(b_m * b_m) * sin(Float64(Float64(pi * angle) * 0.011111111111111112)));
        	else
        		tmp = Float64(Float64(Float64(Float64(Float64(fma(Float64(Float64(angle * angle) * -2.8577960676726107e-8), Float64(Float64(pi * pi) * pi), Float64(pi * 0.005555555555555556)) * angle) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) * 1.0);
        	end
        	return tmp
        end
        
        b_m = N[Abs[b], $MachinePrecision]
        code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -5e-254], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+50], N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(angle * angle), $MachinePrecision] * -2.8577960676726107e-8), $MachinePrecision] * N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision] + N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]]]
        
        \begin{array}{l}
        b_m = \left|b\right|
        
        \\
        \begin{array}{l}
        t_0 := {b\_m}^{2} - {a}^{2}\\
        \mathbf{if}\;t\_0 \leq -5 \cdot 10^{-254}:\\
        \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\
        
        \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{+50}:\\
        \;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\left(\left(\mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.8577960676726107 \cdot 10^{-8}, \left(\pi \cdot \pi\right) \cdot \pi, \pi \cdot 0.005555555555555556\right) \cdot angle\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 57.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. Applied rewrites17.9%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right) \cdot \color{blue}{\left(b \cdot b\right)} \]
                6. Applied rewrites58.4%

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

                if 2.0000000000000002e50 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

                1. Initial program 43.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. +-commutativeN/A

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

                    \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                  15. *-commutativeN/A

                    \[\leadsto \left(\left(a + b\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) \]
                  16. lower-*.f64N/A

                    \[\leadsto \left(\left(a + b\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) \]
                  17. lower--.f64N/A

                    \[\leadsto \left(\left(a + b\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) \]
                  18. lower-*.f6468.5

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

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

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

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

                    \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\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)} \cdot 2\right)\right)\right) \cdot 1 \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                    15. *-commutativeN/A

                      \[\leadsto \left(\left(a + b\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) \]
                    16. lower-*.f64N/A

                      \[\leadsto \left(\left(a + b\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) \]
                    17. lower--.f64N/A

                      \[\leadsto \left(\left(a + b\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) \]
                    18. lower-*.f6465.5

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

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

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

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

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

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

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

                    \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 2\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. +-commutativeN/A

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

                      \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                    15. *-commutativeN/A

                      \[\leadsto \left(\left(a + b\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) \]
                    16. lower-*.f64N/A

                      \[\leadsto \left(\left(a + b\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) \]
                    17. lower--.f64N/A

                      \[\leadsto \left(\left(a + b\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) \]
                    18. lower-*.f6471.1

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

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

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

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

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

                  Alternative 5: 66.4% accurate, 1.3× speedup?

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

                    1. Initial program 60.0%

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

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

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

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

                        \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                      15. *-commutativeN/A

                        \[\leadsto \left(\left(a + b\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) \]
                      16. lower-*.f64N/A

                        \[\leadsto \left(\left(a + b\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) \]
                      17. lower--.f64N/A

                        \[\leadsto \left(\left(a + b\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) \]
                      18. lower-*.f6467.3

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

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

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

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

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

                    1. Initial program 49.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. +-commutativeN/A

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

                        \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                      15. *-commutativeN/A

                        \[\leadsto \left(\left(a + b\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) \]
                      16. lower-*.f64N/A

                        \[\leadsto \left(\left(a + b\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) \]
                      17. lower--.f64N/A

                        \[\leadsto \left(\left(a + b\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) \]
                      18. lower-*.f6467.7

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

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

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

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

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

                    Alternative 6: 65.8% accurate, 1.7× speedup?

                    \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;{b\_m}^{2} \leq 10^{-145}:\\ \;\;\;\;\left(\left(\left(\sin \left(\left(\frac{-1}{\frac{-1}{angle}} \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\\ \end{array} \end{array} \]
                    b_m = (fabs.f64 b)
                    (FPCore (a b_m angle)
                     :precision binary64
                     (if (<= (pow b_m 2.0) 1e-145)
                       (*
                        (*
                         (*
                          (* (sin (* (* (/ -1.0 (/ -1.0 angle)) PI) 0.005555555555555556)) 2.0)
                          (- b_m a))
                         (+ a b_m))
                        1.0)
                       (*
                        1.0
                        (*
                         (* (* (sin (* (* angle 0.005555555555555556) PI)) 2.0) (- b_m a))
                         (+ a b_m)))))
                    b_m = fabs(b);
                    double code(double a, double b_m, double angle) {
                    	double tmp;
                    	if (pow(b_m, 2.0) <= 1e-145) {
                    		tmp = (((sin((((-1.0 / (-1.0 / angle)) * ((double) M_PI)) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
                    	} else {
                    		tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * 2.0) * (b_m - a)) * (a + 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) <= 1e-145) {
                    		tmp = (((Math.sin((((-1.0 / (-1.0 / angle)) * Math.PI) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
                    	} else {
                    		tmp = 1.0 * (((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * 2.0) * (b_m - a)) * (a + b_m));
                    	}
                    	return tmp;
                    }
                    
                    b_m = math.fabs(b)
                    def code(a, b_m, angle):
                    	tmp = 0
                    	if math.pow(b_m, 2.0) <= 1e-145:
                    		tmp = (((math.sin((((-1.0 / (-1.0 / angle)) * math.pi) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0
                    	else:
                    		tmp = 1.0 * (((math.sin(((angle * 0.005555555555555556) * math.pi)) * 2.0) * (b_m - a)) * (a + b_m))
                    	return tmp
                    
                    b_m = abs(b)
                    function code(a, b_m, angle)
                    	tmp = 0.0
                    	if ((b_m ^ 2.0) <= 1e-145)
                    		tmp = Float64(Float64(Float64(Float64(sin(Float64(Float64(Float64(-1.0 / Float64(-1.0 / angle)) * pi) * 0.005555555555555556)) * 2.0) * Float64(b_m - a)) * Float64(a + b_m)) * 1.0);
                    	else
                    		tmp = Float64(1.0 * Float64(Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * 2.0) * Float64(b_m - a)) * Float64(a + 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) <= 1e-145)
                    		tmp = (((sin((((-1.0 / (-1.0 / angle)) * pi) * 0.005555555555555556)) * 2.0) * (b_m - a)) * (a + b_m)) * 1.0;
                    	else
                    		tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * pi)) * 2.0) * (b_m - a)) * (a + b_m));
                    	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], 1e-145], N[(N[(N[(N[(N[Sin[N[(N[(N[(-1.0 / N[(-1.0 / angle), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision], N[(1.0 * N[(N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    b_m = \left|b\right|
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;{b\_m}^{2} \leq 10^{-145}:\\
                    \;\;\;\;\left(\left(\left(\sin \left(\left(\frac{-1}{\frac{-1}{angle}} \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right) \cdot 1\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;1 \cdot \left(\left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (pow.f64 b #s(literal 2 binary64)) < 9.99999999999999915e-146

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

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

                          \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                        15. *-commutativeN/A

                          \[\leadsto \left(\left(a + b\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) \]
                        16. lower-*.f64N/A

                          \[\leadsto \left(\left(a + b\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) \]
                        17. lower--.f64N/A

                          \[\leadsto \left(\left(a + b\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) \]
                        18. lower-*.f6468.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 9.99999999999999915e-146 < (pow.f64 b #s(literal 2 binary64))

                        1. Initial program 49.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. +-commutativeN/A

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

                            \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                          15. *-commutativeN/A

                            \[\leadsto \left(\left(a + b\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) \]
                          16. lower-*.f64N/A

                            \[\leadsto \left(\left(a + b\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) \]
                          17. lower--.f64N/A

                            \[\leadsto \left(\left(a + b\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) \]
                          18. lower-*.f6467.2

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

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

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

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

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

                        Alternative 7: 66.9% accurate, 1.7× speedup?

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

                          1. Initial program 55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                            15. *-commutativeN/A

                              \[\leadsto \left(\left(a + b\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) \]
                            16. lower-*.f64N/A

                              \[\leadsto \left(\left(a + b\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) \]
                            17. lower--.f64N/A

                              \[\leadsto \left(\left(a + b\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) \]
                            18. lower-*.f6465.2

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

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

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

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

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

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

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

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

                          if 2.64999999999999993e57 < b

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

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

                              \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                            15. *-commutativeN/A

                              \[\leadsto \left(\left(a + b\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) \]
                            16. lower-*.f64N/A

                              \[\leadsto \left(\left(a + b\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) \]
                            17. lower--.f64N/A

                              \[\leadsto \left(\left(a + b\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) \]
                            18. lower-*.f6474.8

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

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

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

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

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

                          Alternative 8: 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(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot \left(\left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\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-150)
                             (* (* (sin (* (* PI angle) 0.011111111111111112)) (- b_m a)) (+ a b_m))
                             (*
                              1.0
                              (*
                               (* (* (sin (* (* angle 0.005555555555555556) PI)) 2.0) (- b_m a))
                               (+ a b_m)))))
                          b_m = fabs(b);
                          double code(double a, double b_m, double angle) {
                          	double tmp;
                          	if (pow(b_m, 2.0) <= 2e-150) {
                          		tmp = (sin(((((double) M_PI) * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
                          	} else {
                          		tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * 2.0) * (b_m - a)) * (a + 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) <= 2e-150) {
                          		tmp = (Math.sin(((Math.PI * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
                          	} else {
                          		tmp = 1.0 * (((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * 2.0) * (b_m - a)) * (a + b_m));
                          	}
                          	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 = (math.sin(((math.pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m)
                          	else:
                          		tmp = 1.0 * (((math.sin(((angle * 0.005555555555555556) * math.pi)) * 2.0) * (b_m - a)) * (a + b_m))
                          	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(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64(b_m - a)) * Float64(a + b_m));
                          	else
                          		tmp = Float64(1.0 * Float64(Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * 2.0) * Float64(b_m - a)) * Float64(a + 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) <= 2e-150)
                          		tmp = (sin(((pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
                          	else
                          		tmp = 1.0 * (((sin(((angle * 0.005555555555555556) * pi)) * 2.0) * (b_m - a)) * (a + b_m));
                          	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[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(1.0 * N[(N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          b_m = \left|b\right|
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-150}:\\
                          \;\;\;\;\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;1 \cdot \left(\left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\right)\\
                          
                          
                          \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(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\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. +-commutativeN/A

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

                                \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                              15. *-commutativeN/A

                                \[\leadsto \left(\left(a + b\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) \]
                              16. lower-*.f64N/A

                                \[\leadsto \left(\left(a + b\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) \]
                              17. lower--.f64N/A

                                \[\leadsto \left(\left(a + b\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) \]
                              18. lower-*.f6466.8

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

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

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

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

                            Alternative 9: 57.2% 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}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b\_m \cdot b\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\\ \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) angle) (* PI a))
                               (* (* (* (* b_m b_m) PI) angle) 0.011111111111111112)))
                            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) * angle) * (((double) M_PI) * a);
                            	} else {
                            		tmp = (((b_m * b_m) * ((double) M_PI)) * angle) * 0.011111111111111112;
                            	}
                            	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) * angle) * (Math.PI * a);
                            	} else {
                            		tmp = (((b_m * b_m) * Math.PI) * angle) * 0.011111111111111112;
                            	}
                            	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) * angle) * (math.pi * a)
                            	else:
                            		tmp = (((b_m * b_m) * math.pi) * angle) * 0.011111111111111112
                            	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(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a));
                            	else
                            		tmp = Float64(Float64(Float64(Float64(b_m * b_m) * pi) * angle) * 0.011111111111111112);
                            	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) * angle) * (pi * a);
                            	else
                            		tmp = (((b_m * b_m) * pi) * angle) * 0.011111111111111112;
                            	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[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b$95$m * b$95$m), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
                            
                            \begin{array}{l}
                            b_m = \left|b\right|
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;{b\_m}^{2} - {a}^{2} \leq -5 \cdot 10^{-254}:\\
                            \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(\left(\left(b\_m \cdot b\_m\right) \cdot \pi\right) \cdot angle\right) \cdot 0.011111111111111112\\
                            
                            
                            \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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(a \cdot \pi\right) \cdot \left(angle \cdot \color{blue}{\left(-0.011111111111111112 \cdot a\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. lower-*.f64N/A

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

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

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

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

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

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

                                        \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\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(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                    6. Taylor expanded in b around inf

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

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

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

                                    Alternative 10: 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(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+92}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(\left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\right)\\ \end{array} \end{array} \]
                                    b_m = (fabs.f64 b)
                                    (FPCore (a b_m angle)
                                     :precision binary64
                                     (if (<= (/ angle 180.0) 4e+24)
                                       (* (* (sin (* (* PI angle) 0.011111111111111112)) (- b_m a)) (+ a b_m))
                                       (if (<= (/ angle 180.0) 1e+92)
                                         (* (* PI angle) (* (* a a) -0.011111111111111112))
                                         (*
                                          (* (- b_m a) (+ a b_m))
                                          (sin (* (* (* angle 0.005555555555555556) PI) 2.0))))))
                                    b_m = fabs(b);
                                    double code(double a, double b_m, double angle) {
                                    	double tmp;
                                    	if ((angle / 180.0) <= 4e+24) {
                                    		tmp = (sin(((((double) M_PI) * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
                                    	} else if ((angle / 180.0) <= 1e+92) {
                                    		tmp = (((double) M_PI) * angle) * ((a * a) * -0.011111111111111112);
                                    	} else {
                                    		tmp = ((b_m - a) * (a + b_m)) * sin((((angle * 0.005555555555555556) * ((double) M_PI)) * 2.0));
                                    	}
                                    	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 = (Math.sin(((Math.PI * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
                                    	} else if ((angle / 180.0) <= 1e+92) {
                                    		tmp = (Math.PI * angle) * ((a * a) * -0.011111111111111112);
                                    	} else {
                                    		tmp = ((b_m - a) * (a + b_m)) * Math.sin((((angle * 0.005555555555555556) * Math.PI) * 2.0));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    b_m = math.fabs(b)
                                    def code(a, b_m, angle):
                                    	tmp = 0
                                    	if (angle / 180.0) <= 4e+24:
                                    		tmp = (math.sin(((math.pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m)
                                    	elif (angle / 180.0) <= 1e+92:
                                    		tmp = (math.pi * angle) * ((a * a) * -0.011111111111111112)
                                    	else:
                                    		tmp = ((b_m - a) * (a + b_m)) * math.sin((((angle * 0.005555555555555556) * math.pi) * 2.0))
                                    	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(sin(Float64(Float64(pi * angle) * 0.011111111111111112)) * Float64(b_m - a)) * Float64(a + b_m));
                                    	elseif (Float64(angle / 180.0) <= 1e+92)
                                    		tmp = Float64(Float64(pi * angle) * Float64(Float64(a * a) * -0.011111111111111112));
                                    	else
                                    		tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(Float64(Float64(angle * 0.005555555555555556) * pi) * 2.0)));
                                    	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 = (sin(((pi * angle) * 0.011111111111111112)) * (b_m - a)) * (a + b_m);
                                    	elseif ((angle / 180.0) <= 1e+92)
                                    		tmp = (pi * angle) * ((a * a) * -0.011111111111111112);
                                    	else
                                    		tmp = ((b_m - a) * (a + b_m)) * sin((((angle * 0.005555555555555556) * pi) * 2.0));
                                    	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[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+92], N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision] * 2.0), $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(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
                                    
                                    \mathbf{elif}\;\frac{angle}{180} \leq 10^{+92}:\\
                                    \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(\left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot 2\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(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\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. lower-*.f64N/A

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

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

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

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

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

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

                                          \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\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(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                      6. Taylor expanded in b around 0

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

                                          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\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. +-commutativeN/A

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

                                            \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                                          15. *-commutativeN/A

                                            \[\leadsto \left(\left(a + b\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) \]
                                          16. lower-*.f64N/A

                                            \[\leadsto \left(\left(a + b\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) \]
                                          17. lower--.f64N/A

                                            \[\leadsto \left(\left(a + b\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) \]
                                          18. lower-*.f6441.7

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

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

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

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

                                      Alternative 11: 67.6% accurate, 2.8× speedup?

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

                                        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(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]

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

                                        1. Initial program 25.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. lower-*.f64N/A

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

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

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

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

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

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

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

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

                                            \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\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. Applied rewrites1.8%

                                            \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b \cdot b, b, \left(a \cdot a\right) \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot b - \left(a \cdot a\right) \cdot a\right)\right) \cdot \left(\frac{1}{\mathsf{fma}\left(\left(b \cdot b\right) \cdot b, b, \mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(a \cdot a\right)\right)} \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
                                          4. Applied rewrites43.0%

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

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

                                        Alternative 12: 64.4% accurate, 3.1× speedup?

                                        \[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \left(0.011111111111111112 \cdot \pi\right) \cdot angle\\ \mathbf{if}\;\frac{angle}{180} \leq 10^{+67}:\\ \;\;\;\;\left(t\_0 \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin t\_0\\ \end{array} \end{array} \]
                                        b_m = (fabs.f64 b)
                                        (FPCore (a b_m angle)
                                         :precision binary64
                                         (let* ((t_0 (* (* 0.011111111111111112 PI) angle)))
                                           (if (<= (/ angle 180.0) 1e+67)
                                             (* (* t_0 (- b_m a)) (+ a b_m))
                                             (* (* (- b_m a) (+ a b_m)) (sin t_0)))))
                                        b_m = fabs(b);
                                        double code(double a, double b_m, double angle) {
                                        	double t_0 = (0.011111111111111112 * ((double) M_PI)) * angle;
                                        	double tmp;
                                        	if ((angle / 180.0) <= 1e+67) {
                                        		tmp = (t_0 * (b_m - a)) * (a + b_m);
                                        	} else {
                                        		tmp = ((b_m - a) * (a + b_m)) * sin(t_0);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        b_m = Math.abs(b);
                                        public static double code(double a, double b_m, double angle) {
                                        	double t_0 = (0.011111111111111112 * Math.PI) * angle;
                                        	double tmp;
                                        	if ((angle / 180.0) <= 1e+67) {
                                        		tmp = (t_0 * (b_m - a)) * (a + b_m);
                                        	} else {
                                        		tmp = ((b_m - a) * (a + b_m)) * Math.sin(t_0);
                                        	}
                                        	return tmp;
                                        }
                                        
                                        b_m = math.fabs(b)
                                        def code(a, b_m, angle):
                                        	t_0 = (0.011111111111111112 * math.pi) * angle
                                        	tmp = 0
                                        	if (angle / 180.0) <= 1e+67:
                                        		tmp = (t_0 * (b_m - a)) * (a + b_m)
                                        	else:
                                        		tmp = ((b_m - a) * (a + b_m)) * math.sin(t_0)
                                        	return tmp
                                        
                                        b_m = abs(b)
                                        function code(a, b_m, angle)
                                        	t_0 = Float64(Float64(0.011111111111111112 * pi) * angle)
                                        	tmp = 0.0
                                        	if (Float64(angle / 180.0) <= 1e+67)
                                        		tmp = Float64(Float64(t_0 * Float64(b_m - a)) * Float64(a + b_m));
                                        	else
                                        		tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(t_0));
                                        	end
                                        	return tmp
                                        end
                                        
                                        b_m = abs(b);
                                        function tmp_2 = code(a, b_m, angle)
                                        	t_0 = (0.011111111111111112 * pi) * angle;
                                        	tmp = 0.0;
                                        	if ((angle / 180.0) <= 1e+67)
                                        		tmp = (t_0 * (b_m - a)) * (a + b_m);
                                        	else
                                        		tmp = ((b_m - a) * (a + b_m)) * sin(t_0);
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        b_m = N[Abs[b], $MachinePrecision]
                                        code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+67], N[(N[(t$95$0 * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]]]
                                        
                                        \begin{array}{l}
                                        b_m = \left|b\right|
                                        
                                        \\
                                        \begin{array}{l}
                                        t_0 := \left(0.011111111111111112 \cdot \pi\right) \cdot angle\\
                                        \mathbf{if}\;\frac{angle}{180} \leq 10^{+67}:\\
                                        \;\;\;\;\left(t\_0 \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin t\_0\\
                                        
                                        
                                        \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. lower-*.f64N/A

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

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

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

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

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

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

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

                                              \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\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. Applied rewrites1.8%

                                              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b \cdot b, b, \left(a \cdot a\right) \cdot a\right) \cdot \left(\left(b \cdot b\right) \cdot b - \left(a \cdot a\right) \cdot a\right)\right) \cdot \left(\frac{1}{\mathsf{fma}\left(\left(b \cdot b\right) \cdot b, b, \mathsf{fma}\left(a, a, b \cdot b\right) \cdot \left(a \cdot a\right)\right)} \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
                                            4. Applied rewrites43.0%

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

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

                                          Alternative 13: 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(\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
                                          b_m = (fabs.f64 b)
                                          (FPCore (a b_m angle)
                                           :precision binary64
                                           (if (<= (/ angle 180.0) 1e+67)
                                             (* (* (* (* 0.011111111111111112 PI) angle) (- b_m a)) (+ a b_m))
                                             (* (* (- b_m a) (+ a b_m)) (sin (* (* PI angle) 0.011111111111111112)))))
                                          b_m = fabs(b);
                                          double code(double a, double b_m, double angle) {
                                          	double tmp;
                                          	if ((angle / 180.0) <= 1e+67) {
                                          		tmp = (((0.011111111111111112 * ((double) M_PI)) * angle) * (b_m - a)) * (a + b_m);
                                          	} else {
                                          		tmp = ((b_m - a) * (a + b_m)) * sin(((((double) M_PI) * angle) * 0.011111111111111112));
                                          	}
                                          	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 = (((0.011111111111111112 * Math.PI) * angle) * (b_m - a)) * (a + b_m);
                                          	} else {
                                          		tmp = ((b_m - a) * (a + b_m)) * Math.sin(((Math.PI * angle) * 0.011111111111111112));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          b_m = math.fabs(b)
                                          def code(a, b_m, angle):
                                          	tmp = 0
                                          	if (angle / 180.0) <= 1e+67:
                                          		tmp = (((0.011111111111111112 * math.pi) * angle) * (b_m - a)) * (a + b_m)
                                          	else:
                                          		tmp = ((b_m - a) * (a + b_m)) * math.sin(((math.pi * angle) * 0.011111111111111112))
                                          	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(Float64(Float64(0.011111111111111112 * pi) * angle) * Float64(b_m - a)) * Float64(a + b_m));
                                          	else
                                          		tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * sin(Float64(Float64(pi * angle) * 0.011111111111111112)));
                                          	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 = (((0.011111111111111112 * pi) * angle) * (b_m - a)) * (a + b_m);
                                          	else
                                          		tmp = ((b_m - a) * (a + b_m)) * sin(((pi * angle) * 0.011111111111111112));
                                          	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[(N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          b_m = \left|b\right|
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;\frac{angle}{180} \leq 10^{+67}:\\
                                          \;\;\;\;\left(\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\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. lower-*.f64N/A

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

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

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

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

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

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

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

                                                \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\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. *-commutativeN/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 \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) \]
                                                16. 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) \]
                                                17. +-commutativeN/A

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

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

                                            Alternative 14: 57.4% 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(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right)\\ \end{array} \end{array} \]
                                            b_m = (fabs.f64 b)
                                            (FPCore (a b_m angle)
                                             :precision binary64
                                             (if (<= (pow a 2.0) 4e+218)
                                               (* (* (- b_m a) (+ a b_m)) (* (* 0.011111111111111112 PI) angle))
                                               (* (* (* -0.011111111111111112 a) angle) (* PI a))))
                                            b_m = fabs(b);
                                            double code(double a, double b_m, double angle) {
                                            	double tmp;
                                            	if (pow(a, 2.0) <= 4e+218) {
                                            		tmp = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * ((double) M_PI)) * angle);
                                            	} else {
                                            		tmp = ((-0.011111111111111112 * a) * angle) * (((double) M_PI) * a);
                                            	}
                                            	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 = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * Math.PI) * angle);
                                            	} else {
                                            		tmp = ((-0.011111111111111112 * a) * angle) * (Math.PI * a);
                                            	}
                                            	return tmp;
                                            }
                                            
                                            b_m = math.fabs(b)
                                            def code(a, b_m, angle):
                                            	tmp = 0
                                            	if math.pow(a, 2.0) <= 4e+218:
                                            		tmp = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * math.pi) * angle)
                                            	else:
                                            		tmp = ((-0.011111111111111112 * a) * angle) * (math.pi * a)
                                            	return tmp
                                            
                                            b_m = abs(b)
                                            function code(a, b_m, angle)
                                            	tmp = 0.0
                                            	if ((a ^ 2.0) <= 4e+218)
                                            		tmp = Float64(Float64(Float64(b_m - a) * Float64(a + b_m)) * Float64(Float64(0.011111111111111112 * pi) * angle));
                                            	else
                                            		tmp = Float64(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a));
                                            	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 = ((b_m - a) * (a + b_m)) * ((0.011111111111111112 * pi) * angle);
                                            	else
                                            		tmp = ((-0.011111111111111112 * a) * angle) * (pi * a);
                                            	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[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision]]
                                            
                                            \begin{array}{l}
                                            b_m = \left|b\right|
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;{a}^{2} \leq 4 \cdot 10^{+218}:\\
                                            \;\;\;\;\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\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. lower-*.f64N/A

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

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

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

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

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

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

                                                  \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\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(0.011111111111111112 \cdot \pi\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. lower-*.f64N/A

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

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

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

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

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

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

                                                  \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\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(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                              6. Taylor expanded in b around 0

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

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

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

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

                                                  Alternative 15: 62.5% accurate, 6.6× speedup?

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

                                                    1. Initial program 55.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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

                                                      if 9.9999999999999994e161 < b

                                                      1. Initial program 45.1%

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

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

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

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

                                                          \[\leadsto \left(\color{blue}{\left(a + b\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) \]
                                                        15. *-commutativeN/A

                                                          \[\leadsto \left(\left(a + b\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) \]
                                                        16. lower-*.f64N/A

                                                          \[\leadsto \left(\left(a + b\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) \]
                                                        17. lower--.f64N/A

                                                          \[\leadsto \left(\left(a + b\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) \]
                                                        18. lower-*.f6482.0

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

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

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

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

                                                          \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\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)} \cdot 2\right)\right)\right) \cdot 1 \]
                                                        3. Step-by-step derivation
                                                          1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 16: 62.4% accurate, 16.8× speedup?

                                                      \[\begin{array}{l} b_m = \left|b\right| \\ \left(\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\right) \end{array} \]
                                                      b_m = (fabs.f64 b)
                                                      (FPCore (a b_m angle)
                                                       :precision binary64
                                                       (* (* (* (* 0.011111111111111112 PI) angle) (- b_m a)) (+ a b_m)))
                                                      b_m = fabs(b);
                                                      double code(double a, double b_m, double angle) {
                                                      	return (((0.011111111111111112 * ((double) M_PI)) * angle) * (b_m - a)) * (a + b_m);
                                                      }
                                                      
                                                      b_m = Math.abs(b);
                                                      public static double code(double a, double b_m, double angle) {
                                                      	return (((0.011111111111111112 * Math.PI) * angle) * (b_m - a)) * (a + b_m);
                                                      }
                                                      
                                                      b_m = math.fabs(b)
                                                      def code(a, b_m, angle):
                                                      	return (((0.011111111111111112 * math.pi) * angle) * (b_m - a)) * (a + b_m)
                                                      
                                                      b_m = abs(b)
                                                      function code(a, b_m, angle)
                                                      	return Float64(Float64(Float64(Float64(0.011111111111111112 * pi) * angle) * Float64(b_m - a)) * Float64(a + b_m))
                                                      end
                                                      
                                                      b_m = abs(b);
                                                      function tmp = code(a, b_m, angle)
                                                      	tmp = (((0.011111111111111112 * pi) * angle) * (b_m - a)) * (a + b_m);
                                                      end
                                                      
                                                      b_m = N[Abs[b], $MachinePrecision]
                                                      code[a_, b$95$m_, angle_] := N[(N[(N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]
                                                      
                                                      \begin{array}{l}
                                                      b_m = \left|b\right|
                                                      
                                                      \\
                                                      \left(\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right) \cdot \left(b\_m - a\right)\right) \cdot \left(a + b\_m\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. lower-*.f64N/A

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

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

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

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

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

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

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

                                                          \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\right)} \]
                                                        2. Final simplification62.9%

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

                                                        Alternative 17: 38.6% accurate, 21.6× speedup?

                                                        \[\begin{array}{l} b_m = \left|b\right| \\ \left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\right) \end{array} \]
                                                        b_m = (fabs.f64 b)
                                                        (FPCore (a b_m angle)
                                                         :precision binary64
                                                         (* (* (* -0.011111111111111112 a) angle) (* PI a)))
                                                        b_m = fabs(b);
                                                        double code(double a, double b_m, double angle) {
                                                        	return ((-0.011111111111111112 * a) * angle) * (((double) M_PI) * a);
                                                        }
                                                        
                                                        b_m = Math.abs(b);
                                                        public static double code(double a, double b_m, double angle) {
                                                        	return ((-0.011111111111111112 * a) * angle) * (Math.PI * a);
                                                        }
                                                        
                                                        b_m = math.fabs(b)
                                                        def code(a, b_m, angle):
                                                        	return ((-0.011111111111111112 * a) * angle) * (math.pi * a)
                                                        
                                                        b_m = abs(b)
                                                        function code(a, b_m, angle)
                                                        	return Float64(Float64(Float64(-0.011111111111111112 * a) * angle) * Float64(pi * a))
                                                        end
                                                        
                                                        b_m = abs(b);
                                                        function tmp = code(a, b_m, angle)
                                                        	tmp = ((-0.011111111111111112 * a) * angle) * (pi * a);
                                                        end
                                                        
                                                        b_m = N[Abs[b], $MachinePrecision]
                                                        code[a_, b$95$m_, angle_] := N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * a), $MachinePrecision]), $MachinePrecision]
                                                        
                                                        \begin{array}{l}
                                                        b_m = \left|b\right|
                                                        
                                                        \\
                                                        \left(\left(-0.011111111111111112 \cdot a\right) \cdot angle\right) \cdot \left(\pi \cdot a\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. lower-*.f64N/A

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

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

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

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

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

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

                                                            \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\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(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                        6. Taylor expanded in b around 0

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

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

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

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

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

                                                              Alternative 18: 38.6% accurate, 21.6× speedup?

                                                              \[\begin{array}{l} b_m = \left|b\right| \\ \left(\left(\pi \cdot angle\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right) \end{array} \]
                                                              b_m = (fabs.f64 b)
                                                              (FPCore (a b_m angle)
                                                               :precision binary64
                                                               (* (* (* PI angle) a) (* -0.011111111111111112 a)))
                                                              b_m = fabs(b);
                                                              double code(double a, double b_m, double angle) {
                                                              	return ((((double) M_PI) * angle) * a) * (-0.011111111111111112 * a);
                                                              }
                                                              
                                                              b_m = Math.abs(b);
                                                              public static double code(double a, double b_m, double angle) {
                                                              	return ((Math.PI * angle) * a) * (-0.011111111111111112 * a);
                                                              }
                                                              
                                                              b_m = math.fabs(b)
                                                              def code(a, b_m, angle):
                                                              	return ((math.pi * angle) * a) * (-0.011111111111111112 * a)
                                                              
                                                              b_m = abs(b)
                                                              function code(a, b_m, angle)
                                                              	return Float64(Float64(Float64(pi * angle) * a) * Float64(-0.011111111111111112 * a))
                                                              end
                                                              
                                                              b_m = abs(b);
                                                              function tmp = code(a, b_m, angle)
                                                              	tmp = ((pi * angle) * a) * (-0.011111111111111112 * a);
                                                              end
                                                              
                                                              b_m = N[Abs[b], $MachinePrecision]
                                                              code[a_, b$95$m_, angle_] := N[(N[(N[(Pi * angle), $MachinePrecision] * a), $MachinePrecision] * N[(-0.011111111111111112 * a), $MachinePrecision]), $MachinePrecision]
                                                              
                                                              \begin{array}{l}
                                                              b_m = \left|b\right|
                                                              
                                                              \\
                                                              \left(\left(\pi \cdot angle\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\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. lower-*.f64N/A

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

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

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

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

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

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

                                                                  \[\leadsto \left(angle \cdot \left(0.011111111111111112 \cdot \pi\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(0.011111111111111112 \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
                                                              6. Taylor expanded in b around 0

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

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

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

                                                                    \[\leadsto \left(\left(\pi \cdot angle\right) \cdot a\right) \cdot \left(-0.011111111111111112 \cdot a\right) \]
                                                                  3. 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)))))