ab-angle->ABCF B

Percentage Accurate: 53.9% → 66.5%
Time: 18.7s
Alternatives: 20
Speedup: 13.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 53.9% accurate, 1.0× speedup?

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

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

Alternative 1: 66.5% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 8.5 \cdot 10^{+57}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \frac{\pi}{\frac{1}{angle}}\right)\right)\right)\right) \cdot \cos \left(\frac{\pi \cdot angle}{180}\right)\\

\mathbf{elif}\;a\_m \leq 6.8 \cdot 10^{+224}:\\
\;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \left(\sqrt{\pi} \cdot \sqrt{\pi}\right)\right)\\

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


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

    1. Initial program 56.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-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites67.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.5000000000000001e57 < a < 6.8000000000000004e224

    1. Initial program 31.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-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites48.8%

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

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

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

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

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

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

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

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

    if 6.8000000000000004e224 < a

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.3% accurate, 0.4× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\right)\\ t_1 := \pi \cdot \frac{angle}{180}\\ t_2 := \cos t\_1 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_1\right)\\ t_3 := \left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot t\_0\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+256}:\\ \;\;\;\;\sin t\_0 \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (let* ((t_0 (* 0.011111111111111112 (* PI angle)))
        (t_1 (* PI (/ angle 180.0)))
        (t_2 (* (cos t_1) (* (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) (sin t_1))))
        (t_3 (* (- b a_m) (* (+ a_m b) t_0))))
   (if (<= t_2 (- INFINITY))
     t_3
     (if (<= t_2 5e+256) (* (sin t_0) (* (+ a_m b) (- b a_m))) t_3))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double t_0 = 0.011111111111111112 * (((double) M_PI) * angle);
	double t_1 = ((double) M_PI) * (angle / 180.0);
	double t_2 = cos(t_1) * ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) * sin(t_1));
	double t_3 = (b - a_m) * ((a_m + b) * t_0);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_3;
	} else if (t_2 <= 5e+256) {
		tmp = sin(t_0) * ((a_m + b) * (b - a_m));
	} else {
		tmp = t_3;
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double t_0 = 0.011111111111111112 * (Math.PI * angle);
	double t_1 = Math.PI * (angle / 180.0);
	double t_2 = Math.cos(t_1) * ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) * Math.sin(t_1));
	double t_3 = (b - a_m) * ((a_m + b) * t_0);
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_3;
	} else if (t_2 <= 5e+256) {
		tmp = Math.sin(t_0) * ((a_m + b) * (b - a_m));
	} else {
		tmp = t_3;
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	t_0 = 0.011111111111111112 * (math.pi * angle)
	t_1 = math.pi * (angle / 180.0)
	t_2 = math.cos(t_1) * ((2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) * math.sin(t_1))
	t_3 = (b - a_m) * ((a_m + b) * t_0)
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_3
	elif t_2 <= 5e+256:
		tmp = math.sin(t_0) * ((a_m + b) * (b - a_m))
	else:
		tmp = t_3
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	t_0 = Float64(0.011111111111111112 * Float64(pi * angle))
	t_1 = Float64(pi * Float64(angle / 180.0))
	t_2 = Float64(cos(t_1) * Float64(Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_1)))
	t_3 = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * t_0))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_3;
	elseif (t_2 <= 5e+256)
		tmp = Float64(sin(t_0) * Float64(Float64(a_m + b) * Float64(b - a_m)));
	else
		tmp = t_3;
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	t_0 = 0.011111111111111112 * (pi * angle);
	t_1 = pi * (angle / 180.0);
	t_2 = cos(t_1) * ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) * sin(t_1));
	t_3 = (b - a_m) * ((a_m + b) * t_0);
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_3;
	elseif (t_2 <= 5e+256)
		tmp = sin(t_0) * ((a_m + b) * (b - a_m));
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$3, If[LessEqual[t$95$2, 5e+256], N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\right)\\
t_1 := \pi \cdot \frac{angle}{180}\\
t_2 := \cos t\_1 \cdot \left(\left(2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\right) \cdot \sin t\_1\right)\\
t_3 := \left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot t\_0\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+256}:\\
\;\;\;\;\sin t\_0 \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_3\\


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

    1. Initial program 41.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

        \[\leadsto \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(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{angle}{180}\right) \]
      10. lift-/.f64N/A

        \[\leadsto \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 \color{blue}{\frac{angle}{180}}\right) \]
      11. lift-*.f64N/A

        \[\leadsto \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 \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      12. lift-cos.f64N/A

        \[\leadsto \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 \color{blue}{\cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)} \]
      13. 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. Applied rewrites58.1%

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

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

