ab-angle->ABCF B

Percentage Accurate: 53.7% → 67.3%
Time: 7.5s
Alternatives: 23
Speedup: 5.5×

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}

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 23 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.7% accurate, 1.0× speedup?

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

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

Alternative 1: 67.3% accurate, 1.2× speedup?

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

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

\mathbf{elif}\;a\_m \leq 2.75 \cdot 10^{+259}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot angle\right)\right) \cdot \pi\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(a\_m \cdot a\_m\right) \cdot \sin t\_0\right) \cdot \left(\cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot -2\right)\\


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

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6467.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.8500000000000001e150 < a < 2.75000000000000015e259

    1. Initial program 53.7%

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

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

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

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

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
      7. lower-pow.f6450.3

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
    4. Applied rewrites50.3%

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

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

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

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
      6. lower-*.f6450.3

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
      9. unpow2N/A

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
      12. difference-of-squares-revN/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
      13. +-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
      14. lift-+.f64N/A

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
      17. lower-*.f6454.2

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
      18. lift-+.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
      19. +-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
      20. lower-+.f6454.2

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
    6. Applied rewrites54.2%

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot angle\right) \cdot \pi\right) \]
      4. associate-*l*N/A

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

        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
      6. lower-*.f6462.2

        \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
      7. lift-+.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
      8. +-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
      9. lower-+.f6462.2

        \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
    8. Applied rewrites62.2%

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

    if 2.75000000000000015e259 < a

    1. Initial program 53.7%

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)} \]
      2. cos-fabs-revN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\left|\pi \cdot \frac{angle}{180}\right|\right)} \]
      3. cos-neg-revN/A

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\color{blue}{\frac{\pi \cdot angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      10. fabs-divN/A

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{\left|\pi \cdot angle\right|}{\color{blue}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      12. distribute-neg-frac2N/A

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{\color{blue}{\pi}}{2}\right) \]
      19. mult-flipN/A

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \]
      22. metadata-eval53.0

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{0.5} \cdot \pi\right) \]
    3. Applied rewrites53.0%

      \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right)} \]
    4. Taylor expanded in a around inf

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

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

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

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

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

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

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

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

        \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
    6. Applied rewrites34.4%

      \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556, \left|angle \cdot \pi\right|, 0.5 \cdot \pi\right)\right)\right)\right)} \]
    7. Applied rewrites34.9%

      \[\leadsto \left(\left(a \cdot a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right) \cdot \color{blue}{\left(\cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot -2\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 2: 67.2% accurate, 0.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\right) \cdot \sin t\_0\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 4.2000000000000001e125

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6467.3

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(\pi \cdot angle\right)\right) + \sin \left(\frac{1}{180} \cdot \left(\pi \cdot angle\right)\right)\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. add-flipN/A

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(\pi \cdot angle\right)\right) - \left(\mathsf{neg}\left(\sin \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\frac{1}{180}}\right)\right)\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000001e125 < angle

    1. Initial program 53.7%

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)} \]
      2. cos-fabs-revN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\left|\pi \cdot \frac{angle}{180}\right|\right)} \]
      3. cos-neg-revN/A

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\color{blue}{\frac{\pi \cdot angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      10. fabs-divN/A

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{\left|\pi \cdot angle\right|}{\color{blue}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      12. distribute-neg-frac2N/A

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{\color{blue}{\pi}}{2}\right) \]
      19. mult-flipN/A

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \]
      22. metadata-eval53.0

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{0.5} \cdot \pi\right) \]
    3. Applied rewrites53.0%

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{1}{2} \cdot \pi\right) \]
      6. difference-of-squares-revN/A

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{1}{2} \cdot \pi\right) \]
      11. lower-*.f6456.8

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{1}{2} \cdot \pi\right) \]
      14. lower-+.f6456.8

        \[\leadsto \left(\left(2 \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right) \]
    5. Applied rewrites56.8%

      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 67.2% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\right) \cdot \sin t\_0\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 4.2000000000000001e125

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6467.3

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

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

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

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

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

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

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

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

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

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

    if 4.2000000000000001e125 < angle

    1. Initial program 53.7%

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)} \]
      2. cos-fabs-revN/A

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\left|\pi \cdot \frac{angle}{180}\right|\right)} \]
      3. cos-neg-revN/A

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\color{blue}{\frac{\pi \cdot angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      10. fabs-divN/A

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{\left|\pi \cdot angle\right|}{\color{blue}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
      12. distribute-neg-frac2N/A

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{\color{blue}{\pi}}{2}\right) \]
      19. mult-flipN/A

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

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

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \]
      22. metadata-eval53.0

        \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{0.5} \cdot \pi\right) \]
    3. Applied rewrites53.0%

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{1}{2} \cdot \pi\right) \]
      6. difference-of-squares-revN/A

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{1}{2} \cdot \pi\right) \]
      11. lower-*.f6456.8

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{1}{2} \cdot \pi\right) \]
      14. lower-+.f6456.8

        \[\leadsto \left(\left(2 \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right) \]
    5. Applied rewrites56.8%

      \[\leadsto \left(\left(2 \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right) \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 67.2% accurate, 1.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.2e229

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e229 < a

    1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. lower-*.f6467.3

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 67.0% accurate, 1.4× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;a\_m \leq 1.16 \cdot 10^{+229}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\left(\left(angle \cdot {\pi}^{0.6666666666666666}\right) \cdot \sqrt[3]{\pi}\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\_m\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\right) \cdot 1\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (if (<= a_m 1.16e+229)
       (*
        (+ a_m b)
        (*
         (- b a_m)
         (sin
          (*
           (* (* angle (pow PI 0.6666666666666666)) (cbrt PI))
           0.011111111111111112))))
       (*
        (*
         (+ b a_m)
         (* (- b a_m) (* 2.0 (sin (* 0.005555555555555556 (* PI angle))))))
        1.0)))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double tmp;
    	if (a_m <= 1.16e+229) {
    		tmp = (a_m + b) * ((b - a_m) * sin((((angle * pow(((double) M_PI), 0.6666666666666666)) * cbrt(((double) M_PI))) * 0.011111111111111112)));
    	} else {
    		tmp = ((b + a_m) * ((b - a_m) * (2.0 * sin((0.005555555555555556 * (((double) M_PI) * angle)))))) * 1.0;
    	}
    	return tmp;
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	double tmp;
    	if (a_m <= 1.16e+229) {
    		tmp = (a_m + b) * ((b - a_m) * Math.sin((((angle * Math.pow(Math.PI, 0.6666666666666666)) * Math.cbrt(Math.PI)) * 0.011111111111111112)));
    	} else {
    		tmp = ((b + a_m) * ((b - a_m) * (2.0 * Math.sin((0.005555555555555556 * (Math.PI * angle)))))) * 1.0;
    	}
    	return tmp;
    }
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	tmp = 0.0
    	if (a_m <= 1.16e+229)
    		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(Float64(Float64(angle * (pi ^ 0.6666666666666666)) * cbrt(pi)) * 0.011111111111111112))));
    	else
    		tmp = Float64(Float64(Float64(b + a_m) * Float64(Float64(b - a_m) * Float64(2.0 * sin(Float64(0.005555555555555556 * Float64(pi * angle)))))) * 1.0);
    	end
    	return tmp
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := If[LessEqual[a$95$m, 1.16e+229], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(N[(N[(angle * N[Power[Pi, 0.6666666666666666], $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(2.0 * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1.0), $MachinePrecision]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;a\_m \leq 1.16 \cdot 10^{+229}:\\
    \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\left(\left(angle \cdot {\pi}^{0.6666666666666666}\right) \cdot \sqrt[3]{\pi}\right) \cdot 0.011111111111111112\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(b + a\_m\right) \cdot \left(\left(b - a\_m\right) \cdot \left(2 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\right) \cdot 1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if a < 1.16000000000000001e229

      1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(angle \cdot {\pi}^{\frac{2}{3}}\right) \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \frac{1}{90}\right)\right) \]
        15. lower-cbrt.f6467.1

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

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

      if 1.16000000000000001e229 < a

      1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        11. lower-*.f6467.3

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 67.0% accurate, 2.0× speedup?

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

        1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 5.0000000000000002e206 < a

        1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(b + a\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          11. lower-*.f6467.3

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 67.0% accurate, 2.1× speedup?

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

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(a + b\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)} \]
          5. Step-by-step derivation
            1. lower-*.f64N/A

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

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

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

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

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

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

          if 3.4000000000000001e-43 < angle < 4.3999999999999999e139

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

              \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
            10. count-2N/A

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

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

          if 4.3999999999999999e139 < angle

          1. Initial program 53.7%

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
            7. lower-pow.f6450.3

              \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
          4. Applied rewrites50.3%

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

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
            6. lower-*.f6450.3

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
            12. difference-of-squares-revN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
            13. +-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
            14. lift-+.f64N/A

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            17. lower-*.f6454.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            18. lift-+.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            19. +-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
            20. lower-+.f6454.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
          6. Applied rewrites54.2%

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

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

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

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

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

              \[\leadsto \left(angle \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \pi\right)\right) \cdot \frac{1}{90} \]
            6. associate-*l*N/A

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

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

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

              \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            10. lift-+.f64N/A

              \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            11. lift--.f64N/A

              \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            12. difference-of-squares-revN/A

              \[\leadsto angle \cdot \left(\left(\left(b \cdot b - a \cdot a\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            13. unpow2N/A

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

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - a \cdot a\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            15. unpow2N/A

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

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            17. lift--.f64N/A

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            18. lower-*.f64N/A

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
          8. Applied rewrites54.2%

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

        Alternative 8: 66.7% accurate, 2.2× speedup?

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

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 4.3999999999999999e139 < angle

          1. Initial program 53.7%

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
            7. lower-pow.f6450.3

              \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
          4. Applied rewrites50.3%

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

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
            6. lower-*.f6450.3

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
            12. difference-of-squares-revN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
            13. +-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
            14. lift-+.f64N/A

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            17. lower-*.f6454.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            18. lift-+.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            19. +-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
            20. lower-+.f6454.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
          6. Applied rewrites54.2%

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

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

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

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

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

              \[\leadsto \left(angle \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \pi\right)\right) \cdot \frac{1}{90} \]
            6. associate-*l*N/A

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

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

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

              \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            10. lift-+.f64N/A

              \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            11. lift--.f64N/A

              \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            12. difference-of-squares-revN/A

              \[\leadsto angle \cdot \left(\left(\left(b \cdot b - a \cdot a\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            13. unpow2N/A

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

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - a \cdot a\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            15. unpow2N/A

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

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            17. lift--.f64N/A

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
            18. lower-*.f64N/A

              \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
          8. Applied rewrites54.2%

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

        Alternative 9: 66.3% accurate, 2.2× speedup?

        \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;b \leq 1.06 \cdot 10^{+110}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \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 (<= b 1.06e+110)
           (* (+ a_m b) (* (- b a_m) (sin (* (* 0.011111111111111112 PI) angle))))
           (* (+ a_m b) (* 0.011111111111111112 (* angle (* PI (- b a_m)))))))
        a_m = fabs(a);
        double code(double a_m, double b, double angle) {
        	double tmp;
        	if (b <= 1.06e+110) {
        		tmp = (a_m + b) * ((b - a_m) * sin(((0.011111111111111112 * ((double) M_PI)) * angle)));
        	} else {
        		tmp = (a_m + b) * (0.011111111111111112 * (angle * (((double) M_PI) * (b - a_m))));
        	}
        	return tmp;
        }
        
        a_m = Math.abs(a);
        public static double code(double a_m, double b, double angle) {
        	double tmp;
        	if (b <= 1.06e+110) {
        		tmp = (a_m + b) * ((b - a_m) * Math.sin(((0.011111111111111112 * Math.PI) * angle)));
        	} else {
        		tmp = (a_m + b) * (0.011111111111111112 * (angle * (Math.PI * (b - a_m))));
        	}
        	return tmp;
        }
        
        a_m = math.fabs(a)
        def code(a_m, b, angle):
        	tmp = 0
        	if b <= 1.06e+110:
        		tmp = (a_m + b) * ((b - a_m) * math.sin(((0.011111111111111112 * math.pi) * angle)))
        	else:
        		tmp = (a_m + b) * (0.011111111111111112 * (angle * (math.pi * (b - a_m))))
        	return tmp
        
        a_m = abs(a)
        function code(a_m, b, angle)
        	tmp = 0.0
        	if (b <= 1.06e+110)
        		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(Float64(0.011111111111111112 * pi) * angle))));
        	else
        		tmp = Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b - a_m)))));
        	end
        	return tmp
        end
        
        a_m = abs(a);
        function tmp_2 = code(a_m, b, angle)
        	tmp = 0.0;
        	if (b <= 1.06e+110)
        		tmp = (a_m + b) * ((b - a_m) * sin(((0.011111111111111112 * pi) * angle)));
        	else
        		tmp = (a_m + b) * (0.011111111111111112 * (angle * (pi * (b - a_m))));
        	end
        	tmp_2 = tmp;
        end
        
        a_m = N[Abs[a], $MachinePrecision]
        code[a$95$m_, b_, angle_] := If[LessEqual[b, 1.06e+110], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(N[(0.011111111111111112 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        a_m = \left|a\right|
        
        \\
        \begin{array}{l}
        \mathbf{if}\;b \leq 1.06 \cdot 10^{+110}:\\
        \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if b < 1.06000000000000005e110

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.06000000000000005e110 < b

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(a + b\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)} \]
          5. Step-by-step derivation
            1. lower-*.f64N/A

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

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

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

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

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

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

        Alternative 10: 64.8% accurate, 2.2× speedup?

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

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 5.7999999999999998e200 < a

          1. Initial program 53.7%

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
            7. lower-pow.f6450.3

              \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
          4. Applied rewrites50.3%

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

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
            6. lower-*.f6450.3

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
            9. unpow2N/A

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
            12. difference-of-squares-revN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
            13. +-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
            14. lift-+.f64N/A

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

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            17. lower-*.f6454.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            18. lift-+.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
            19. +-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
            20. lower-+.f6454.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
          6. Applied rewrites54.2%

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
            2. *-commutativeN/A

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot angle\right) \cdot \pi\right) \]
            4. associate-*l*N/A

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

              \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
            6. lower-*.f6462.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
            7. lift-+.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
            8. +-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
            9. lower-+.f6462.2

              \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
          8. Applied rewrites62.2%

            \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 11: 64.2% accurate, 2.3× speedup?

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

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(a + b\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)} \]
          5. Step-by-step derivation
            1. lower-*.f64N/A

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

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

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

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

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

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

          if 2.3999999999999999e51 < angle < 9.20000000000000063e118

          1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
          5. Step-by-step derivation
            1. Applied rewrites42.3%

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

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

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

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

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

                \[\leadsto b \cdot \left(b \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
              5. lower-PI.f6441.0

                \[\leadsto b \cdot \left(b \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right) \]
            4. Applied rewrites41.0%

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

            if 9.20000000000000063e118 < angle

            1. Initial program 53.7%

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

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

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

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

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
              7. lower-pow.f6450.3

                \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
            4. Applied rewrites50.3%

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

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

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

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

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
              6. lower-*.f6450.3

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

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
              9. unpow2N/A

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

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
              12. difference-of-squares-revN/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
              13. +-commutativeN/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
              14. lift-+.f64N/A

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

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

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
              17. lower-*.f6454.2

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
              18. lift-+.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
              19. +-commutativeN/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              20. lower-+.f6454.2

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
            6. Applied rewrites54.2%

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

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

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

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

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

                \[\leadsto \left(angle \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \pi\right)\right) \cdot \frac{1}{90} \]
              6. associate-*l*N/A

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

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

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

                \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
              10. lift-+.f64N/A

                \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
              11. lift--.f64N/A

                \[\leadsto angle \cdot \left(\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
              12. difference-of-squares-revN/A

                \[\leadsto angle \cdot \left(\left(\left(b \cdot b - a \cdot a\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
              13. unpow2N/A

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

                \[\leadsto angle \cdot \left(\left(\left({b}^{2} - a \cdot a\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
              15. unpow2N/A

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

                \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
              17. lift--.f64N/A

                \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \frac{1}{90}\right) \]
              18. lower-*.f64N/A

                \[\leadsto angle \cdot \left(\left(\left({b}^{2} - {a}^{2}\right) \cdot \pi\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
            8. Applied rewrites54.2%

              \[\leadsto angle \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \pi\right)\right) \cdot 0.011111111111111112\right)} \]
          6. Recombined 3 regimes into one program.
          7. Add Preprocessing

          Alternative 12: 63.0% accurate, 2.4× speedup?

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

            1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
            5. Step-by-step derivation
              1. Applied rewrites42.3%

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

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

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

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

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

                  \[\leadsto b \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right)}\right) \]
                6. lower-*.f6442.7

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

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

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

                  \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \sin \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right)\right) \cdot b} \]
                3. lower-*.f6442.7

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

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

                  \[\leadsto \color{blue}{\left(\sin \left(\left(\frac{1}{90} \cdot angle\right) \cdot \pi\right) \cdot \left(b - a\right)\right)} \cdot b \]
                6. lower-*.f6442.7

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

                  \[\leadsto \left(\sin \left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot b \]
              5. Applied rewrites42.7%

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

              if 4.50000000000000016e-84 < a

              1. Initial program 53.7%

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

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

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

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

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

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

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

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

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

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

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

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

                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \pi \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \pi \]
                7. associate-*r*N/A

                  \[\leadsto \left(\frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\right) \cdot \pi \]
                8. associate-*r*N/A

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

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

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                11. lower-*.f6462.3

                  \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                12. lift-+.f64N/A

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                13. +-commutativeN/A

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \pi \]
                14. lower-+.f6462.3

                  \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \pi \]
              8. Applied rewrites62.3%

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

            Alternative 13: 62.9% accurate, 5.3× speedup?

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

              1. Initial program 53.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(a + b\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)} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

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

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

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

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

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

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

              if 3.0999999999999998e-47 < angle

              1. Initial program 53.7%

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

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

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

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

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

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

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                2. *-commutativeN/A

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

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                5. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                6. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - a \cdot a\right)\right) \cdot \pi\right) \]
                7. lift-pow.f64N/A

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                10. sub-flipN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} + \left(\mathsf{neg}\left({a}^{2}\right)\right)\right)\right) \cdot \pi\right) \]
                11. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(\mathsf{neg}\left({a}^{2}\right)\right) + {b}^{2}\right)\right) \cdot \pi\right) \]
                12. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(\mathsf{neg}\left({a}^{2}\right)\right) + {b}^{2}\right)\right) \cdot \pi\right) \]
                13. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(\mathsf{neg}\left(a \cdot a\right)\right) + {b}^{2}\right)\right) \cdot \pi\right) \]
                14. distribute-lft-neg-inN/A

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

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{fma}\left(\mathsf{neg}\left(a\right), a, {b}^{2}\right)\right) \cdot \pi\right) \]
                16. lower-neg.f6453.1

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \mathsf{fma}\left(-a, a, {b}^{2}\right)\right) \cdot \pi\right) \]
                17. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{fma}\left(-a, a, {b}^{2}\right)\right) \cdot \pi\right) \]
                18. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \pi\right) \]
                19. lower-*.f6453.1

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \pi\right) \]
              8. Applied rewrites53.1%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right) \cdot \pi\right) \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 14: 62.9% accurate, 5.3× speedup?

            \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 6.3 \cdot 10^{-52}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-a\_m, a\_m, b \cdot b\right)\right)\right)\\ \end{array} \end{array} \]
            a_m = (fabs.f64 a)
            (FPCore (a_m b angle)
             :precision binary64
             (if (<= angle 6.3e-52)
               (* (+ a_m b) (* 0.011111111111111112 (* angle (* PI (- b a_m)))))
               (* 0.011111111111111112 (* angle (* PI (fma (- a_m) a_m (* b b)))))))
            a_m = fabs(a);
            double code(double a_m, double b, double angle) {
            	double tmp;
            	if (angle <= 6.3e-52) {
            		tmp = (a_m + b) * (0.011111111111111112 * (angle * (((double) M_PI) * (b - a_m))));
            	} else {
            		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * fma(-a_m, a_m, (b * b))));
            	}
            	return tmp;
            }
            
            a_m = abs(a)
            function code(a_m, b, angle)
            	tmp = 0.0
            	if (angle <= 6.3e-52)
            		tmp = Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b - a_m)))));
            	else
            		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * fma(Float64(-a_m), a_m, Float64(b * b)))));
            	end
            	return tmp
            end
            
            a_m = N[Abs[a], $MachinePrecision]
            code[a$95$m_, b_, angle_] := If[LessEqual[angle, 6.3e-52], N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[((-a$95$m) * a$95$m + N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            a_m = \left|a\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;angle \leq 6.3 \cdot 10^{-52}:\\
            \;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-a\_m, a\_m, b \cdot b\right)\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 6.3000000000000003e-52

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                2. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                3. associate-*l*N/A

                  \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                5. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                6. associate-*l*N/A

                  \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                7. lift--.f64N/A

                  \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                9. unpow2N/A

                  \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                11. unpow2N/A

                  \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                12. difference-of-squaresN/A

                  \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                13. lift-sin.f64N/A

                  \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                14. lift-cos.f64N/A

                  \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
              3. Applied rewrites67.0%

                \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
              4. Taylor expanded in angle around 0

                \[\leadsto \left(a + b\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)} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                2. lower-*.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                5. lower--.f6462.3

                  \[\leadsto \left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
              6. Applied rewrites62.3%

                \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]

              if 6.3000000000000003e-52 < angle

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                2. sub-negate-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\mathsf{neg}\left(\left({a}^{2} - {b}^{2}\right)\right)\right)\right)\right) \]
                3. sub-flipN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\mathsf{neg}\left(\left({a}^{2} + \left(\mathsf{neg}\left({b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
                4. distribute-neg-inN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left({a}^{2}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left({b}^{2}\right)\right)\right)\right)}\right)\right)\right) \]
                5. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left({a}^{2}\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{{b}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
                6. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a \cdot a\right)\right) + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\color{blue}{{b}^{2}}\right)\right)\right)\right)\right)\right)\right) \]
                7. distribute-lft-neg-inN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left({b}^{2}\right)\right)}\right)\right)\right)\right)\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left({b}^{2}\right)\right)\right)\right)\right)\right)\right) \]
                9. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(b \cdot b\right)\right)\right)\right)\right)\right)\right) \]
                10. distribute-rgt-neg-inN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + \left(\mathsf{neg}\left(b \cdot \left(\mathsf{neg}\left(b\right)\right)\right)\right)\right)\right)\right) \]
                11. distribute-lft-neg-outN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + \left(\mathsf{neg}\left(b\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(b\right)\right)}\right)\right)\right) \]
                12. sqr-neg-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + b \cdot \color{blue}{b}\right)\right)\right) \]
                13. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + {b}^{\color{blue}{2}}\right)\right)\right) \]
                14. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a + {b}^{\color{blue}{2}}\right)\right)\right) \]
                15. lower-fma.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(\mathsf{neg}\left(a\right), \color{blue}{a}, {b}^{2}\right)\right)\right) \]
                16. lower-neg.f6453.1

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-a, a, {b}^{2}\right)\right)\right) \]
                17. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-a, a, {b}^{2}\right)\right)\right) \]
                18. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right)\right) \]
                19. lower-*.f6453.1

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-a, a, b \cdot b\right)\right)\right) \]
              6. Applied rewrites53.1%

                \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(-a, \color{blue}{a}, b \cdot b\right)\right)\right) \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 15: 62.9% accurate, 5.5× speedup?

            \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 3.4 \cdot 10^{-43}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\\ \end{array} \end{array} \]
            a_m = (fabs.f64 a)
            (FPCore (a_m b angle)
             :precision binary64
             (if (<= angle 3.4e-43)
               (* (+ a_m b) (* 0.011111111111111112 (* angle (* PI (- b a_m)))))
               (* (* (* 0.011111111111111112 angle) PI) (* (- b a_m) (+ b a_m)))))
            a_m = fabs(a);
            double code(double a_m, double b, double angle) {
            	double tmp;
            	if (angle <= 3.4e-43) {
            		tmp = (a_m + b) * (0.011111111111111112 * (angle * (((double) M_PI) * (b - a_m))));
            	} else {
            		tmp = ((0.011111111111111112 * angle) * ((double) M_PI)) * ((b - a_m) * (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 <= 3.4e-43) {
            		tmp = (a_m + b) * (0.011111111111111112 * (angle * (Math.PI * (b - a_m))));
            	} else {
            		tmp = ((0.011111111111111112 * angle) * Math.PI) * ((b - a_m) * (b + a_m));
            	}
            	return tmp;
            }
            
            a_m = math.fabs(a)
            def code(a_m, b, angle):
            	tmp = 0
            	if angle <= 3.4e-43:
            		tmp = (a_m + b) * (0.011111111111111112 * (angle * (math.pi * (b - a_m))))
            	else:
            		tmp = ((0.011111111111111112 * angle) * math.pi) * ((b - a_m) * (b + a_m))
            	return tmp
            
            a_m = abs(a)
            function code(a_m, b, angle)
            	tmp = 0.0
            	if (angle <= 3.4e-43)
            		tmp = Float64(Float64(a_m + b) * Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b - a_m)))));
            	else
            		tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * pi) * Float64(Float64(b - a_m) * 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 <= 3.4e-43)
            		tmp = (a_m + b) * (0.011111111111111112 * (angle * (pi * (b - a_m))));
            	else
            		tmp = ((0.011111111111111112 * angle) * pi) * ((b - a_m) * (b + a_m));
            	end
            	tmp_2 = tmp;
            end
            
            a_m = N[Abs[a], $MachinePrecision]
            code[a$95$m_, b_, angle_] := If[LessEqual[angle, 3.4e-43], N[(N[(a$95$m + b), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(b + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            a_m = \left|a\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;angle \leq 3.4 \cdot 10^{-43}:\\
            \;\;\;\;\left(a\_m + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\_m\right)\right)\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 3.4000000000000001e-43

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                2. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                3. associate-*l*N/A

                  \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                5. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                6. associate-*l*N/A

                  \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                7. lift--.f64N/A

                  \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                9. unpow2N/A

                  \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                11. unpow2N/A

                  \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                12. difference-of-squaresN/A

                  \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                13. lift-sin.f64N/A

                  \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                14. lift-cos.f64N/A

                  \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
              3. Applied rewrites67.0%

                \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
              4. Taylor expanded in angle around 0

                \[\leadsto \left(a + b\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)} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                2. lower-*.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \left(a + b\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                5. lower--.f6462.3

                  \[\leadsto \left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
              6. Applied rewrites62.3%

                \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]

              if 3.4000000000000001e-43 < angle

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Applied rewrites54.2%

                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 16: 62.8% accurate, 5.5× speedup?

            \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 2 \cdot 10^{-64}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\_m\right)\right)\right) \cdot \left(a\_m + b\right)\right) \cdot \pi\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\\ \end{array} \end{array} \]
            a_m = (fabs.f64 a)
            (FPCore (a_m b angle)
             :precision binary64
             (if (<= angle 2e-64)
               (* (* (* 0.011111111111111112 (* angle (- b a_m))) (+ a_m b)) PI)
               (* (* (* 0.011111111111111112 angle) PI) (* (- b a_m) (+ b a_m)))))
            a_m = fabs(a);
            double code(double a_m, double b, double angle) {
            	double tmp;
            	if (angle <= 2e-64) {
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * (a_m + b)) * ((double) M_PI);
            	} else {
            		tmp = ((0.011111111111111112 * angle) * ((double) M_PI)) * ((b - a_m) * (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 <= 2e-64) {
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * (a_m + b)) * Math.PI;
            	} else {
            		tmp = ((0.011111111111111112 * angle) * Math.PI) * ((b - a_m) * (b + a_m));
            	}
            	return tmp;
            }
            
            a_m = math.fabs(a)
            def code(a_m, b, angle):
            	tmp = 0
            	if angle <= 2e-64:
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * (a_m + b)) * math.pi
            	else:
            		tmp = ((0.011111111111111112 * angle) * math.pi) * ((b - a_m) * (b + a_m))
            	return tmp
            
            a_m = abs(a)
            function code(a_m, b, angle)
            	tmp = 0.0
            	if (angle <= 2e-64)
            		tmp = Float64(Float64(Float64(0.011111111111111112 * Float64(angle * Float64(b - a_m))) * Float64(a_m + b)) * pi);
            	else
            		tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * pi) * Float64(Float64(b - a_m) * 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 <= 2e-64)
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * (a_m + b)) * pi;
            	else
            		tmp = ((0.011111111111111112 * angle) * pi) * ((b - a_m) * (b + a_m));
            	end
            	tmp_2 = tmp;
            end
            
            a_m = N[Abs[a], $MachinePrecision]
            code[a$95$m_, b_, angle_] := If[LessEqual[angle, 2e-64], N[(N[(N[(0.011111111111111112 * N[(angle * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(b + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            a_m = \left|a\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;angle \leq 2 \cdot 10^{-64}:\\
            \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\_m\right)\right)\right) \cdot \left(a\_m + b\right)\right) \cdot \pi\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 1.99999999999999993e-64

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                7. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                11. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                15. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                16. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
                3. associate-*r*N/A

                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \color{blue}{\pi} \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \color{blue}{\pi} \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \pi \]
                6. lift-*.f64N/A

                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \pi \]
                7. associate-*r*N/A

                  \[\leadsto \left(\frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(b + a\right)\right)\right) \cdot \pi \]
                8. associate-*r*N/A

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                9. lower-*.f64N/A

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                10. lower-*.f64N/A

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                11. lower-*.f6462.3

                  \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                12. lift-+.f64N/A

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi \]
                13. +-commutativeN/A

                  \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \pi \]
                14. lower-+.f6462.3

                  \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \pi \]
              8. Applied rewrites62.3%

                \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\pi} \]

              if 1.99999999999999993e-64 < angle

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Applied rewrites54.2%

                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 17: 62.8% accurate, 5.5× speedup?

            \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 3.4 \cdot 10^{-43}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot angle\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\\ \end{array} \end{array} \]
            a_m = (fabs.f64 a)
            (FPCore (a_m b angle)
             :precision binary64
             (if (<= angle 3.4e-43)
               (* 0.011111111111111112 (* (* (- b a_m) (* (+ a_m b) angle)) PI))
               (* (* (* 0.011111111111111112 angle) PI) (* (- b a_m) (+ b a_m)))))
            a_m = fabs(a);
            double code(double a_m, double b, double angle) {
            	double tmp;
            	if (angle <= 3.4e-43) {
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * ((double) M_PI));
            	} else {
            		tmp = ((0.011111111111111112 * angle) * ((double) M_PI)) * ((b - a_m) * (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 <= 3.4e-43) {
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * Math.PI);
            	} else {
            		tmp = ((0.011111111111111112 * angle) * Math.PI) * ((b - a_m) * (b + a_m));
            	}
            	return tmp;
            }
            
            a_m = math.fabs(a)
            def code(a_m, b, angle):
            	tmp = 0
            	if angle <= 3.4e-43:
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * math.pi)
            	else:
            		tmp = ((0.011111111111111112 * angle) * math.pi) * ((b - a_m) * (b + a_m))
            	return tmp
            
            a_m = abs(a)
            function code(a_m, b, angle)
            	tmp = 0.0
            	if (angle <= 3.4e-43)
            		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * angle)) * pi));
            	else
            		tmp = Float64(Float64(Float64(0.011111111111111112 * angle) * pi) * Float64(Float64(b - a_m) * 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 <= 3.4e-43)
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * pi);
            	else
            		tmp = ((0.011111111111111112 * angle) * pi) * ((b - a_m) * (b + a_m));
            	end
            	tmp_2 = tmp;
            end
            
            a_m = N[Abs[a], $MachinePrecision]
            code[a$95$m_, b_, angle_] := If[LessEqual[angle, 3.4e-43], N[(0.011111111111111112 * N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * angle), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[(b + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            a_m = \left|a\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;angle \leq 3.4 \cdot 10^{-43}:\\
            \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot angle\right)\right) \cdot \pi\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 3.4000000000000001e-43

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                7. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                11. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                15. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                16. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                2. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot angle\right) \cdot \pi\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot angle\right) \cdot \pi\right) \]
                4. associate-*l*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                6. lower-*.f6462.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                7. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                8. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
                9. lower-+.f6462.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
              8. Applied rewrites62.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]

              if 3.4000000000000001e-43 < angle

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Applied rewrites54.2%

                \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 18: 62.7% accurate, 5.5× speedup?

            \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 3 \cdot 10^{-47}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot angle\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\right) \cdot \pi\right)\\ \end{array} \end{array} \]
            a_m = (fabs.f64 a)
            (FPCore (a_m b angle)
             :precision binary64
             (if (<= angle 3e-47)
               (* 0.011111111111111112 (* (* (- b a_m) (* (+ a_m b) angle)) PI))
               (* 0.011111111111111112 (* (* angle (* (- b a_m) (+ b a_m))) PI))))
            a_m = fabs(a);
            double code(double a_m, double b, double angle) {
            	double tmp;
            	if (angle <= 3e-47) {
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * ((double) M_PI));
            	} else {
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * ((double) M_PI));
            	}
            	return tmp;
            }
            
            a_m = Math.abs(a);
            public static double code(double a_m, double b, double angle) {
            	double tmp;
            	if (angle <= 3e-47) {
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * Math.PI);
            	} else {
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * Math.PI);
            	}
            	return tmp;
            }
            
            a_m = math.fabs(a)
            def code(a_m, b, angle):
            	tmp = 0
            	if angle <= 3e-47:
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * math.pi)
            	else:
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * math.pi)
            	return tmp
            
            a_m = abs(a)
            function code(a_m, b, angle)
            	tmp = 0.0
            	if (angle <= 3e-47)
            		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(b - a_m) * Float64(Float64(a_m + b) * angle)) * pi));
            	else
            		tmp = Float64(0.011111111111111112 * Float64(Float64(angle * Float64(Float64(b - a_m) * Float64(b + a_m))) * pi));
            	end
            	return tmp
            end
            
            a_m = abs(a);
            function tmp_2 = code(a_m, b, angle)
            	tmp = 0.0;
            	if (angle <= 3e-47)
            		tmp = 0.011111111111111112 * (((b - a_m) * ((a_m + b) * angle)) * pi);
            	else
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * pi);
            	end
            	tmp_2 = tmp;
            end
            
            a_m = N[Abs[a], $MachinePrecision]
            code[a$95$m_, b_, angle_] := If[LessEqual[angle, 3e-47], N[(0.011111111111111112 * N[(N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle * N[(N[(b - a$95$m), $MachinePrecision] * N[(b + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            a_m = \left|a\right|
            
            \\
            \begin{array}{l}
            \mathbf{if}\;angle \leq 3 \cdot 10^{-47}:\\
            \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b - a\_m\right) \cdot \left(\left(a\_m + b\right) \cdot angle\right)\right) \cdot \pi\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\right) \cdot \pi\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 3.00000000000000017e-47

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                7. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                11. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                15. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                16. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                2. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot angle\right) \cdot \pi\right) \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot angle\right) \cdot \pi\right) \]
                4. associate-*l*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                6. lower-*.f6462.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                7. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right) \cdot \pi\right) \]
                8. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
                9. lower-+.f6462.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]
              8. Applied rewrites62.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right) \cdot \pi\right) \]

              if 3.00000000000000017e-47 < angle

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                7. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                11. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                15. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                16. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 19: 62.4% accurate, 1.2× speedup?

            \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := 2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\\ \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+162}:\\ \;\;\;\;-2 \cdot \left(\left(0.005555555555555556 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\_m\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+118}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\right) \cdot \pi\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\_m\right)\right)\right) \cdot b\right) \cdot \pi\\ \end{array} \end{array} \]
            a_m = (fabs.f64 a)
            (FPCore (a_m b angle)
             :precision binary64
             (let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a_m 2.0)))))
               (if (<= t_0 -2e+162)
                 (* -2.0 (* (* 0.005555555555555556 (* a_m (* angle PI))) a_m))
                 (if (<= t_0 5e+118)
                   (* 0.011111111111111112 (* (* angle (* (- b a_m) (+ b a_m))) PI))
                   (* (* (* 0.011111111111111112 (* angle (- b a_m))) b) PI)))))
            a_m = fabs(a);
            double code(double a_m, double b, double angle) {
            	double t_0 = 2.0 * (pow(b, 2.0) - pow(a_m, 2.0));
            	double tmp;
            	if (t_0 <= -2e+162) {
            		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * ((double) M_PI)))) * a_m);
            	} else if (t_0 <= 5e+118) {
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * ((double) M_PI));
            	} else {
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * b) * ((double) M_PI);
            	}
            	return tmp;
            }
            
            a_m = Math.abs(a);
            public static double code(double a_m, double b, double angle) {
            	double t_0 = 2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0));
            	double tmp;
            	if (t_0 <= -2e+162) {
            		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * Math.PI))) * a_m);
            	} else if (t_0 <= 5e+118) {
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * Math.PI);
            	} else {
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * b) * Math.PI;
            	}
            	return tmp;
            }
            
            a_m = math.fabs(a)
            def code(a_m, b, angle):
            	t_0 = 2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))
            	tmp = 0
            	if t_0 <= -2e+162:
            		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * math.pi))) * a_m)
            	elif t_0 <= 5e+118:
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * math.pi)
            	else:
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * b) * math.pi
            	return tmp
            
            a_m = abs(a)
            function code(a_m, b, angle)
            	t_0 = Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0)))
            	tmp = 0.0
            	if (t_0 <= -2e+162)
            		tmp = Float64(-2.0 * Float64(Float64(0.005555555555555556 * Float64(a_m * Float64(angle * pi))) * a_m));
            	elseif (t_0 <= 5e+118)
            		tmp = Float64(0.011111111111111112 * Float64(Float64(angle * Float64(Float64(b - a_m) * Float64(b + a_m))) * pi));
            	else
            		tmp = Float64(Float64(Float64(0.011111111111111112 * Float64(angle * Float64(b - a_m))) * b) * pi);
            	end
            	return tmp
            end
            
            a_m = abs(a);
            function tmp_2 = code(a_m, b, angle)
            	t_0 = 2.0 * ((b ^ 2.0) - (a_m ^ 2.0));
            	tmp = 0.0;
            	if (t_0 <= -2e+162)
            		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * pi))) * a_m);
            	elseif (t_0 <= 5e+118)
            		tmp = 0.011111111111111112 * ((angle * ((b - a_m) * (b + a_m))) * pi);
            	else
            		tmp = ((0.011111111111111112 * (angle * (b - a_m))) * b) * pi;
            	end
            	tmp_2 = tmp;
            end
            
            a_m = N[Abs[a], $MachinePrecision]
            code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -2e+162], N[(-2.0 * N[(N[(0.005555555555555556 * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+118], N[(0.011111111111111112 * N[(N[(angle * N[(N[(b - a$95$m), $MachinePrecision] * N[(b + a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * N[(angle * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * Pi), $MachinePrecision]]]]
            
            \begin{array}{l}
            a_m = \left|a\right|
            
            \\
            \begin{array}{l}
            t_0 := 2 \cdot \left({b}^{2} - {a\_m}^{2}\right)\\
            \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+162}:\\
            \;\;\;\;-2 \cdot \left(\left(0.005555555555555556 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\_m\right)\\
            
            \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+118}:\\
            \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\_m\right) \cdot \left(b + a\_m\right)\right)\right) \cdot \pi\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\_m\right)\right)\right) \cdot b\right) \cdot \pi\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.9999999999999999e162

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Step-by-step derivation
                1. lift-cos.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                2. cos-fabs-revN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\left|\pi \cdot \frac{angle}{180}\right|\right)} \]
                3. cos-neg-revN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right)} \]
                4. sin-+PI/2-revN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                5. lower-sin.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                6. lower-+.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \color{blue}{\left(\left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                7. lift-*.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\color{blue}{\pi \cdot \frac{angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                8. lift-/.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\pi \cdot \color{blue}{\frac{angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                9. associate-*r/N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\color{blue}{\frac{\pi \cdot angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                10. fabs-divN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\color{blue}{\frac{\left|\pi \cdot angle\right|}{\left|180\right|}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                11. metadata-evalN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{\left|\pi \cdot angle\right|}{\color{blue}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                12. distribute-neg-frac2N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\frac{\left|\pi \cdot angle\right|}{\mathsf{neg}\left(180\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                13. lower-/.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\frac{\left|\pi \cdot angle\right|}{\mathsf{neg}\left(180\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                14. lower-fabs.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\color{blue}{\left|\pi \cdot angle\right|}}{\mathsf{neg}\left(180\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                15. *-commutativeN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|\color{blue}{angle \cdot \pi}\right|}{\mathsf{neg}\left(180\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                16. lower-*.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|\color{blue}{angle \cdot \pi}\right|}{\mathsf{neg}\left(180\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                17. metadata-evalN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{\color{blue}{-180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                18. lift-PI.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{\color{blue}{\pi}}{2}\right) \]
                19. mult-flipN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\pi \cdot \frac{1}{2}}\right) \]
                20. *-commutativeN/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \]
                21. lower-*.f64N/A

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \]
                22. metadata-eval53.0

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{0.5} \cdot \pi\right) \]
              3. Applied rewrites53.0%

                \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right)} \]
              4. Taylor expanded in a around inf

                \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -2 \cdot \color{blue}{\left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto -2 \cdot \left({a}^{2} \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                3. lower-pow.f64N/A

                  \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                4. lower-*.f64N/A

                  \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                5. lower-sin.f64N/A

                  \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \color{blue}{\left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                6. lower-*.f64N/A

                  \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\color{blue}{\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right|} + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                7. lower-*.f64N/A

                  \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \color{blue}{\left|angle \cdot \mathsf{PI}\left(\right)\right|} + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                8. lower-PI.f64N/A

                  \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
              6. Applied rewrites34.4%

                \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556, \left|angle \cdot \pi\right|, 0.5 \cdot \pi\right)\right)\right)\right)} \]
              7. Applied rewrites39.8%

                \[\leadsto -2 \cdot \left(\left(\left(\cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right) \cdot a\right) \cdot \color{blue}{a}\right) \]
              8. Taylor expanded in angle around 0

                \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
              9. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
                2. lower-*.f64N/A

                  \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
                3. lower-*.f64N/A

                  \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
                4. lower-PI.f6437.2

                  \[\leadsto -2 \cdot \left(\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
              10. Applied rewrites37.2%

                \[\leadsto -2 \cdot \left(\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]

              if -1.9999999999999999e162 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 4.99999999999999972e118

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                7. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                11. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                15. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                16. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]

              if 4.99999999999999972e118 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

              1. Initial program 53.7%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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)} \]
              3. Step-by-step derivation
                1. 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)} \]
                2. 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) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                5. lower--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                6. lower-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                7. lower-pow.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
              4. Applied rewrites50.3%

                \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                3. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                6. lower-*.f6450.3

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                7. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                9. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                11. unpow2N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                12. difference-of-squares-revN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                13. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                14. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                15. lift--.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                16. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                17. lower-*.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                18. lift-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                19. +-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                20. lower-+.f6454.2

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
              6. Applied rewrites54.2%

                \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
              7. Taylor expanded in a around 0

                \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
              8. Step-by-step derivation
                1. Applied rewrites38.0%

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                2. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right)} \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \color{blue}{\pi}\right) \]
                  3. associate-*r*N/A

                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \color{blue}{\pi} \]
                  4. lower-*.f64N/A

                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \color{blue}{\pi} \]
                  5. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \pi \]
                  6. lift-*.f64N/A

                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \pi \]
                  7. associate-*r*N/A

                    \[\leadsto \left(\frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot b\right)\right) \cdot \pi \]
                  8. +-commutativeN/A

                    \[\leadsto \left(\frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot b\right)\right) \cdot \pi \]
                  9. associate-*r*N/A

                    \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                  10. lower-*.f64N/A

                    \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                  12. lower-*.f6441.8

                    \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                  13. +-commutative41.8

                    \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                3. Applied rewrites41.8%

                  \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \color{blue}{\pi} \]
              9. Recombined 3 regimes into one program.
              10. Add Preprocessing

              Alternative 20: 61.1% accurate, 2.1× speedup?

              \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq 10^{-288}:\\ \;\;\;\;-2 \cdot \left(\left(0.005555555555555556 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(angle \cdot b\right) \cdot \left(b - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
              a_m = (fabs.f64 a)
              (FPCore (a_m b angle)
               :precision binary64
               (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) 1e-288)
                 (* -2.0 (* (* 0.005555555555555556 (* a_m (* angle PI))) a_m))
                 (* (* (* angle b) (- b a_m)) (* PI 0.011111111111111112))))
              a_m = fabs(a);
              double code(double a_m, double b, double angle) {
              	double tmp;
              	if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= 1e-288) {
              		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * ((double) M_PI)))) * a_m);
              	} else {
              		tmp = ((angle * b) * (b - a_m)) * (((double) M_PI) * 0.011111111111111112);
              	}
              	return tmp;
              }
              
              a_m = Math.abs(a);
              public static double code(double a_m, double b, double angle) {
              	double tmp;
              	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= 1e-288) {
              		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * Math.PI))) * a_m);
              	} else {
              		tmp = ((angle * b) * (b - a_m)) * (Math.PI * 0.011111111111111112);
              	}
              	return tmp;
              }
              
              a_m = math.fabs(a)
              def code(a_m, b, angle):
              	tmp = 0
              	if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= 1e-288:
              		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * math.pi))) * a_m)
              	else:
              		tmp = ((angle * b) * (b - a_m)) * (math.pi * 0.011111111111111112)
              	return tmp
              
              a_m = abs(a)
              function code(a_m, b, angle)
              	tmp = 0.0
              	if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= 1e-288)
              		tmp = Float64(-2.0 * Float64(Float64(0.005555555555555556 * Float64(a_m * Float64(angle * pi))) * a_m));
              	else
              		tmp = Float64(Float64(Float64(angle * b) * Float64(b - a_m)) * Float64(pi * 0.011111111111111112));
              	end
              	return tmp
              end
              
              a_m = abs(a);
              function tmp_2 = code(a_m, b, angle)
              	tmp = 0.0;
              	if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= 1e-288)
              		tmp = -2.0 * ((0.005555555555555556 * (a_m * (angle * pi))) * a_m);
              	else
              		tmp = ((angle * b) * (b - a_m)) * (pi * 0.011111111111111112);
              	end
              	tmp_2 = tmp;
              end
              
              a_m = N[Abs[a], $MachinePrecision]
              code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e-288], N[(-2.0 * N[(N[(0.005555555555555556 * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(angle * b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              a_m = \left|a\right|
              
              \\
              \begin{array}{l}
              \mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq 10^{-288}:\\
              \;\;\;\;-2 \cdot \left(\left(0.005555555555555556 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\_m\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(\left(angle \cdot b\right) \cdot \left(b - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < 1.00000000000000006e-288

                1. Initial program 53.7%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                2. Step-by-step derivation
                  1. lift-cos.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                  2. cos-fabs-revN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\left|\pi \cdot \frac{angle}{180}\right|\right)} \]
                  3. cos-neg-revN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right)} \]
                  4. sin-+PI/2-revN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                  5. lower-sin.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                  6. lower-+.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \color{blue}{\left(\left(\mathsf{neg}\left(\left|\pi \cdot \frac{angle}{180}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\color{blue}{\pi \cdot \frac{angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  8. lift-/.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\pi \cdot \color{blue}{\frac{angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  9. associate-*r/N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\left|\color{blue}{\frac{\pi \cdot angle}{180}}\right|\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  10. fabs-divN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\color{blue}{\frac{\left|\pi \cdot angle\right|}{\left|180\right|}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  11. metadata-evalN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{\left|\pi \cdot angle\right|}{\color{blue}{180}}\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  12. distribute-neg-frac2N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\frac{\left|\pi \cdot angle\right|}{\mathsf{neg}\left(180\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  13. lower-/.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\color{blue}{\frac{\left|\pi \cdot angle\right|}{\mathsf{neg}\left(180\right)}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  14. lower-fabs.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\color{blue}{\left|\pi \cdot angle\right|}}{\mathsf{neg}\left(180\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  15. *-commutativeN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|\color{blue}{angle \cdot \pi}\right|}{\mathsf{neg}\left(180\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  16. lower-*.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|\color{blue}{angle \cdot \pi}\right|}{\mathsf{neg}\left(180\right)} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  17. metadata-evalN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{\color{blue}{-180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \]
                  18. lift-PI.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \frac{\color{blue}{\pi}}{2}\right) \]
                  19. mult-flipN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\pi \cdot \frac{1}{2}}\right) \]
                  20. *-commutativeN/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \]
                  21. lower-*.f64N/A

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \]
                  22. metadata-eval53.0

                    \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + \color{blue}{0.5} \cdot \pi\right) \]
                3. Applied rewrites53.0%

                  \[\leadsto \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{\sin \left(\frac{\left|angle \cdot \pi\right|}{-180} + 0.5 \cdot \pi\right)} \]
                4. Taylor expanded in a around inf

                  \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
                5. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto -2 \cdot \color{blue}{\left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
                  2. lower-*.f64N/A

                    \[\leadsto -2 \cdot \left({a}^{2} \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                  3. lower-pow.f64N/A

                    \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                  4. lower-*.f64N/A

                    \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                  5. lower-sin.f64N/A

                    \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \color{blue}{\left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                  6. lower-*.f64N/A

                    \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\color{blue}{\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right|} + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                  7. lower-*.f64N/A

                    \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \color{blue}{\left|angle \cdot \mathsf{PI}\left(\right)\right|} + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                  8. lower-PI.f64N/A

                    \[\leadsto -2 \cdot \left({a}^{2} \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(\frac{-1}{180} \cdot \left|angle \cdot \mathsf{PI}\left(\right)\right| + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                6. Applied rewrites34.4%

                  \[\leadsto \color{blue}{-2 \cdot \left({a}^{2} \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \sin \left(\mathsf{fma}\left(-0.005555555555555556, \left|angle \cdot \pi\right|, 0.5 \cdot \pi\right)\right)\right)\right)} \]
                7. Applied rewrites39.8%

                  \[\leadsto -2 \cdot \left(\left(\left(\cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)\right) \cdot a\right) \cdot \color{blue}{a}\right) \]
                8. Taylor expanded in angle around 0

                  \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
                  2. lower-*.f64N/A

                    \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
                  3. lower-*.f64N/A

                    \[\leadsto -2 \cdot \left(\left(\frac{1}{180} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a\right) \]
                  4. lower-PI.f6437.2

                    \[\leadsto -2 \cdot \left(\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]
                10. Applied rewrites37.2%

                  \[\leadsto -2 \cdot \left(\left(0.005555555555555556 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \cdot a\right) \]

                if 1.00000000000000006e-288 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                1. Initial program 53.7%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                2. 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)} \]
                3. Step-by-step derivation
                  1. 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)} \]
                  2. 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) \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                  4. lower-PI.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                  5. lower--.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                  6. lower-pow.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                  7. lower-pow.f6450.3

                    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                4. Applied rewrites50.3%

                  \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                5. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                  4. associate-*r*N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                  5. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                  6. lower-*.f6450.3

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                  7. lift--.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                  8. lift-pow.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                  9. unpow2N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                  10. lift-pow.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                  11. unpow2N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                  12. difference-of-squares-revN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  13. +-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  14. lift-+.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  15. lift--.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  16. *-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                  17. lower-*.f6454.2

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                  18. lift-+.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                  19. +-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                  20. lower-+.f6454.2

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                6. Applied rewrites54.2%

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
                7. Taylor expanded in a around 0

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                8. Step-by-step derivation
                  1. Applied rewrites38.0%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right)} \]
                    2. *-commutativeN/A

                      \[\leadsto \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \cdot \color{blue}{\frac{1}{90}} \]
                    3. lift-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \cdot \frac{1}{90} \]
                    4. associate-*l*N/A

                      \[\leadsto \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \color{blue}{\left(\pi \cdot \frac{1}{90}\right)} \]
                    5. lower-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \color{blue}{\left(\pi \cdot \frac{1}{90}\right)} \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \left(\color{blue}{\pi} \cdot \frac{1}{90}\right) \]
                    7. lift-*.f64N/A

                      \[\leadsto \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                    8. *-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                    9. +-commutativeN/A

                      \[\leadsto \left(angle \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                    10. associate-*r*N/A

                      \[\leadsto \left(\left(angle \cdot b\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{\pi} \cdot \frac{1}{90}\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot b\right) \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{\pi} \cdot \frac{1}{90}\right) \]
                    12. lower-*.f64N/A

                      \[\leadsto \left(\left(angle \cdot b\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                    13. +-commutativeN/A

                      \[\leadsto \left(\left(angle \cdot b\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                    14. +-commutativeN/A

                      \[\leadsto \left(\left(angle \cdot b\right) \cdot \left(b - a\right)\right) \cdot \mathsf{Rewrite=>}\left(lower-*.f64, \left(\pi \cdot \frac{1}{90}\right)\right) \]
                  3. Applied rewrites40.6%

                    \[\leadsto \left(\left(angle \cdot b\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(\pi \cdot 0.011111111111111112\right)} \]
                9. Recombined 2 regimes into one program.
                10. Add Preprocessing

                Alternative 21: 41.8% accurate, 7.8× speedup?

                \[\begin{array}{l} a_m = \left|a\right| \\ \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\_m\right)\right)\right) \cdot b\right) \cdot \pi \end{array} \]
                a_m = (fabs.f64 a)
                (FPCore (a_m b angle)
                 :precision binary64
                 (* (* (* 0.011111111111111112 (* angle (- b a_m))) b) PI))
                a_m = fabs(a);
                double code(double a_m, double b, double angle) {
                	return ((0.011111111111111112 * (angle * (b - a_m))) * b) * ((double) M_PI);
                }
                
                a_m = Math.abs(a);
                public static double code(double a_m, double b, double angle) {
                	return ((0.011111111111111112 * (angle * (b - a_m))) * b) * Math.PI;
                }
                
                a_m = math.fabs(a)
                def code(a_m, b, angle):
                	return ((0.011111111111111112 * (angle * (b - a_m))) * b) * math.pi
                
                a_m = abs(a)
                function code(a_m, b, angle)
                	return Float64(Float64(Float64(0.011111111111111112 * Float64(angle * Float64(b - a_m))) * b) * pi)
                end
                
                a_m = abs(a);
                function tmp = code(a_m, b, angle)
                	tmp = ((0.011111111111111112 * (angle * (b - a_m))) * b) * pi;
                end
                
                a_m = N[Abs[a], $MachinePrecision]
                code[a$95$m_, b_, angle_] := N[(N[(N[(0.011111111111111112 * N[(angle * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * Pi), $MachinePrecision]
                
                \begin{array}{l}
                a_m = \left|a\right|
                
                \\
                \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\_m\right)\right)\right) \cdot b\right) \cdot \pi
                \end{array}
                
                Derivation
                1. Initial program 53.7%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                2. 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)} \]
                3. Step-by-step derivation
                  1. 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)} \]
                  2. 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) \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                  4. lower-PI.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                  5. lower--.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                  6. lower-pow.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                  7. lower-pow.f6450.3

                    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                4. Applied rewrites50.3%

                  \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                5. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                  2. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                  4. associate-*r*N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                  5. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                  6. lower-*.f6450.3

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                  7. lift--.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                  8. lift-pow.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                  9. unpow2N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                  10. lift-pow.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                  11. unpow2N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                  12. difference-of-squares-revN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  13. +-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  14. lift-+.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  15. lift--.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                  16. *-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                  17. lower-*.f6454.2

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                  18. lift-+.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                  19. +-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                  20. lower-+.f6454.2

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                6. Applied rewrites54.2%

                  \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
                7. Taylor expanded in a around 0

                  \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                8. Step-by-step derivation
                  1. Applied rewrites38.0%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \color{blue}{\pi}\right) \]
                    3. associate-*r*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \color{blue}{\pi} \]
                    4. lower-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \color{blue}{\pi} \]
                    5. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \pi \]
                    6. lift-*.f64N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right)\right) \cdot \pi \]
                    7. associate-*r*N/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot b\right)\right) \cdot \pi \]
                    8. +-commutativeN/A

                      \[\leadsto \left(\frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot b\right)\right) \cdot \pi \]
                    9. associate-*r*N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                    10. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                    11. lower-*.f64N/A

                      \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                    12. lower-*.f6441.8

                      \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                    13. +-commutative41.8

                      \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \pi \]
                  3. Applied rewrites41.8%

                    \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b\right) \cdot \color{blue}{\pi} \]
                  4. Add Preprocessing

                  Alternative 22: 41.8% accurate, 7.8× speedup?

                  \[\begin{array}{l} a_m = \left|a\right| \\ 0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\_m\right)\right) \cdot \left(b \cdot \pi\right)\right) \end{array} \]
                  a_m = (fabs.f64 a)
                  (FPCore (a_m b angle)
                   :precision binary64
                   (* 0.011111111111111112 (* (* angle (- b a_m)) (* b PI))))
                  a_m = fabs(a);
                  double code(double a_m, double b, double angle) {
                  	return 0.011111111111111112 * ((angle * (b - a_m)) * (b * ((double) M_PI)));
                  }
                  
                  a_m = Math.abs(a);
                  public static double code(double a_m, double b, double angle) {
                  	return 0.011111111111111112 * ((angle * (b - a_m)) * (b * Math.PI));
                  }
                  
                  a_m = math.fabs(a)
                  def code(a_m, b, angle):
                  	return 0.011111111111111112 * ((angle * (b - a_m)) * (b * math.pi))
                  
                  a_m = abs(a)
                  function code(a_m, b, angle)
                  	return Float64(0.011111111111111112 * Float64(Float64(angle * Float64(b - a_m)) * Float64(b * pi)))
                  end
                  
                  a_m = abs(a);
                  function tmp = code(a_m, b, angle)
                  	tmp = 0.011111111111111112 * ((angle * (b - a_m)) * (b * pi));
                  end
                  
                  a_m = N[Abs[a], $MachinePrecision]
                  code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(N[(angle * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  a_m = \left|a\right|
                  
                  \\
                  0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\_m\right)\right) \cdot \left(b \cdot \pi\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 53.7%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. 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)} \]
                  3. Step-by-step derivation
                    1. 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)} \]
                    2. 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) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                    5. lower--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                    6. lower-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                    7. lower-pow.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                  4. Applied rewrites50.3%

                    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                  5. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                    2. lift-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                    4. associate-*r*N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                    6. lower-*.f6450.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                    7. lift--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                    8. lift-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                    9. unpow2N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                    10. lift-pow.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                    11. unpow2N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                    12. difference-of-squares-revN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                    13. +-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                    14. lift-+.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                    15. lift--.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                    16. *-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                    17. lower-*.f6454.2

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                    18. lift-+.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                    19. +-commutativeN/A

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                    20. lower-+.f6454.2

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
                  7. Taylor expanded in a around 0

                    \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                  8. Step-by-step derivation
                    1. Applied rewrites38.0%

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \color{blue}{\pi}\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                      4. associate-*r*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(angle \cdot \left(b - a\right)\right) \cdot b\right) \cdot \pi\right) \]
                      5. +-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(angle \cdot \left(b - a\right)\right) \cdot b\right) \cdot \pi\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(b \cdot \pi\right)}\right) \]
                      7. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(b \cdot \pi\right)}\right) \]
                      8. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{b} \cdot \pi\right)\right) \]
                      9. lower-*.f6441.8

                        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(b \cdot \color{blue}{\pi}\right)\right) \]
                      10. +-commutative41.8

                        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(b \cdot \pi\right)\right) \]
                    3. Applied rewrites41.8%

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(b \cdot \pi\right)}\right) \]
                    4. Add Preprocessing

                    Alternative 23: 38.0% accurate, 7.8× speedup?

                    \[\begin{array}{l} a_m = \left|a\right| \\ 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\_m\right) \cdot b\right)\right) \cdot \pi\right) \end{array} \]
                    a_m = (fabs.f64 a)
                    (FPCore (a_m b angle)
                     :precision binary64
                     (* 0.011111111111111112 (* (* angle (* (- b a_m) b)) PI)))
                    a_m = fabs(a);
                    double code(double a_m, double b, double angle) {
                    	return 0.011111111111111112 * ((angle * ((b - a_m) * b)) * ((double) M_PI));
                    }
                    
                    a_m = Math.abs(a);
                    public static double code(double a_m, double b, double angle) {
                    	return 0.011111111111111112 * ((angle * ((b - a_m) * b)) * Math.PI);
                    }
                    
                    a_m = math.fabs(a)
                    def code(a_m, b, angle):
                    	return 0.011111111111111112 * ((angle * ((b - a_m) * b)) * math.pi)
                    
                    a_m = abs(a)
                    function code(a_m, b, angle)
                    	return Float64(0.011111111111111112 * Float64(Float64(angle * Float64(Float64(b - a_m) * b)) * pi))
                    end
                    
                    a_m = abs(a);
                    function tmp = code(a_m, b, angle)
                    	tmp = 0.011111111111111112 * ((angle * ((b - a_m) * b)) * pi);
                    end
                    
                    a_m = N[Abs[a], $MachinePrecision]
                    code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(N[(angle * N[(N[(b - a$95$m), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    a_m = \left|a\right|
                    
                    \\
                    0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\_m\right) \cdot b\right)\right) \cdot \pi\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 53.7%

                      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    2. 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)} \]
                    3. Step-by-step derivation
                      1. 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)} \]
                      2. 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) \]
                      3. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                      4. lower-PI.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right)\right) \]
                      5. lower--.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - \color{blue}{{a}^{2}}\right)\right)\right) \]
                      6. lower-pow.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {\color{blue}{a}}^{2}\right)\right)\right) \]
                      7. lower-pow.f6450.3

                        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
                    4. Applied rewrites50.3%

                      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
                    5. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)}\right) \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right)\right) \]
                      3. *-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\pi}\right)\right) \]
                      4. associate-*r*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                      5. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{\pi}\right) \]
                      6. lower-*.f6450.3

                        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                      7. lift--.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                      8. lift-pow.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \pi\right) \]
                      9. unpow2N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                      10. lift-pow.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \pi\right) \]
                      11. unpow2N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \pi\right) \]
                      12. difference-of-squares-revN/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                      13. +-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                      14. lift-+.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                      15. lift--.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \pi\right) \]
                      16. *-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                      17. lower-*.f6454.2

                        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                      18. lift-+.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot \pi\right) \]
                      19. +-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                      20. lower-+.f6454.2

                        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                    6. Applied rewrites54.2%

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \color{blue}{\pi}\right) \]
                    7. Taylor expanded in a around 0

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                    8. Step-by-step derivation
                      1. Applied rewrites38.0%

                        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot \pi\right) \]
                      2. Add Preprocessing

                      Reproduce

                      ?
                      herbie shell --seed 2025156 
                      (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)))))