ab-angle->ABCF B

Percentage Accurate: 53.4% → 67.2%
Time: 6.6s
Alternatives: 17
Speedup: 6.6×

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 17 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.4% 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.2% accurate, 1.2× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1.65 \cdot 10^{+138}:\\ \;\;\;\;\frac{\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)}{\frac{0.5}{b - a}} \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle\_m, \pi, \pi \cdot 0.5\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 1.65e+138)
    (*
     (/
      (*
       (cos (* -0.005555555555555556 (* PI angle_m)))
       (sin (* (* 0.005555555555555556 angle_m) PI)))
      (/ 0.5 (- b a)))
     (+ a b))
    (*
     (- b a)
     (*
      (+ a b)
      (*
       (sin (fma (* 0.005555555555555556 angle_m) PI (* PI 0.5)))
       (* (sin (* 0.005555555555555556 (* angle_m PI))) 2.0)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 1.65e+138) {
		tmp = ((cos((-0.005555555555555556 * (((double) M_PI) * angle_m))) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) / (0.5 / (b - a))) * (a + b);
	} else {
		tmp = (b - a) * ((a + b) * (sin(fma((0.005555555555555556 * angle_m), ((double) M_PI), (((double) M_PI) * 0.5))) * (sin((0.005555555555555556 * (angle_m * ((double) M_PI)))) * 2.0)));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (angle_m <= 1.65e+138)
		tmp = Float64(Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle_m))) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) / Float64(0.5 / Float64(b - a))) * Float64(a + b));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(a + b) * Float64(sin(fma(Float64(0.005555555555555556 * angle_m), pi, Float64(pi * 0.5))) * Float64(sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) * 2.0))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1.65e+138], N[(N[(N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(0.5 / N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi + N[(Pi * 0.5), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 1.65 \cdot 10^{+138}:\\
\;\;\;\;\frac{\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)}{\frac{0.5}{b - a}} \cdot \left(a + b\right)\\

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


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

    1. Initial program 53.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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. lower-*.f64N/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) \]
      6. 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) \]
      7. 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) \]
      8. 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) \]
      9. 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) \]
      10. 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) \]
      11. 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) \]
      12. lower-*.f64N/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) \]
      13. lower-+.f64N/A

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
      15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999989e138 < angle

    1. Initial program 53.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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. lower-*.f64N/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) \]
      6. 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) \]
      7. 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) \]
      8. 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) \]
      9. 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) \]
      10. 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) \]
      11. 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) \]
      12. lower-*.f64N/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) \]
      13. lower-+.f64N/A

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
      15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.1% accurate, 1.2× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 9 \cdot 10^{+110}:\\ \;\;\;\;\frac{\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)}{\frac{0.5}{b - a}} \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 9e+110)
    (*
     (/
      (*
       (cos (* -0.005555555555555556 (* PI angle_m)))
       (sin (* (* 0.005555555555555556 angle_m) PI)))
      (/ 0.5 (- b a)))
     (+ a b))
    (*
     (- b a)
     (*
      (+ a b)
      (* 1.0 (* (sin (* 0.005555555555555556 (* angle_m PI))) 2.0)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 9e+110) {
		tmp = ((cos((-0.005555555555555556 * (((double) M_PI) * angle_m))) * sin(((0.005555555555555556 * angle_m) * ((double) M_PI)))) / (0.5 / (b - a))) * (a + b);
	} else {
		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * ((double) M_PI)))) * 2.0)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (angle_m <= 9e+110) {
		tmp = ((Math.cos((-0.005555555555555556 * (Math.PI * angle_m))) * Math.sin(((0.005555555555555556 * angle_m) * Math.PI))) / (0.5 / (b - a))) * (a + b);
	} else {
		tmp = (b - a) * ((a + b) * (1.0 * (Math.sin((0.005555555555555556 * (angle_m * Math.PI))) * 2.0)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if angle_m <= 9e+110:
		tmp = ((math.cos((-0.005555555555555556 * (math.pi * angle_m))) * math.sin(((0.005555555555555556 * angle_m) * math.pi))) / (0.5 / (b - a))) * (a + b)
	else:
		tmp = (b - a) * ((a + b) * (1.0 * (math.sin((0.005555555555555556 * (angle_m * math.pi))) * 2.0)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (angle_m <= 9e+110)
		tmp = Float64(Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle_m))) * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))) / Float64(0.5 / Float64(b - a))) * Float64(a + b));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(a + b) * Float64(1.0 * Float64(sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) * 2.0))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (angle_m <= 9e+110)
		tmp = ((cos((-0.005555555555555556 * (pi * angle_m))) * sin(((0.005555555555555556 * angle_m) * pi))) / (0.5 / (b - a))) * (a + b);
	else
		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * pi))) * 2.0)));
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 9e+110], N[(N[(N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(0.5 / N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(1.0 * N[(N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 9 \cdot 10^{+110}:\\
\;\;\;\;\frac{\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)}{\frac{0.5}{b - a}} \cdot \left(a + b\right)\\

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


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

    1. Initial program 53.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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. lower-*.f64N/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) \]
      6. 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) \]
      7. 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) \]
      8. 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) \]
      9. 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) \]
      10. 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) \]
      11. 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) \]
      12. lower-*.f64N/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) \]
      13. lower-+.f64N/A

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
      15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000005e110 < angle

    1. Initial program 53.4%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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. lower-*.f64N/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) \]
      6. 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) \]
      7. 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) \]
      8. 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) \]
      9. 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) \]
      10. 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) \]
      11. 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) \]
      12. lower-*.f64N/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) \]
      13. lower-+.f64N/A

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

        \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
      15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 67.1% accurate, 1.2× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 9 \cdot 10^{+110}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\ \end{array} \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (*
      angle_s
      (if (<= angle_m 9e+110)
        (*
         (- b a)
         (*
          (*
           (cos (* -0.005555555555555556 (* PI angle_m)))
           (* 2.0 (sin (* (* 0.005555555555555556 angle_m) PI))))
          (+ a b)))
        (*
         (- b a)
         (*
          (+ a b)
          (* 1.0 (* (sin (* 0.005555555555555556 (* angle_m PI))) 2.0)))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (angle_m <= 9e+110) {
    		tmp = (b - a) * ((cos((-0.005555555555555556 * (((double) M_PI) * angle_m))) * (2.0 * sin(((0.005555555555555556 * angle_m) * ((double) M_PI))))) * (a + b));
    	} else {
    		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * ((double) M_PI)))) * 2.0)));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b, double angle_m) {
    	double tmp;
    	if (angle_m <= 9e+110) {
    		tmp = (b - a) * ((Math.cos((-0.005555555555555556 * (Math.PI * angle_m))) * (2.0 * Math.sin(((0.005555555555555556 * angle_m) * Math.PI)))) * (a + b));
    	} else {
    		tmp = (b - a) * ((a + b) * (1.0 * (Math.sin((0.005555555555555556 * (angle_m * Math.PI))) * 2.0)));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b, angle_m):
    	tmp = 0
    	if angle_m <= 9e+110:
    		tmp = (b - a) * ((math.cos((-0.005555555555555556 * (math.pi * angle_m))) * (2.0 * math.sin(((0.005555555555555556 * angle_m) * math.pi)))) * (a + b))
    	else:
    		tmp = (b - a) * ((a + b) * (1.0 * (math.sin((0.005555555555555556 * (angle_m * math.pi))) * 2.0)))
    	return angle_s * tmp
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	tmp = 0.0
    	if (angle_m <= 9e+110)
    		tmp = Float64(Float64(b - a) * Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle_m))) * Float64(2.0 * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi)))) * Float64(a + b)));
    	else
    		tmp = Float64(Float64(b - a) * Float64(Float64(a + b) * Float64(1.0 * Float64(sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) * 2.0))));
    	end
    	return Float64(angle_s * tmp)
    end
    
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp_2 = code(angle_s, a, b, angle_m)
    	tmp = 0.0;
    	if (angle_m <= 9e+110)
    		tmp = (b - a) * ((cos((-0.005555555555555556 * (pi * angle_m))) * (2.0 * sin(((0.005555555555555556 * angle_m) * pi)))) * (a + b));
    	else
    		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * pi))) * 2.0)));
    	end
    	tmp_2 = angle_s * tmp;
    end
    
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 9e+110], N[(N[(b - a), $MachinePrecision] * N[(N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(1.0 * N[(N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 9 \cdot 10^{+110}:\\
    \;\;\;\;\left(b - a\right) \cdot \left(\left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\right) \cdot \left(a + b\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 9.0000000000000005e110

      1. Initial program 53.4%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. lower-*.f64N/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) \]
        6. 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) \]
        7. 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) \]
        8. 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) \]
        9. 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) \]
        10. 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) \]
        11. 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) \]
        12. lower-*.f64N/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) \]
        13. lower-+.f64N/A

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
        15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.0000000000000005e110 < angle

      1. Initial program 53.4%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. lower-*.f64N/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) \]
        6. 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) \]
        7. 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) \]
        8. 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) \]
        9. 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) \]
        10. 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) \]
        11. 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) \]
        12. lower-*.f64N/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) \]
        13. lower-+.f64N/A

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

          \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
        15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 67.0% accurate, 1.2× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 1900:\\ \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\ \mathbf{elif}\;angle\_m \leq 9.6 \cdot 10^{+110}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(b \cdot \cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\ \end{array} \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (if (<= angle_m 1900.0)
          (* (- b a) (* 0.011111111111111112 (* angle_m (* PI (+ a b)))))
          (if (<= angle_m 9.6e+110)
            (*
             (* (- b a) (* b (cos (* -0.005555555555555556 (* angle_m PI)))))
             (* 2.0 (sin (* (* 0.005555555555555556 angle_m) PI))))
            (*
             (- b a)
             (*
              (+ a b)
              (* 1.0 (* (sin (* 0.005555555555555556 (* angle_m PI))) 2.0))))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (angle_m <= 1900.0) {
      		tmp = (b - a) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (a + b))));
      	} else if (angle_m <= 9.6e+110) {
      		tmp = ((b - a) * (b * cos((-0.005555555555555556 * (angle_m * ((double) M_PI)))))) * (2.0 * sin(((0.005555555555555556 * angle_m) * ((double) M_PI))));
      	} else {
      		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * ((double) M_PI)))) * 2.0)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	double tmp;
      	if (angle_m <= 1900.0) {
      		tmp = (b - a) * (0.011111111111111112 * (angle_m * (Math.PI * (a + b))));
      	} else if (angle_m <= 9.6e+110) {
      		tmp = ((b - a) * (b * Math.cos((-0.005555555555555556 * (angle_m * Math.PI))))) * (2.0 * Math.sin(((0.005555555555555556 * angle_m) * Math.PI)));
      	} else {
      		tmp = (b - a) * ((a + b) * (1.0 * (Math.sin((0.005555555555555556 * (angle_m * Math.PI))) * 2.0)));
      	}
      	return angle_s * tmp;
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	tmp = 0
      	if angle_m <= 1900.0:
      		tmp = (b - a) * (0.011111111111111112 * (angle_m * (math.pi * (a + b))))
      	elif angle_m <= 9.6e+110:
      		tmp = ((b - a) * (b * math.cos((-0.005555555555555556 * (angle_m * math.pi))))) * (2.0 * math.sin(((0.005555555555555556 * angle_m) * math.pi)))
      	else:
      		tmp = (b - a) * ((a + b) * (1.0 * (math.sin((0.005555555555555556 * (angle_m * math.pi))) * 2.0)))
      	return angle_s * tmp
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	tmp = 0.0
      	if (angle_m <= 1900.0)
      		tmp = Float64(Float64(b - a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(a + b)))));
      	elseif (angle_m <= 9.6e+110)
      		tmp = Float64(Float64(Float64(b - a) * Float64(b * cos(Float64(-0.005555555555555556 * Float64(angle_m * pi))))) * Float64(2.0 * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))));
      	else
      		tmp = Float64(Float64(b - a) * Float64(Float64(a + b) * Float64(1.0 * Float64(sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) * 2.0))));
      	end
      	return Float64(angle_s * tmp)
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b, angle_m)
      	tmp = 0.0;
      	if (angle_m <= 1900.0)
      		tmp = (b - a) * (0.011111111111111112 * (angle_m * (pi * (a + b))));
      	elseif (angle_m <= 9.6e+110)
      		tmp = ((b - a) * (b * cos((-0.005555555555555556 * (angle_m * pi))))) * (2.0 * sin(((0.005555555555555556 * angle_m) * pi)));
      	else
      		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * pi))) * 2.0)));
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 1900.0], N[(N[(b - a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 9.6e+110], N[(N[(N[(b - a), $MachinePrecision] * N[(b * N[Cos[N[(-0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(1.0 * N[(N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;angle\_m \leq 1900:\\
      \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\
      
      \mathbf{elif}\;angle\_m \leq 9.6 \cdot 10^{+110}:\\
      \;\;\;\;\left(\left(b - a\right) \cdot \left(b \cdot \cos \left(-0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if angle < 1900

        1. Initial program 53.4%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. lower-*.f64N/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) \]
          6. 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) \]
          7. 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) \]
          8. 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) \]
          9. 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) \]
          10. 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) \]
          11. 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) \]
          12. lower-*.f64N/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) \]
          13. lower-+.f64N/A

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

            \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
          15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1900 < angle < 9.60000000000000049e110

        1. Initial program 53.4%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. lower-*.f64N/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) \]
          6. 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) \]
          7. 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) \]
          8. 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) \]
          9. 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) \]
          10. 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) \]
          11. 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) \]
          12. lower-*.f64N/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) \]
          13. lower-+.f64N/A

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

            \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
          15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(b - a\right) \cdot \left(b \cdot \cos \left(\frac{-1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \cdot \left(2 \cdot \sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)\right) \]
          5. lower-PI.f6437.4

            \[\leadsto \left(\left(b - a\right) \cdot \left(b \cdot \cos \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right) \]
        8. Applied rewrites37.4%

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

        if 9.60000000000000049e110 < angle

        1. Initial program 53.4%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. lower-*.f64N/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) \]
          6. 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) \]
          7. 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) \]
          8. 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) \]
          9. 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) \]
          10. 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) \]
          11. 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) \]
          12. lower-*.f64N/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) \]
          13. lower-+.f64N/A

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

            \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
          15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 65.9% accurate, 1.2× speedup?

        \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 9 \cdot 10^{+110}:\\ \;\;\;\;\left(\left(\sin t\_0 \cdot 2\right) \cdot \left(\cos t\_0 \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
        angle\_m = (fabs.f64 angle)
        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
        (FPCore (angle_s a b angle_m)
         :precision binary64
         (let* ((t_0 (* (* 0.005555555555555556 angle_m) PI)))
           (*
            angle_s
            (if (<= angle_m 9e+110)
              (* (* (* (sin t_0) 2.0) (* (cos t_0) (- b a))) (+ a b))
              (*
               (- b a)
               (*
                (+ a b)
                (* 1.0 (* (sin (* 0.005555555555555556 (* angle_m PI))) 2.0))))))))
        angle\_m = fabs(angle);
        angle\_s = copysign(1.0, angle);
        double code(double angle_s, double a, double b, double angle_m) {
        	double t_0 = (0.005555555555555556 * angle_m) * ((double) M_PI);
        	double tmp;
        	if (angle_m <= 9e+110) {
        		tmp = ((sin(t_0) * 2.0) * (cos(t_0) * (b - a))) * (a + b);
        	} else {
        		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * ((double) M_PI)))) * 2.0)));
        	}
        	return angle_s * tmp;
        }
        
        angle\_m = Math.abs(angle);
        angle\_s = Math.copySign(1.0, angle);
        public static double code(double angle_s, double a, double b, double angle_m) {
        	double t_0 = (0.005555555555555556 * angle_m) * Math.PI;
        	double tmp;
        	if (angle_m <= 9e+110) {
        		tmp = ((Math.sin(t_0) * 2.0) * (Math.cos(t_0) * (b - a))) * (a + b);
        	} else {
        		tmp = (b - a) * ((a + b) * (1.0 * (Math.sin((0.005555555555555556 * (angle_m * Math.PI))) * 2.0)));
        	}
        	return angle_s * tmp;
        }
        
        angle\_m = math.fabs(angle)
        angle\_s = math.copysign(1.0, angle)
        def code(angle_s, a, b, angle_m):
        	t_0 = (0.005555555555555556 * angle_m) * math.pi
        	tmp = 0
        	if angle_m <= 9e+110:
        		tmp = ((math.sin(t_0) * 2.0) * (math.cos(t_0) * (b - a))) * (a + b)
        	else:
        		tmp = (b - a) * ((a + b) * (1.0 * (math.sin((0.005555555555555556 * (angle_m * math.pi))) * 2.0)))
        	return angle_s * tmp
        
        angle\_m = abs(angle)
        angle\_s = copysign(1.0, angle)
        function code(angle_s, a, b, angle_m)
        	t_0 = Float64(Float64(0.005555555555555556 * angle_m) * pi)
        	tmp = 0.0
        	if (angle_m <= 9e+110)
        		tmp = Float64(Float64(Float64(sin(t_0) * 2.0) * Float64(cos(t_0) * Float64(b - a))) * Float64(a + b));
        	else
        		tmp = Float64(Float64(b - a) * Float64(Float64(a + b) * Float64(1.0 * Float64(sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) * 2.0))));
        	end
        	return Float64(angle_s * tmp)
        end
        
        angle\_m = abs(angle);
        angle\_s = sign(angle) * abs(1.0);
        function tmp_2 = code(angle_s, a, b, angle_m)
        	t_0 = (0.005555555555555556 * angle_m) * pi;
        	tmp = 0.0;
        	if (angle_m <= 9e+110)
        		tmp = ((sin(t_0) * 2.0) * (cos(t_0) * (b - a))) * (a + b);
        	else
        		tmp = (b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * pi))) * 2.0)));
        	end
        	tmp_2 = angle_s * tmp;
        end
        
        angle\_m = N[Abs[angle], $MachinePrecision]
        angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 9e+110], N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(1.0 * N[(N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
        
        \begin{array}{l}
        angle\_m = \left|angle\right|
        \\
        angle\_s = \mathsf{copysign}\left(1, angle\right)
        
        \\
        \begin{array}{l}
        t_0 := \left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\\
        angle\_s \cdot \begin{array}{l}
        \mathbf{if}\;angle\_m \leq 9 \cdot 10^{+110}:\\
        \;\;\;\;\left(\left(\sin t\_0 \cdot 2\right) \cdot \left(\cos t\_0 \cdot \left(b - a\right)\right)\right) \cdot \left(a + b\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\\
        
        
        \end{array}
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if angle < 9.0000000000000005e110

          1. Initial program 53.4%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. 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. lower-*.f64N/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) \]
            6. 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) \]
            7. 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) \]
            8. 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) \]
            9. 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) \]
            10. 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) \]
            11. 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) \]
            12. lower-*.f64N/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) \]
            13. lower-+.f64N/A

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

              \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
            15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 9.0000000000000005e110 < angle

          1. Initial program 53.4%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. 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. lower-*.f64N/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) \]
            6. 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) \]
            7. 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) \]
            8. 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) \]
            9. 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) \]
            10. 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) \]
            11. 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) \]
            12. lower-*.f64N/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) \]
            13. lower-+.f64N/A

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

              \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
            15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 65.7% accurate, 0.7× speedup?

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

            1. Initial program 53.4%

              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            2. 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. lower-*.f64N/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) \]
              6. 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) \]
              7. 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) \]
              8. 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) \]
              9. 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) \]
              10. 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) \]
              11. 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) \]
              12. lower-*.f64N/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) \]
              13. lower-+.f64N/A

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
              15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 9.999999999999999e258 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

              1. Initial program 53.4%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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. lower-*.f64N/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) \]
                6. 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) \]
                7. 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) \]
                8. 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) \]
                9. 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) \]
                10. 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) \]
                11. 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) \]
                12. lower-*.f64N/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) \]
                13. lower-+.f64N/A

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

                  \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
                15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 65.6% accurate, 2.1× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.9 \cdot 10^{+35}:\\ \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\ \end{array} \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (*
              angle_s
              (if (<= angle_m 5.9e+35)
                (* (- b a) (* 0.011111111111111112 (* angle_m (* PI (+ a b)))))
                (*
                 (* (+ a b) (- b a))
                 (* 2.0 (sin (* (* 0.005555555555555556 angle_m) PI)))))))
            angle\_m = fabs(angle);
            angle\_s = copysign(1.0, angle);
            double code(double angle_s, double a, double b, double angle_m) {
            	double tmp;
            	if (angle_m <= 5.9e+35) {
            		tmp = (b - a) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (a + b))));
            	} else {
            		tmp = ((a + b) * (b - a)) * (2.0 * sin(((0.005555555555555556 * angle_m) * ((double) M_PI))));
            	}
            	return angle_s * tmp;
            }
            
            angle\_m = Math.abs(angle);
            angle\_s = Math.copySign(1.0, angle);
            public static double code(double angle_s, double a, double b, double angle_m) {
            	double tmp;
            	if (angle_m <= 5.9e+35) {
            		tmp = (b - a) * (0.011111111111111112 * (angle_m * (Math.PI * (a + b))));
            	} else {
            		tmp = ((a + b) * (b - a)) * (2.0 * Math.sin(((0.005555555555555556 * angle_m) * Math.PI)));
            	}
            	return angle_s * tmp;
            }
            
            angle\_m = math.fabs(angle)
            angle\_s = math.copysign(1.0, angle)
            def code(angle_s, a, b, angle_m):
            	tmp = 0
            	if angle_m <= 5.9e+35:
            		tmp = (b - a) * (0.011111111111111112 * (angle_m * (math.pi * (a + b))))
            	else:
            		tmp = ((a + b) * (b - a)) * (2.0 * math.sin(((0.005555555555555556 * angle_m) * math.pi)))
            	return angle_s * tmp
            
            angle\_m = abs(angle)
            angle\_s = copysign(1.0, angle)
            function code(angle_s, a, b, angle_m)
            	tmp = 0.0
            	if (angle_m <= 5.9e+35)
            		tmp = Float64(Float64(b - a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(a + b)))));
            	else
            		tmp = Float64(Float64(Float64(a + b) * Float64(b - a)) * Float64(2.0 * sin(Float64(Float64(0.005555555555555556 * angle_m) * pi))));
            	end
            	return Float64(angle_s * tmp)
            end
            
            angle\_m = abs(angle);
            angle\_s = sign(angle) * abs(1.0);
            function tmp_2 = code(angle_s, a, b, angle_m)
            	tmp = 0.0;
            	if (angle_m <= 5.9e+35)
            		tmp = (b - a) * (0.011111111111111112 * (angle_m * (pi * (a + b))));
            	else
            		tmp = ((a + b) * (b - a)) * (2.0 * sin(((0.005555555555555556 * angle_m) * pi)));
            	end
            	tmp_2 = angle_s * tmp;
            end
            
            angle\_m = N[Abs[angle], $MachinePrecision]
            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5.9e+35], N[(N[(b - a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(0.005555555555555556 * angle$95$m), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \begin{array}{l}
            \mathbf{if}\;angle\_m \leq 5.9 \cdot 10^{+35}:\\
            \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\_m\right) \cdot \pi\right)\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if angle < 5.89999999999999985e35

              1. Initial program 53.4%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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. lower-*.f64N/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) \]
                6. 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) \]
                7. 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) \]
                8. 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) \]
                9. 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) \]
                10. 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) \]
                11. 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) \]
                12. lower-*.f64N/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) \]
                13. lower-+.f64N/A

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

                  \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
                15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 5.89999999999999985e35 < angle

              1. Initial program 53.4%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. 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. lower-*.f64N/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) \]
                6. 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) \]
                7. 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) \]
                8. 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) \]
                9. 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) \]
                10. 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) \]
                11. 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) \]
                12. lower-*.f64N/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) \]
                13. lower-+.f64N/A

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

                  \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
                15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 64.6% accurate, 2.2× speedup?

            \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\right) \end{array} \]
            angle\_m = (fabs.f64 angle)
            angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
            (FPCore (angle_s a b angle_m)
             :precision binary64
             (*
              angle_s
              (*
               (- b a)
               (* (+ a b) (* 1.0 (* (sin (* 0.005555555555555556 (* angle_m PI))) 2.0))))))
            angle\_m = fabs(angle);
            angle\_s = copysign(1.0, angle);
            double code(double angle_s, double a, double b, double angle_m) {
            	return angle_s * ((b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * ((double) M_PI)))) * 2.0))));
            }
            
            angle\_m = Math.abs(angle);
            angle\_s = Math.copySign(1.0, angle);
            public static double code(double angle_s, double a, double b, double angle_m) {
            	return angle_s * ((b - a) * ((a + b) * (1.0 * (Math.sin((0.005555555555555556 * (angle_m * Math.PI))) * 2.0))));
            }
            
            angle\_m = math.fabs(angle)
            angle\_s = math.copysign(1.0, angle)
            def code(angle_s, a, b, angle_m):
            	return angle_s * ((b - a) * ((a + b) * (1.0 * (math.sin((0.005555555555555556 * (angle_m * math.pi))) * 2.0))))
            
            angle\_m = abs(angle)
            angle\_s = copysign(1.0, angle)
            function code(angle_s, a, b, angle_m)
            	return Float64(angle_s * Float64(Float64(b - a) * Float64(Float64(a + b) * Float64(1.0 * Float64(sin(Float64(0.005555555555555556 * Float64(angle_m * pi))) * 2.0)))))
            end
            
            angle\_m = abs(angle);
            angle\_s = sign(angle) * abs(1.0);
            function tmp = code(angle_s, a, b, angle_m)
            	tmp = angle_s * ((b - a) * ((a + b) * (1.0 * (sin((0.005555555555555556 * (angle_m * pi))) * 2.0))));
            end
            
            angle\_m = N[Abs[angle], $MachinePrecision]
            angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[(1.0 * N[(N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            angle\_m = \left|angle\right|
            \\
            angle\_s = \mathsf{copysign}\left(1, angle\right)
            
            \\
            angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \left(1 \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right) \cdot 2\right)\right)\right)\right)
            \end{array}
            
            Derivation
            1. Initial program 53.4%

              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            2. 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. lower-*.f64N/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) \]
              6. 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) \]
              7. 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) \]
              8. 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) \]
              9. 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) \]
              10. 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) \]
              11. 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) \]
              12. lower-*.f64N/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) \]
              13. lower-+.f64N/A

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

                \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
              15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 64.0% accurate, 3.9× speedup?

              \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 7.8 \cdot 10^{+73}:\\ \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle\_m \cdot \frac{\left(\left(a + b\right) \cdot \left(a - b\right)\right) \cdot b}{a - b}\right) \cdot \pi\right)\\ \end{array} \end{array} \]
              angle\_m = (fabs.f64 angle)
              angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
              (FPCore (angle_s a b angle_m)
               :precision binary64
               (*
                angle_s
                (if (<= angle_m 7.8e+73)
                  (* (- b a) (* 0.011111111111111112 (* angle_m (* PI (+ a b)))))
                  (*
                   0.011111111111111112
                   (* (* angle_m (/ (* (* (+ a b) (- a b)) b) (- a b))) PI)))))
              angle\_m = fabs(angle);
              angle\_s = copysign(1.0, angle);
              double code(double angle_s, double a, double b, double angle_m) {
              	double tmp;
              	if (angle_m <= 7.8e+73) {
              		tmp = (b - a) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (a + b))));
              	} else {
              		tmp = 0.011111111111111112 * ((angle_m * ((((a + b) * (a - b)) * b) / (a - b))) * ((double) M_PI));
              	}
              	return angle_s * tmp;
              }
              
              angle\_m = Math.abs(angle);
              angle\_s = Math.copySign(1.0, angle);
              public static double code(double angle_s, double a, double b, double angle_m) {
              	double tmp;
              	if (angle_m <= 7.8e+73) {
              		tmp = (b - a) * (0.011111111111111112 * (angle_m * (Math.PI * (a + b))));
              	} else {
              		tmp = 0.011111111111111112 * ((angle_m * ((((a + b) * (a - b)) * b) / (a - b))) * Math.PI);
              	}
              	return angle_s * tmp;
              }
              
              angle\_m = math.fabs(angle)
              angle\_s = math.copysign(1.0, angle)
              def code(angle_s, a, b, angle_m):
              	tmp = 0
              	if angle_m <= 7.8e+73:
              		tmp = (b - a) * (0.011111111111111112 * (angle_m * (math.pi * (a + b))))
              	else:
              		tmp = 0.011111111111111112 * ((angle_m * ((((a + b) * (a - b)) * b) / (a - b))) * math.pi)
              	return angle_s * tmp
              
              angle\_m = abs(angle)
              angle\_s = copysign(1.0, angle)
              function code(angle_s, a, b, angle_m)
              	tmp = 0.0
              	if (angle_m <= 7.8e+73)
              		tmp = Float64(Float64(b - a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(a + b)))));
              	else
              		tmp = Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64(Float64(Float64(Float64(a + b) * Float64(a - b)) * b) / Float64(a - b))) * pi));
              	end
              	return Float64(angle_s * tmp)
              end
              
              angle\_m = abs(angle);
              angle\_s = sign(angle) * abs(1.0);
              function tmp_2 = code(angle_s, a, b, angle_m)
              	tmp = 0.0;
              	if (angle_m <= 7.8e+73)
              		tmp = (b - a) * (0.011111111111111112 * (angle_m * (pi * (a + b))));
              	else
              		tmp = 0.011111111111111112 * ((angle_m * ((((a + b) * (a - b)) * b) / (a - b))) * pi);
              	end
              	tmp_2 = angle_s * tmp;
              end
              
              angle\_m = N[Abs[angle], $MachinePrecision]
              angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 7.8e+73], N[(N[(b - a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(angle$95$m * N[(N[(N[(N[(a + b), $MachinePrecision] * N[(a - b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
              
              \begin{array}{l}
              angle\_m = \left|angle\right|
              \\
              angle\_s = \mathsf{copysign}\left(1, angle\right)
              
              \\
              angle\_s \cdot \begin{array}{l}
              \mathbf{if}\;angle\_m \leq 7.8 \cdot 10^{+73}:\\
              \;\;\;\;\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;0.011111111111111112 \cdot \left(\left(angle\_m \cdot \frac{\left(\left(a + b\right) \cdot \left(a - b\right)\right) \cdot b}{a - b}\right) \cdot \pi\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if angle < 7.8000000000000002e73

                1. Initial program 53.4%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                2. 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. lower-*.f64N/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) \]
                  6. 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) \]
                  7. 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) \]
                  8. 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) \]
                  9. 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) \]
                  10. 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) \]
                  11. 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) \]
                  12. lower-*.f64N/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) \]
                  13. lower-+.f64N/A

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

                    \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
                  15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 7.8000000000000002e73 < angle

                1. Initial program 53.4%

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

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

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

                    \[\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. pow2N/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. pow2N/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. 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) \]
                  14. 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) \]
                  15. *-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) \]
                  16. lower-*.f6453.8

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                  17. 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) \]
                  18. +-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) \]
                  19. lower-+.f6453.8

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(\left(angle \cdot \frac{\left(\left(a + b\right) \cdot \left(a - b\right)\right) \cdot b}{a - b}\right) \cdot \pi\right) \]
                    12. lower--.f6437.3

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \frac{\left(\left(a + b\right) \cdot \left(a - b\right)\right) \cdot b}{a - b}\right) \cdot \pi\right) \]
                  3. Applied rewrites37.3%

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \frac{\left(\left(a + b\right) \cdot \left(a - b\right)\right) \cdot b}{a - b}\right) \cdot \pi\right) \]
                9. Recombined 2 regimes into one program.
                10. Add Preprocessing

                Alternative 10: 62.6% accurate, 6.6× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\right) \end{array} \]
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b angle_m)
                 :precision binary64
                 (* angle_s (* (- b a) (* 0.011111111111111112 (* angle_m (* PI (+ a b)))))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	return angle_s * ((b - a) * (0.011111111111111112 * (angle_m * (((double) M_PI) * (a + b)))));
                }
                
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b, double angle_m) {
                	return angle_s * ((b - a) * (0.011111111111111112 * (angle_m * (Math.PI * (a + b)))));
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	return angle_s * ((b - a) * (0.011111111111111112 * (angle_m * (math.pi * (a + b)))))
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	return Float64(angle_s * Float64(Float64(b - a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(a + b))))))
                end
                
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp = code(angle_s, a, b, angle_m)
                	tmp = angle_s * ((b - a) * (0.011111111111111112 * (angle_m * (pi * (a + b)))));
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b - a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\right)
                \end{array}
                
                Derivation
                1. Initial program 53.4%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                2. 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. lower-*.f64N/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) \]
                  6. 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) \]
                  7. 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) \]
                  8. 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) \]
                  9. 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) \]
                  10. 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) \]
                  11. 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) \]
                  12. lower-*.f64N/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) \]
                  13. lower-+.f64N/A

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

                    \[\leadsto \left(\left(\left(b + a\right) \cdot \color{blue}{\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) \]
                  15. lower-*.f6456.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 11: 62.6% accurate, 6.6× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(angle\_m \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \end{array} \]
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b angle_m)
                 :precision binary64
                 (* angle_s (* (* (* angle_m (+ a b)) (- b a)) (* PI 0.011111111111111112))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	return angle_s * (((angle_m * (a + b)) * (b - a)) * (((double) M_PI) * 0.011111111111111112));
                }
                
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b, double angle_m) {
                	return angle_s * (((angle_m * (a + b)) * (b - a)) * (Math.PI * 0.011111111111111112));
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	return angle_s * (((angle_m * (a + b)) * (b - a)) * (math.pi * 0.011111111111111112))
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	return Float64(angle_s * Float64(Float64(Float64(angle_m * Float64(a + b)) * Float64(b - a)) * Float64(pi * 0.011111111111111112)))
                end
                
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp = code(angle_s, a, b, angle_m)
                	tmp = angle_s * (((angle_m * (a + b)) * (b - a)) * (pi * 0.011111111111111112));
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(angle$95$m * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \left(\left(\left(angle\_m \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)
                \end{array}
                
                Derivation
                1. Initial program 53.4%

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

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

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

                    \[\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. pow2N/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. pow2N/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. 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) \]
                  14. 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) \]
                  15. *-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) \]
                  16. lower-*.f6453.8

                    \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                  17. 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) \]
                  18. +-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) \]
                  19. lower-+.f6453.8

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

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

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

                    \[\leadsto \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\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 \left(a + b\right)\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 \left(a + b\right)\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 \left(a + b\right)\right)\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                  8. *-commutativeN/A

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

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

                    \[\leadsto \left(\left(angle \cdot \left(a + b\right)\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 \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                  12. lower-*.f6462.6

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

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

                Alternative 12: 62.5% accurate, 6.6× speedup?

                \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\right) \end{array} \]
                angle\_m = (fabs.f64 angle)
                angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                (FPCore (angle_s a b angle_m)
                 :precision binary64
                 (* angle_s (* 0.011111111111111112 (* (* (* PI angle_m) (- b a)) (+ a b)))))
                angle\_m = fabs(angle);
                angle\_s = copysign(1.0, angle);
                double code(double angle_s, double a, double b, double angle_m) {
                	return angle_s * (0.011111111111111112 * (((((double) M_PI) * angle_m) * (b - a)) * (a + b)));
                }
                
                angle\_m = Math.abs(angle);
                angle\_s = Math.copySign(1.0, angle);
                public static double code(double angle_s, double a, double b, double angle_m) {
                	return angle_s * (0.011111111111111112 * (((Math.PI * angle_m) * (b - a)) * (a + b)));
                }
                
                angle\_m = math.fabs(angle)
                angle\_s = math.copysign(1.0, angle)
                def code(angle_s, a, b, angle_m):
                	return angle_s * (0.011111111111111112 * (((math.pi * angle_m) * (b - a)) * (a + b)))
                
                angle\_m = abs(angle)
                angle\_s = copysign(1.0, angle)
                function code(angle_s, a, b, angle_m)
                	return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(Float64(pi * angle_m) * Float64(b - a)) * Float64(a + b))))
                end
                
                angle\_m = abs(angle);
                angle\_s = sign(angle) * abs(1.0);
                function tmp = code(angle_s, a, b, angle_m)
                	tmp = angle_s * (0.011111111111111112 * (((pi * angle_m) * (b - a)) * (a + b)));
                end
                
                angle\_m = N[Abs[angle], $MachinePrecision]
                angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                angle\_m = \left|angle\right|
                \\
                angle\_s = \mathsf{copysign}\left(1, angle\right)
                
                \\
                angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\right)
                \end{array}
                
                Derivation
                1. Initial program 53.4%

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

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

                  \[\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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 13: 58.2% accurate, 1.2× speedup?

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

                  1. Initial program 53.4%

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

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

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

                      \[\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. pow2N/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. pow2N/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. 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) \]
                    14. 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) \]
                    15. *-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) \]
                    16. lower-*.f6453.8

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                    17. 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) \]
                    18. +-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) \]
                    19. lower-+.f6453.8

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

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

                  if 1.00000000000000001e160 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

                  1. Initial program 53.4%

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

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

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

                      \[\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. pow2N/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. pow2N/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. 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) \]
                    14. 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) \]
                    15. *-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) \]
                    16. lower-*.f6453.8

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                    17. 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) \]
                    18. +-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) \]
                    19. lower-+.f6453.8

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\left(angle \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                      12. lower-*.f6441.3

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

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

                  Alternative 14: 41.3% accurate, 7.7× speedup?

                  \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(angle\_m \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right) \end{array} \]
                  angle\_m = (fabs.f64 angle)
                  angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                  (FPCore (angle_s a b angle_m)
                   :precision binary64
                   (* angle_s (* (* (* angle_m (+ a b)) b) (* PI 0.011111111111111112))))
                  angle\_m = fabs(angle);
                  angle\_s = copysign(1.0, angle);
                  double code(double angle_s, double a, double b, double angle_m) {
                  	return angle_s * (((angle_m * (a + b)) * b) * (((double) M_PI) * 0.011111111111111112));
                  }
                  
                  angle\_m = Math.abs(angle);
                  angle\_s = Math.copySign(1.0, angle);
                  public static double code(double angle_s, double a, double b, double angle_m) {
                  	return angle_s * (((angle_m * (a + b)) * b) * (Math.PI * 0.011111111111111112));
                  }
                  
                  angle\_m = math.fabs(angle)
                  angle\_s = math.copysign(1.0, angle)
                  def code(angle_s, a, b, angle_m):
                  	return angle_s * (((angle_m * (a + b)) * b) * (math.pi * 0.011111111111111112))
                  
                  angle\_m = abs(angle)
                  angle\_s = copysign(1.0, angle)
                  function code(angle_s, a, b, angle_m)
                  	return Float64(angle_s * Float64(Float64(Float64(angle_m * Float64(a + b)) * b) * Float64(pi * 0.011111111111111112)))
                  end
                  
                  angle\_m = abs(angle);
                  angle\_s = sign(angle) * abs(1.0);
                  function tmp = code(angle_s, a, b, angle_m)
                  	tmp = angle_s * (((angle_m * (a + b)) * b) * (pi * 0.011111111111111112));
                  end
                  
                  angle\_m = N[Abs[angle], $MachinePrecision]
                  angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(angle$95$m * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  angle\_m = \left|angle\right|
                  \\
                  angle\_s = \mathsf{copysign}\left(1, angle\right)
                  
                  \\
                  angle\_s \cdot \left(\left(\left(angle\_m \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)
                  \end{array}
                  
                  Derivation
                  1. Initial program 53.4%

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

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

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

                      \[\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. pow2N/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. pow2N/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. 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) \]
                    14. 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) \]
                    15. *-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) \]
                    16. lower-*.f6453.8

                      \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                    17. 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) \]
                    18. +-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) \]
                    19. lower-+.f6453.8

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\left(angle \cdot \left(a + b\right)\right) \cdot b\right) \cdot \left(\pi \cdot \frac{1}{90}\right) \]
                      12. lower-*.f6441.3

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

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

                    Alternative 15: 41.3% accurate, 7.7× speedup?

                    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(\left(angle\_m \cdot \left(a + b\right)\right) \cdot b\right) \cdot \pi\right)\right) \end{array} \]
                    angle\_m = (fabs.f64 angle)
                    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                    (FPCore (angle_s a b angle_m)
                     :precision binary64
                     (* angle_s (* 0.011111111111111112 (* (* (* angle_m (+ a b)) b) PI))))
                    angle\_m = fabs(angle);
                    angle\_s = copysign(1.0, angle);
                    double code(double angle_s, double a, double b, double angle_m) {
                    	return angle_s * (0.011111111111111112 * (((angle_m * (a + b)) * b) * ((double) M_PI)));
                    }
                    
                    angle\_m = Math.abs(angle);
                    angle\_s = Math.copySign(1.0, angle);
                    public static double code(double angle_s, double a, double b, double angle_m) {
                    	return angle_s * (0.011111111111111112 * (((angle_m * (a + b)) * b) * Math.PI));
                    }
                    
                    angle\_m = math.fabs(angle)
                    angle\_s = math.copysign(1.0, angle)
                    def code(angle_s, a, b, angle_m):
                    	return angle_s * (0.011111111111111112 * (((angle_m * (a + b)) * b) * math.pi))
                    
                    angle\_m = abs(angle)
                    angle\_s = copysign(1.0, angle)
                    function code(angle_s, a, b, angle_m)
                    	return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(Float64(angle_m * Float64(a + b)) * b) * pi)))
                    end
                    
                    angle\_m = abs(angle);
                    angle\_s = sign(angle) * abs(1.0);
                    function tmp = code(angle_s, a, b, angle_m)
                    	tmp = angle_s * (0.011111111111111112 * (((angle_m * (a + b)) * b) * pi));
                    end
                    
                    angle\_m = N[Abs[angle], $MachinePrecision]
                    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                    code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(N[(angle$95$m * N[(a + b), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    angle\_m = \left|angle\right|
                    \\
                    angle\_s = \mathsf{copysign}\left(1, angle\right)
                    
                    \\
                    angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(\left(angle\_m \cdot \left(a + b\right)\right) \cdot b\right) \cdot \pi\right)\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 53.4%

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

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

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

                        \[\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. pow2N/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. pow2N/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. 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) \]
                      14. 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) \]
                      15. *-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) \]
                      16. lower-*.f6453.8

                        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                      17. 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) \]
                      18. +-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) \]
                      19. lower-+.f6453.8

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

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

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

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

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

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

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

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

                          \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(angle \cdot \left(a + b\right)\right) \cdot b\right) \cdot \pi\right) \]
                      3. Applied rewrites41.3%

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

                      Alternative 16: 40.1% accurate, 7.7× speedup?

                      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(b \cdot angle\_m\right) \cdot \left(\left(a + b\right) \cdot \pi\right)\right)\right) \end{array} \]
                      angle\_m = (fabs.f64 angle)
                      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                      (FPCore (angle_s a b angle_m)
                       :precision binary64
                       (* angle_s (* 0.011111111111111112 (* (* b angle_m) (* (+ a b) PI)))))
                      angle\_m = fabs(angle);
                      angle\_s = copysign(1.0, angle);
                      double code(double angle_s, double a, double b, double angle_m) {
                      	return angle_s * (0.011111111111111112 * ((b * angle_m) * ((a + b) * ((double) M_PI))));
                      }
                      
                      angle\_m = Math.abs(angle);
                      angle\_s = Math.copySign(1.0, angle);
                      public static double code(double angle_s, double a, double b, double angle_m) {
                      	return angle_s * (0.011111111111111112 * ((b * angle_m) * ((a + b) * Math.PI)));
                      }
                      
                      angle\_m = math.fabs(angle)
                      angle\_s = math.copysign(1.0, angle)
                      def code(angle_s, a, b, angle_m):
                      	return angle_s * (0.011111111111111112 * ((b * angle_m) * ((a + b) * math.pi)))
                      
                      angle\_m = abs(angle)
                      angle\_s = copysign(1.0, angle)
                      function code(angle_s, a, b, angle_m)
                      	return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(b * angle_m) * Float64(Float64(a + b) * pi))))
                      end
                      
                      angle\_m = abs(angle);
                      angle\_s = sign(angle) * abs(1.0);
                      function tmp = code(angle_s, a, b, angle_m)
                      	tmp = angle_s * (0.011111111111111112 * ((b * angle_m) * ((a + b) * pi)));
                      end
                      
                      angle\_m = N[Abs[angle], $MachinePrecision]
                      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(b * angle$95$m), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      angle\_m = \left|angle\right|
                      \\
                      angle\_s = \mathsf{copysign}\left(1, angle\right)
                      
                      \\
                      angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(b \cdot angle\_m\right) \cdot \left(\left(a + b\right) \cdot \pi\right)\right)\right)
                      \end{array}
                      
                      Derivation
                      1. Initial program 53.4%

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

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

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

                          \[\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. pow2N/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. pow2N/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. 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) \]
                        14. 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) \]
                        15. *-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) \]
                        16. lower-*.f6453.8

                          \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                        17. 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) \]
                        18. +-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) \]
                        19. lower-+.f6453.8

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 17: 37.0% accurate, 7.7× speedup?

                        \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(angle\_m \cdot \left(b \cdot \left(a + b\right)\right)\right) \cdot \pi\right)\right) \end{array} \]
                        angle\_m = (fabs.f64 angle)
                        angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
                        (FPCore (angle_s a b angle_m)
                         :precision binary64
                         (* angle_s (* 0.011111111111111112 (* (* angle_m (* b (+ a b))) PI))))
                        angle\_m = fabs(angle);
                        angle\_s = copysign(1.0, angle);
                        double code(double angle_s, double a, double b, double angle_m) {
                        	return angle_s * (0.011111111111111112 * ((angle_m * (b * (a + b))) * ((double) M_PI)));
                        }
                        
                        angle\_m = Math.abs(angle);
                        angle\_s = Math.copySign(1.0, angle);
                        public static double code(double angle_s, double a, double b, double angle_m) {
                        	return angle_s * (0.011111111111111112 * ((angle_m * (b * (a + b))) * Math.PI));
                        }
                        
                        angle\_m = math.fabs(angle)
                        angle\_s = math.copysign(1.0, angle)
                        def code(angle_s, a, b, angle_m):
                        	return angle_s * (0.011111111111111112 * ((angle_m * (b * (a + b))) * math.pi))
                        
                        angle\_m = abs(angle)
                        angle\_s = copysign(1.0, angle)
                        function code(angle_s, a, b, angle_m)
                        	return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(angle_m * Float64(b * Float64(a + b))) * pi)))
                        end
                        
                        angle\_m = abs(angle);
                        angle\_s = sign(angle) * abs(1.0);
                        function tmp = code(angle_s, a, b, angle_m)
                        	tmp = angle_s * (0.011111111111111112 * ((angle_m * (b * (a + b))) * pi));
                        end
                        
                        angle\_m = N[Abs[angle], $MachinePrecision]
                        angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                        code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(angle$95$m * N[(b * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                        
                        \begin{array}{l}
                        angle\_m = \left|angle\right|
                        \\
                        angle\_s = \mathsf{copysign}\left(1, angle\right)
                        
                        \\
                        angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(angle\_m \cdot \left(b \cdot \left(a + b\right)\right)\right) \cdot \pi\right)\right)
                        \end{array}
                        
                        Derivation
                        1. Initial program 53.4%

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

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

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

                            \[\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. pow2N/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. pow2N/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. 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) \]
                          14. 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) \]
                          15. *-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) \]
                          16. lower-*.f6453.8

                            \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right) \]
                          17. 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) \]
                          18. +-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) \]
                          19. lower-+.f6453.8

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

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

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

                          Reproduce

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