Alternative 3: 64.8% accurate, 0.8× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := {b}^{2} - {a\_m}^{2}\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{-131}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+291}:\\ \;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (let* ((t_0 (- (pow b 2.0) (pow a_m 2.0))))
   (if (<= t_0 -2e-131)
     (* (+ a_m b) (* (* angle 0.011111111111111112) (* (- b a_m) PI)))
     (if (<= t_0 5e+291)
       (* (* b b) (sin (* PI (* angle 0.011111111111111112))))
       (* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double t_0 = pow(b, 2.0) - pow(a_m, 2.0);
	double tmp;
	if (t_0 <= -2e-131) {
		tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * ((double) M_PI)));
	} else if (t_0 <= 5e+291) {
		tmp = (b * b) * sin((((double) M_PI) * (angle * 0.011111111111111112)));
	} else {
		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((double) M_PI) * angle)));
	}
	return tmp;
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	double t_0 = Math.pow(b, 2.0) - Math.pow(a_m, 2.0);
	double tmp;
	if (t_0 <= -2e-131) {
		tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * Math.PI));
	} else if (t_0 <= 5e+291) {
		tmp = (b * b) * Math.sin((Math.PI * (angle * 0.011111111111111112)));
	} else {
		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
	}
	return tmp;
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	t_0 = math.pow(b, 2.0) - math.pow(a_m, 2.0)
	tmp = 0
	if t_0 <= -2e-131:
		tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * math.pi))
	elif t_0 <= 5e+291:
		tmp = (b * b) * math.sin((math.pi * (angle * 0.011111111111111112)))
	else:
		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle)))
	return tmp
a_m = abs(a)
function code(a_m, b, angle)
	t_0 = Float64((b ^ 2.0) - (a_m ^ 2.0))
	tmp = 0.0
	if (t_0 <= -2e-131)
		tmp = Float64(Float64(a_m + b) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a_m) * pi)));
	elseif (t_0 <= 5e+291)
		tmp = Float64(Float64(b * b) * sin(Float64(pi * Float64(angle * 0.011111111111111112))));
	else
		tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle))));
	end
	return tmp
end
a_m = abs(a);
function tmp_2 = code(a_m, b, angle)
	t_0 = (b ^ 2.0) - (a_m ^ 2.0);
	tmp = 0.0;
	if (t_0 <= -2e-131)
		tmp = (a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * pi));
	elseif (t_0 <= 5e+291)
		tmp = (b * b) * sin((pi * (angle * 0.011111111111111112)));
	else
		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle)));
	end
	tmp_2 = tmp;
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e-131], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+291], N[(N[(b * b), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|

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

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;\left(b \cdot b\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\

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


\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))) < -2e-131

    1. Initial program 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites57.9%

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

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

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

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

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

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

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

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

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

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

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

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

      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. Applied rewrites13.9%

        \[\leadsto \color{blue}{\frac{\left(0 + \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \cdot \left(2 \cdot \left(\mathsf{fma}\left(b, b \cdot b, a \cdot \left(a \cdot a\right)\right) \cdot \left(b \cdot \left(b \cdot b\right) - a \cdot \left(a \cdot a\right)\right)\right)\right)}{2 \cdot \mathsf{fma}\left(b, b \cdot \left(b \cdot b\right), a \cdot \left(a \cdot \mathsf{fma}\left(a, a, b \cdot b\right)\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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

      if 5.0000000000000001e291 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

      1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 66.3% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.0000000000000002e160 < (pow.f64 a #s(literal 2 binary64))

      1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 66.3% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites66.7%

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

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

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

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

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

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

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

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

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

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

      if 5.0000000000000002e160 < (pow.f64 a #s(literal 2 binary64))

      1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 66.5% accurate, 1.5× speedup?

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

      1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.50000000000000011e202 < a

      1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 66.5% accurate, 1.5× speedup?

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

      1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.9999999999999999e202 < a

      1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 66.7% accurate, 1.6× speedup?

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

      1. Initial program 52.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-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites64.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.2e186 < a

      1. Initial program 25.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 66.4% accurate, 1.7× speedup?

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

      1. Initial program 54.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-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.79999999999999984e80 < a

      1. Initial program 29.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 65.6% accurate, 2.0× speedup?

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

      1. Initial program 58.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. Applied rewrites77.3%

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

      if 4e21 < (/.f64 angle #s(literal 180 binary64)) < 1.49999999999999997e208

      1. Initial program 30.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-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites29.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 29.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-pow.f64N/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites30.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \cdot \cos \left(\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. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)}\right) \cdot \cos \left(\left(\sqrt{\pi \cdot \sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right) \cdot \frac{angle}{180}\right) \]
    3. Recombined 3 regimes into one program.
    4. Final simplification64.9%

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

    Alternative 11: 58.0% accurate, 2.0× speedup?

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

      1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 58.0% accurate, 3.4× speedup?

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

      1. Initial program 52.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-pow.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        9. lift-sin.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        10. associate-*l/N/A

          \[\leadsto \left(\color{blue}{\left(\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}} \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) \]
        11. flip--N/A

          \[\leadsto \left(\left(\color{blue}{\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) \]
        12. lift--.f64N/A

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites59.8%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        2. difference-of-squaresN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)}\right)\right) \]
        3. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{{b}^{2}} - a \cdot a\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
        8. lower-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
        11. difference-of-squaresN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        13. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        14. lower-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        15. lower--.f6451.1

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
      7. Applied rewrites51.1%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]

      if 2.00000000000000012e290 < (pow.f64 b #s(literal 2 binary64))

      1. Initial program 45.5%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
        3. *-commutativeN/A

          \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. associate-*r*N/A

          \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        11. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
        12. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        14. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        15. lower-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        16. lower--.f6456.8

          \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      5. Applied rewrites56.8%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      6. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
        4. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
        5. lower-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
        7. lower-*.f6453.8

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      8. Applied rewrites53.8%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
      9. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b \cdot b\right)\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right)}\right) \]
        3. associate-*r*N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right) \cdot b\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right) \cdot b\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right)} \cdot b\right) \]
        6. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
        7. lower-*.f6471.4

          \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \pi\right)}\right) \cdot b\right) \]
      10. Applied rewrites71.4%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(b \cdot \pi\right)\right) \cdot b\right)} \]
      11. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot b\right) \]
        2. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot b\right) \]
        4. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)} \]
        5. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right) \cdot \frac{1}{90}} \]
        6. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)} \cdot \frac{1}{90} \]
        7. associate-*l*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot \frac{1}{90}\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot \frac{1}{90}\right)} \]
        9. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        10. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(b \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        11. lift-*.f64N/A

          \[\leadsto \left(\color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \left(b \cdot \frac{1}{90}\right) \]
        12. associate-*l*N/A

          \[\leadsto \color{blue}{\left(b \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        13. lift-*.f64N/A

          \[\leadsto \left(b \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right) \cdot \left(b \cdot \frac{1}{90}\right) \]
        14. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(b \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        15. lower-*.f6471.5

          \[\leadsto \left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \color{blue}{\left(b \cdot 0.011111111111111112\right)} \]
      12. Applied rewrites71.5%

        \[\leadsto \color{blue}{\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot 0.011111111111111112\right)} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 13: 66.9% accurate, 3.4× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\right)\\ \mathbf{if}\;a\_m \leq 2.5 \cdot 10^{+166}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot t\_0\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (let* ((t_0 (* 0.011111111111111112 (* PI angle))))
       (if (<= a_m 2.5e+166)
         (* (+ a_m b) (* (- b a_m) (sin t_0)))
         (* (- b a_m) (* (+ a_m b) t_0)))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double t_0 = 0.011111111111111112 * (((double) M_PI) * angle);
    	double tmp;
    	if (a_m <= 2.5e+166) {
    		tmp = (a_m + b) * ((b - a_m) * sin(t_0));
    	} else {
    		tmp = (b - a_m) * ((a_m + b) * t_0);
    	}
    	return tmp;
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	double t_0 = 0.011111111111111112 * (Math.PI * angle);
    	double tmp;
    	if (a_m <= 2.5e+166) {
    		tmp = (a_m + b) * ((b - a_m) * Math.sin(t_0));
    	} else {
    		tmp = (b - a_m) * ((a_m + b) * t_0);
    	}
    	return tmp;
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	t_0 = 0.011111111111111112 * (math.pi * angle)
    	tmp = 0
    	if a_m <= 2.5e+166:
    		tmp = (a_m + b) * ((b - a_m) * math.sin(t_0))
    	else:
    		tmp = (b - a_m) * ((a_m + b) * t_0)
    	return tmp
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	t_0 = Float64(0.011111111111111112 * Float64(pi * angle))
    	tmp = 0.0
    	if (a_m <= 2.5e+166)
    		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(t_0)));
    	else
    		tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * t_0));
    	end
    	return tmp
    end
    
    a_m = abs(a);
    function tmp_2 = code(a_m, b, angle)
    	t_0 = 0.011111111111111112 * (pi * angle);
    	tmp = 0.0;
    	if (a_m <= 2.5e+166)
    		tmp = (a_m + b) * ((b - a_m) * sin(t_0));
    	else
    		tmp = (b - a_m) * ((a_m + b) * t_0);
    	end
    	tmp_2 = tmp;
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a$95$m, 2.5e+166], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    t_0 := 0.011111111111111112 \cdot \left(\pi \cdot angle\right)\\
    \mathbf{if}\;a\_m \leq 2.5 \cdot 10^{+166}:\\
    \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin t\_0\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot t\_0\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 2.5000000000000001e166

      1. Initial program 53.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. Applied rewrites63.6%

        \[\leadsto \color{blue}{\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]

      if 2.5000000000000001e166 < a

      1. Initial program 24.6%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
        3. *-commutativeN/A

          \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. associate-*r*N/A

          \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        11. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
        12. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        14. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        15. lower-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        16. lower--.f6463.3

          \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      5. Applied rewrites63.3%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      6. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        4. lift-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        5. lift--.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        6. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)} \]
        7. *-commutativeN/A

          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right)} \]
        9. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)\right)} \]
        10. lower-*.f6488.3

          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)} \]
        11. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}\right) \]
        12. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right)\right) \]
        13. associate-*r*N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}\right) \]
        14. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
        15. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right) \]
        17. lower-*.f6488.3

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)}\right) \]
      7. Applied rewrites88.3%

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification66.1%

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.5 \cdot 10^{+166}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 14: 62.1% accurate, 5.2× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(a\_m + b\right) \cdot \left(b - a\_m\right)\\ t_1 := \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\ \mathbf{if}\;\frac{angle}{180} \leq 0.5:\\ \;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right) \cdot t\_1\\ \mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(t\_0 \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (let* ((t_0 (* (+ a_m b) (- b a_m)))
            (t_1 (fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0)))
       (if (<= (/ angle 180.0) 0.5)
         (* (* (+ a_m b) (* (* angle 0.011111111111111112) (* (- b a_m) PI))) t_1)
         (if (<= (/ angle 180.0) 1.5e+208)
           (* 0.011111111111111112 (* (* PI angle) t_0))
           (* t_1 (* t_0 (* angle (* PI 0.011111111111111112))))))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double t_0 = (a_m + b) * (b - a_m);
    	double t_1 = fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0);
    	double tmp;
    	if ((angle / 180.0) <= 0.5) {
    		tmp = ((a_m + b) * ((angle * 0.011111111111111112) * ((b - a_m) * ((double) M_PI)))) * t_1;
    	} else if ((angle / 180.0) <= 1.5e+208) {
    		tmp = 0.011111111111111112 * ((((double) M_PI) * angle) * t_0);
    	} else {
    		tmp = t_1 * (t_0 * (angle * (((double) M_PI) * 0.011111111111111112)));
    	}
    	return tmp;
    }
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	t_0 = Float64(Float64(a_m + b) * Float64(b - a_m))
    	t_1 = fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0)
    	tmp = 0.0
    	if (Float64(angle / 180.0) <= 0.5)
    		tmp = Float64(Float64(Float64(a_m + b) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a_m) * pi))) * t_1);
    	elseif (Float64(angle / 180.0) <= 1.5e+208)
    		tmp = Float64(0.011111111111111112 * Float64(Float64(pi * angle) * t_0));
    	else
    		tmp = Float64(t_1 * Float64(t_0 * Float64(angle * Float64(pi * 0.011111111111111112))));
    	end
    	return tmp
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 0.5], N[(N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1.5e+208], N[(0.011111111111111112 * N[(N[(Pi * angle), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$0 * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    t_0 := \left(a\_m + b\right) \cdot \left(b - a\_m\right)\\
    t_1 := \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\
    \mathbf{if}\;\frac{angle}{180} \leq 0.5:\\
    \;\;\;\;\left(\left(a\_m + b\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right) \cdot t\_1\\
    
    \mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot t\_0\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1 \cdot \left(t\_0 \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 angle #s(literal 180 binary64)) < 0.5

      1. Initial program 59.5%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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-pow.f64N/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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. flip--N/A

          \[\leadsto \left(\left(2 \cdot \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}}\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. associate-*r/N/A

          \[\leadsto \left(\color{blue}{\frac{2 \cdot \left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right)}{{b}^{2} + {a}^{2}}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(\frac{\color{blue}{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}}{{b}^{2} + {a}^{2}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. lift-PI.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        7. lift-/.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{angle}{180}}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        8. lift-*.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        9. lift-sin.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        10. associate-*l/N/A

          \[\leadsto \left(\color{blue}{\left(\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}} \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) \]
        11. flip--N/A

          \[\leadsto \left(\left(\color{blue}{\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) \]
        12. lift--.f64N/A

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites78.8%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. Taylor expanded in angle around 0

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        3. lower-*.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. lower-PI.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b - a\right)\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. lower--.f6474.8

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      7. Applied rewrites74.8%

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. Taylor expanded in angle around 0

        \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
      9. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \color{blue}{\left(\frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\right)} \]
        2. associate-*r*N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \left(\color{blue}{\left(\frac{-1}{64800} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
        3. lower-fma.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{64800} \cdot {angle}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{-1}{64800} \cdot {angle}^{2}}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        5. unpow2N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        6. lower-*.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        7. unpow2N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
        9. lower-PI.f64N/A

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
        10. lower-PI.f6472.9

          \[\leadsto \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \color{blue}{\pi}, 1\right) \]
      10. Applied rewrites72.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)} \]

      if 0.5 < (/.f64 angle #s(literal 180 binary64)) < 1.49999999999999997e208

      1. Initial program 29.8%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
        3. *-commutativeN/A

          \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. associate-*r*N/A

          \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        11. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
        12. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        14. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        15. lower-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        16. lower--.f6432.4

          \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      5. Applied rewrites32.4%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      6. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        4. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
        5. pow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{{b}^{2}} - a \cdot a\right) \]
        6. lift-pow.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{{b}^{2}} - a \cdot a\right) \]
        7. pow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right) \]
        8. lift-pow.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right) \]
        9. lift--.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
        10. *-commutativeN/A

          \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \]
        11. lift-*.f64N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \]
        12. lift-*.f64N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \]
        13. associate-*r*N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \]
        14. *-commutativeN/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
        15. lift-*.f64N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
        16. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \frac{1}{90}} \]
        17. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \frac{1}{90}} \]
      7. Applied rewrites32.4%

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot angle\right)\right) \cdot 0.011111111111111112} \]

      if 1.49999999999999997e208 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 29.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}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        3. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. associate-*r*N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        7. lower-*.f64N/A

          \[\leadsto \left(\color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(\left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        11. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        12. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        14. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        15. lower-+.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        16. lower--.f6420.1

          \[\leadsto \left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. Applied rewrites20.1%

        \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      6. Taylor expanded in angle around 0

        \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(\frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\right)} \]
        2. associate-*r*N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\color{blue}{\left(\frac{-1}{64800} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
        3. lower-fma.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{64800} \cdot {angle}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{-1}{64800} \cdot {angle}^{2}}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        5. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        6. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        7. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
        9. lower-PI.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
        10. lower-PI.f6423.4

          \[\leadsto \left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \color{blue}{\pi}, 1\right) \]
      8. Applied rewrites23.4%

        \[\leadsto \left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification59.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 0.5:\\ \;\;\;\;\left(\left(a + b\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 15: 62.1% accurate, 5.2× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(a\_m + b\right) \cdot \left(b - a\_m\right)\\ \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-54}:\\ \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t\_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right) \cdot \left(t\_0 \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (let* ((t_0 (* (+ a_m b) (- b a_m))))
       (if (<= (/ angle 180.0) 5e-54)
         (* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))
         (if (<= (/ angle 180.0) 1.5e+208)
           (* 0.011111111111111112 (* angle (* PI t_0)))
           (*
            (fma (* -1.54320987654321e-5 (* angle angle)) (* PI PI) 1.0)
            (* t_0 (* angle (* PI 0.011111111111111112))))))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double t_0 = (a_m + b) * (b - a_m);
    	double tmp;
    	if ((angle / 180.0) <= 5e-54) {
    		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((double) M_PI) * angle)));
    	} else if ((angle / 180.0) <= 1.5e+208) {
    		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * t_0));
    	} else {
    		tmp = fma((-1.54320987654321e-5 * (angle * angle)), (((double) M_PI) * ((double) M_PI)), 1.0) * (t_0 * (angle * (((double) M_PI) * 0.011111111111111112)));
    	}
    	return tmp;
    }
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	t_0 = Float64(Float64(a_m + b) * Float64(b - a_m))
    	tmp = 0.0
    	if (Float64(angle / 180.0) <= 5e-54)
    		tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle))));
    	elseif (Float64(angle / 180.0) <= 1.5e+208)
    		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * t_0)));
    	else
    		tmp = Float64(fma(Float64(-1.54320987654321e-5 * Float64(angle * angle)), Float64(pi * pi), 1.0) * Float64(t_0 * Float64(angle * Float64(pi * 0.011111111111111112))));
    	end
    	return tmp
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-54], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1.5e+208], N[(0.011111111111111112 * N[(angle * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-1.54320987654321e-5 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * Pi), $MachinePrecision] + 1.0), $MachinePrecision] * N[(t$95$0 * N[(angle * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    t_0 := \left(a\_m + b\right) \cdot \left(b - a\_m\right)\\
    \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-54}:\\
    \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
    
    \mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot t\_0\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right) \cdot \left(t\_0 \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000015e-54

      1. Initial program 57.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
        3. *-commutativeN/A

          \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. associate-*r*N/A

          \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        11. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
        12. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        14. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        15. lower-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        16. lower--.f6461.7

          \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      5. Applied rewrites61.7%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      6. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        4. lift-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        5. lift--.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        6. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)} \]
        7. *-commutativeN/A

          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right)} \]
        9. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)\right)} \]
        10. lower-*.f6476.1

          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)} \]
        11. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}\right) \]
        12. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right)\right) \]
        13. associate-*r*N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}\right) \]
        14. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
        15. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right) \]
        17. lower-*.f6476.1

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)}\right) \]
      7. Applied rewrites76.1%

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)} \]

      if 5.00000000000000015e-54 < (/.f64 angle #s(literal 180 binary64)) < 1.49999999999999997e208

      1. Initial program 42.2%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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-pow.f64N/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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. flip--N/A

          \[\leadsto \left(\left(2 \cdot \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}}\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. associate-*r/N/A

          \[\leadsto \left(\color{blue}{\frac{2 \cdot \left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right)}{{b}^{2} + {a}^{2}}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(\frac{\color{blue}{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}}{{b}^{2} + {a}^{2}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. lift-PI.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        7. lift-/.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{angle}{180}}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        8. lift-*.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        9. lift-sin.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        10. associate-*l/N/A

          \[\leadsto \left(\color{blue}{\left(\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}} \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) \]
        11. flip--N/A

          \[\leadsto \left(\left(\color{blue}{\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) \]
        12. lift--.f64N/A

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites42.3%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        2. difference-of-squaresN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)}\right)\right) \]
        3. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{{b}^{2}} - a \cdot a\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
        8. lower-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
        11. difference-of-squaresN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        13. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        14. lower-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        15. lower--.f6442.7

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
      7. Applied rewrites42.7%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]

      if 1.49999999999999997e208 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 29.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}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        3. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. associate-*r*N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        7. lower-*.f64N/A

          \[\leadsto \left(\color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(\left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        11. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        12. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        14. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        15. lower-+.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        16. lower--.f6420.1

          \[\leadsto \left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. Applied rewrites20.1%

        \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      6. Taylor expanded in angle around 0

        \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(1 + \frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(\frac{-1}{64800} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 1\right)} \]
        2. associate-*r*N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\color{blue}{\left(\frac{-1}{64800} \cdot {angle}^{2}\right) \cdot {\mathsf{PI}\left(\right)}^{2}} + 1\right) \]
        3. lower-fma.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{-1}{64800} \cdot {angle}^{2}, {\mathsf{PI}\left(\right)}^{2}, 1\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{-1}{64800} \cdot {angle}^{2}}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        5. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        6. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \color{blue}{\left(angle \cdot angle\right)}, {\mathsf{PI}\left(\right)}^{2}, 1\right) \]
        7. unpow2N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)}, 1\right) \]
        9. lower-PI.f64N/A

          \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(\frac{-1}{64800} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right)} \cdot \mathsf{PI}\left(\right), 1\right) \]
        10. lower-PI.f6423.4

          \[\leadsto \left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \color{blue}{\pi}, 1\right) \]
      8. Applied rewrites23.4%

        \[\leadsto \left(\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right)} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification62.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-54}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 1.5 \cdot 10^{+208}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-1.54320987654321 \cdot 10^{-5} \cdot \left(angle \cdot angle\right), \pi \cdot \pi, 1\right) \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 16: 62.7% accurate, 10.3× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-54}:\\ \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (if (<= (/ angle 180.0) 5e-54)
       (* (- b a_m) (* (+ a_m b) (* 0.011111111111111112 (* PI angle))))
       (* 0.011111111111111112 (* angle (* PI (* (+ a_m b) (- b a_m)))))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double tmp;
    	if ((angle / 180.0) <= 5e-54) {
    		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (((double) M_PI) * angle)));
    	} else {
    		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((a_m + b) * (b - a_m))));
    	}
    	return tmp;
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	double tmp;
    	if ((angle / 180.0) <= 5e-54) {
    		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (Math.PI * angle)));
    	} else {
    		tmp = 0.011111111111111112 * (angle * (Math.PI * ((a_m + b) * (b - a_m))));
    	}
    	return tmp;
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	tmp = 0
    	if (angle / 180.0) <= 5e-54:
    		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (math.pi * angle)))
    	else:
    		tmp = 0.011111111111111112 * (angle * (math.pi * ((a_m + b) * (b - a_m))))
    	return tmp
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	tmp = 0.0
    	if (Float64(angle / 180.0) <= 5e-54)
    		tmp = Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(pi * angle))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(a_m + b) * Float64(b - a_m)))));
    	end
    	return tmp
    end
    
    a_m = abs(a);
    function tmp_2 = code(a_m, b, angle)
    	tmp = 0.0;
    	if ((angle / 180.0) <= 5e-54)
    		tmp = (b - a_m) * ((a_m + b) * (0.011111111111111112 * (pi * angle)));
    	else
    		tmp = 0.011111111111111112 * (angle * (pi * ((a_m + b) * (b - a_m))));
    	end
    	tmp_2 = tmp;
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e-54], N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-54}:\\
    \;\;\;\;\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 angle #s(literal 180 binary64)) < 5.00000000000000015e-54

      1. Initial program 57.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
        3. *-commutativeN/A

          \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. associate-*r*N/A

          \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        11. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
        12. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        14. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        15. lower-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        16. lower--.f6461.7

          \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      5. Applied rewrites61.7%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      6. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        4. lift-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        5. lift--.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        6. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)} \]
        7. *-commutativeN/A

          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b + a\right)\right)} \]
        9. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)\right)} \]
        10. lower-*.f6476.1

          \[\leadsto \left(b - a\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)} \]
        11. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)}\right) \]
        12. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right)\right) \]
        13. associate-*r*N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)}\right) \]
        14. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
        15. lift-*.f64N/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right)\right) \]
        16. *-commutativeN/A

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right) \]
        17. lower-*.f6476.1

          \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)}\right) \]
      7. Applied rewrites76.1%

        \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)} \]

      if 5.00000000000000015e-54 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 37.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-pow.f64N/A

          \[\leadsto \left(\left(2 \cdot \left(\color{blue}{{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-pow.f64N/A

          \[\leadsto \left(\left(2 \cdot \left({b}^{2} - \color{blue}{{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. flip--N/A

          \[\leadsto \left(\left(2 \cdot \color{blue}{\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}}}\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        4. associate-*r/N/A

          \[\leadsto \left(\color{blue}{\frac{2 \cdot \left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right)}{{b}^{2} + {a}^{2}}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        5. *-commutativeN/A

          \[\leadsto \left(\frac{\color{blue}{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}}{{b}^{2} + {a}^{2}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        6. lift-PI.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        7. lift-/.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\frac{angle}{180}}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        8. lift-*.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        9. lift-sin.f64N/A

          \[\leadsto \left(\frac{\left({b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}\right) \cdot 2}{{b}^{2} + {a}^{2}} \cdot \color{blue}{\sin \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
        10. associate-*l/N/A

          \[\leadsto \left(\color{blue}{\left(\frac{{b}^{2} \cdot {b}^{2} - {a}^{2} \cdot {a}^{2}}{{b}^{2} + {a}^{2}} \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) \]
        11. flip--N/A

          \[\leadsto \left(\left(\color{blue}{\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) \]
        12. lift--.f64N/A

          \[\leadsto \left(\left(\color{blue}{\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. Applied rewrites37.9%

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        2. difference-of-squaresN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)}\right)\right) \]
        3. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{{b}^{2}} - a \cdot a\right)\right)\right) \]
        4. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
        8. lower-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
        11. difference-of-squaresN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        13. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
        14. lower-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
        15. lower--.f6435.6

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
      7. Applied rewrites35.6%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification62.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{-54}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 17: 56.6% accurate, 13.7× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 2.6 \cdot 10^{+145}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (if (<= b 2.6e+145)
       (* 0.011111111111111112 (* (* PI angle) (* (+ a_m b) (- b a_m))))
       (* (* b (* PI angle)) (* b 0.011111111111111112))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double tmp;
    	if (b <= 2.6e+145) {
    		tmp = 0.011111111111111112 * ((((double) M_PI) * angle) * ((a_m + b) * (b - a_m)));
    	} else {
    		tmp = (b * (((double) M_PI) * angle)) * (b * 0.011111111111111112);
    	}
    	return tmp;
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	double tmp;
    	if (b <= 2.6e+145) {
    		tmp = 0.011111111111111112 * ((Math.PI * angle) * ((a_m + b) * (b - a_m)));
    	} else {
    		tmp = (b * (Math.PI * angle)) * (b * 0.011111111111111112);
    	}
    	return tmp;
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	tmp = 0
    	if b <= 2.6e+145:
    		tmp = 0.011111111111111112 * ((math.pi * angle) * ((a_m + b) * (b - a_m)))
    	else:
    		tmp = (b * (math.pi * angle)) * (b * 0.011111111111111112)
    	return tmp
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	tmp = 0.0
    	if (b <= 2.6e+145)
    		tmp = Float64(0.011111111111111112 * Float64(Float64(pi * angle) * Float64(Float64(a_m + b) * Float64(b - a_m))));
    	else
    		tmp = Float64(Float64(b * Float64(pi * angle)) * Float64(b * 0.011111111111111112));
    	end
    	return tmp
    end
    
    a_m = abs(a);
    function tmp_2 = code(a_m, b, angle)
    	tmp = 0.0;
    	if (b <= 2.6e+145)
    		tmp = 0.011111111111111112 * ((pi * angle) * ((a_m + b) * (b - a_m)));
    	else
    		tmp = (b * (pi * angle)) * (b * 0.011111111111111112);
    	end
    	tmp_2 = tmp;
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := If[LessEqual[b, 2.6e+145], N[(0.011111111111111112 * N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(Pi * angle), $MachinePrecision]), $MachinePrecision] * N[(b * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;b \leq 2.6 \cdot 10^{+145}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot 0.011111111111111112\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if b < 2.60000000000000003e145

      1. Initial program 51.2%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
        3. *-commutativeN/A

          \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. associate-*r*N/A

          \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        11. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
        12. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        14. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        15. lower-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        16. lower--.f6453.8

          \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      5. Applied rewrites53.8%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      6. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        3. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right) \]
        4. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)} \]
        5. pow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{{b}^{2}} - a \cdot a\right) \]
        6. lift-pow.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{{b}^{2}} - a \cdot a\right) \]
        7. pow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right) \]
        8. lift-pow.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right) \]
        9. lift--.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)} \]
        10. *-commutativeN/A

          \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \]
        11. lift-*.f64N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right)} \]
        12. lift-*.f64N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \]
        13. associate-*r*N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \]
        14. *-commutativeN/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
        15. lift-*.f64N/A

          \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \]
        16. associate-*r*N/A

          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \frac{1}{90}} \]
        17. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \frac{1}{90}} \]
      7. Applied rewrites53.9%

        \[\leadsto \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot angle\right)\right) \cdot 0.011111111111111112} \]

      if 2.60000000000000003e145 < b

      1. Initial program 46.2%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Add Preprocessing
      3. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
        3. *-commutativeN/A

          \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. associate-*r*N/A

          \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        5. associate-*r*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
        8. *-commutativeN/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        10. lower-PI.f64N/A

          \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
        11. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
        12. unpow2N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
        13. difference-of-squaresN/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        14. lower-*.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
        15. lower-+.f64N/A

          \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
        16. lower--.f6446.6

          \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
      5. Applied rewrites46.6%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      6. Taylor expanded in b around inf

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        3. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
        4. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
        5. lower-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
        7. lower-*.f6444.1

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      8. Applied rewrites44.1%

        \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
      9. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b \cdot b\right)\right)\right) \]
        2. associate-*r*N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right)}\right) \]
        3. associate-*r*N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right) \cdot b\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right) \cdot b\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right)} \cdot b\right) \]
        6. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
        7. lower-*.f6467.3

          \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \pi\right)}\right) \cdot b\right) \]
      10. Applied rewrites67.3%

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(b \cdot \pi\right)\right) \cdot b\right)} \]
      11. Step-by-step derivation
        1. lift-PI.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right) \cdot b\right) \]
        2. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot b\right) \]
        4. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)} \]
        5. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right) \cdot \frac{1}{90}} \]
        6. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right)} \cdot \frac{1}{90} \]
        7. associate-*l*N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot \frac{1}{90}\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot \frac{1}{90}\right)} \]
        9. lift-*.f64N/A

          \[\leadsto \color{blue}{\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        10. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\left(b \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        11. lift-*.f64N/A

          \[\leadsto \left(\color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot angle\right) \cdot \left(b \cdot \frac{1}{90}\right) \]
        12. associate-*l*N/A

          \[\leadsto \color{blue}{\left(b \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        13. lift-*.f64N/A

          \[\leadsto \left(b \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right) \cdot \left(b \cdot \frac{1}{90}\right) \]
        14. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(b \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)} \cdot \left(b \cdot \frac{1}{90}\right) \]
        15. lower-*.f6467.4

          \[\leadsto \left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \color{blue}{\left(b \cdot 0.011111111111111112\right)} \]
      12. Applied rewrites67.4%

        \[\leadsto \color{blue}{\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot 0.011111111111111112\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification56.0%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.6 \cdot 10^{+145}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot angle\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot \left(\pi \cdot angle\right)\right) \cdot \left(b \cdot 0.011111111111111112\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 18: 38.6% accurate, 21.6× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ 0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right) \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (* 0.011111111111111112 (* (* b PI) (* b angle))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * ((b * ((double) M_PI)) * (b * angle));
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * ((b * Math.PI) * (b * angle));
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	return 0.011111111111111112 * ((b * math.pi) * (b * angle))
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	return Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(b * angle)))
    end
    
    a_m = abs(a);
    function tmp = code(a_m, b, angle)
    	tmp = 0.011111111111111112 * ((b * pi) * (b * angle));
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(b * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 50.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
      3. *-commutativeN/A

        \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      5. associate-*r*N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      8. *-commutativeN/A

        \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. lower-PI.f64N/A

        \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      11. unpow2N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      12. unpow2N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      13. difference-of-squaresN/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      14. lower-*.f64N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      15. lower-+.f64N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      16. lower--.f6452.7

        \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites52.7%

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
      5. lower-PI.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      7. lower-*.f6433.4

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
    8. Applied rewrites33.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
    9. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b \cdot b\right)\right)\right) \]
      2. lift-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      3. lift-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)}\right) \]
      4. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right) \cdot angle\right)} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b \cdot b\right)\right)} \cdot angle\right) \]
      6. lift-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right) \cdot angle\right) \]
      7. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right)} \cdot angle\right) \]
      8. associate-*l*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \left(b \cdot angle\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot \left(b \cdot angle\right)\right)} \]
      10. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(b \cdot angle\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)} \cdot \left(b \cdot angle\right)\right) \]
      12. lower-*.f6437.5

        \[\leadsto 0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \color{blue}{\left(b \cdot angle\right)}\right) \]
    10. Applied rewrites37.5%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(b \cdot \pi\right) \cdot \left(b \cdot angle\right)\right)} \]
    11. Add Preprocessing

    Alternative 19: 38.6% accurate, 21.6× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right) \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (* 0.011111111111111112 (* b (* angle (* b PI)))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (b * (angle * (b * ((double) M_PI))));
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (b * (angle * (b * Math.PI)));
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	return 0.011111111111111112 * (b * (angle * (b * math.pi)))
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	return Float64(0.011111111111111112 * Float64(b * Float64(angle * Float64(b * pi))))
    end
    
    a_m = abs(a);
    function tmp = code(a_m, b, angle)
    	tmp = 0.011111111111111112 * (b * (angle * (b * pi)));
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(b * N[(angle * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 50.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
      3. *-commutativeN/A

        \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      5. associate-*r*N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      8. *-commutativeN/A

        \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. lower-PI.f64N/A

        \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      11. unpow2N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      12. unpow2N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      13. difference-of-squaresN/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      14. lower-*.f64N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      15. lower-+.f64N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      16. lower--.f6452.7

        \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites52.7%

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
      5. lower-PI.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      7. lower-*.f6433.4

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
    8. Applied rewrites33.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
    9. Step-by-step derivation
      1. lift-PI.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(b \cdot b\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot b\right)}\right) \]
      3. associate-*r*N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right) \cdot b\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right) \cdot b\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot b\right)\right)} \cdot b\right) \]
      6. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \mathsf{PI}\left(\right)\right)}\right) \cdot b\right) \]
      7. lower-*.f6437.4

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(b \cdot \pi\right)}\right) \cdot b\right) \]
    10. Applied rewrites37.4%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \left(b \cdot \pi\right)\right) \cdot b\right)} \]
    11. Final simplification37.4%

      \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right) \]
    12. Add Preprocessing

    Alternative 20: 35.2% accurate, 21.6× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right) \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (* 0.011111111111111112 (* angle (* PI (* b b)))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (angle * (Math.PI * (b * b)));
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	return 0.011111111111111112 * (angle * (math.pi * (b * b)))
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b))))
    end
    
    a_m = abs(a);
    function tmp = code(a_m, b, angle)
    	tmp = 0.011111111111111112 * (angle * (pi * (b * b)));
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 50.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \frac{1}{90}} \]
      2. associate-*r*N/A

        \[\leadsto \color{blue}{angle \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90}\right)} \]
      3. *-commutativeN/A

        \[\leadsto angle \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
      4. associate-*r*N/A

        \[\leadsto angle \cdot \color{blue}{\left(\left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
      5. associate-*r*N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(angle \cdot \left(\frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right) \]
      8. *-commutativeN/A

        \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      9. lower-*.f64N/A

        \[\leadsto \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)}\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      10. lower-PI.f64N/A

        \[\leadsto \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \frac{1}{90}\right)\right) \cdot \left({b}^{2} - {a}^{2}\right) \]
      11. unpow2N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right) \]
      12. unpow2N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right) \]
      13. difference-of-squaresN/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      14. lower-*.f64N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
      15. lower-+.f64N/A

        \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
      16. lower--.f6452.7

        \[\leadsto \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
    5. Applied rewrites52.7%

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} \]
    6. Taylor expanded in b around inf

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right)}\right) \]
      5. lower-PI.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot {b}^{2}\right)\right) \]
      6. unpow2N/A

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      7. lower-*.f6433.4

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
    8. Applied rewrites33.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
    9. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2024216 
    (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)))))