ab-angle->ABCF B

Percentage Accurate: 54.3% → 68.0%
Time: 10.5s
Alternatives: 24
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 24 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: 54.3% 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: 68.0% accurate, 0.5× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(-\sqrt[3]{-\left(\pi \cdot \pi\right) \cdot \pi}\right) \cdot 0.5\\ \left(b - a\_m\right) \cdot \left(\left(\left(b + a\_m\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot \left|angle\right|\right), \cos t\_0, \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \sin t\_0\right) \cdot 2\right)\right) \end{array} \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (let* ((t_0 (* (- (cbrt (- (* (* PI PI) PI)))) 0.5)))
   (*
    (- b a_m)
    (*
     (* (+ b a_m) (sin (* PI (* angle 0.005555555555555556))))
     (*
      (fma
       (sin (* (* -0.005555555555555556 PI) (fabs angle)))
       (cos t_0)
       (* (cos (* (* angle PI) -0.005555555555555556)) (sin t_0)))
      2.0)))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	double t_0 = -cbrt(-((((double) M_PI) * ((double) M_PI)) * ((double) M_PI))) * 0.5;
	return (b - a_m) * (((b + a_m) * sin((((double) M_PI) * (angle * 0.005555555555555556)))) * (fma(sin(((-0.005555555555555556 * ((double) M_PI)) * fabs(angle))), cos(t_0), (cos(((angle * ((double) M_PI)) * -0.005555555555555556)) * sin(t_0))) * 2.0));
}
a_m = abs(a)
function code(a_m, b, angle)
	t_0 = Float64(Float64(-cbrt(Float64(-Float64(Float64(pi * pi) * pi)))) * 0.5)
	return Float64(Float64(b - a_m) * Float64(Float64(Float64(b + a_m) * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) * Float64(fma(sin(Float64(Float64(-0.005555555555555556 * pi) * abs(angle))), cos(t_0), Float64(cos(Float64(Float64(angle * pi) * -0.005555555555555556)) * sin(t_0))) * 2.0)))
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[((-N[Power[(-N[(N[(Pi * Pi), $MachinePrecision] * Pi), $MachinePrecision]), 1/3], $MachinePrecision]) * 0.5), $MachinePrecision]}, N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(N[(b + a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(-0.005555555555555556 * Pi), $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision] + N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|

\\
\begin{array}{l}
t_0 := \left(-\sqrt[3]{-\left(\pi \cdot \pi\right) \cdot \pi}\right) \cdot 0.5\\
\left(b - a\_m\right) \cdot \left(\left(\left(b + a\_m\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot \left|angle\right|\right), \cos t\_0, \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \sin t\_0\right) \cdot 2\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\left(\frac{-1}{180} \cdot \pi\right) \cdot \left|angle\right|\right), \cos \left(\left(-\left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \cdot \frac{1}{2}\right), \cos \left(\left(angle \cdot \pi\right) \cdot \frac{-1}{180}\right) \cdot \sin \left(\left(-\left(-\pi\right)\right) \cdot \frac{1}{2}\right)\right) \cdot 2\right)\right) \]
    3. add-cbrt-cubeN/A

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

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

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

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot \left|angle\right|\right), \cos \left(\left(-\sqrt[3]{-\color{blue}{\left(\pi \cdot \pi\right)} \cdot \pi}\right) \cdot 0.5\right), \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \sin \left(\left(-\left(-\pi\right)\right) \cdot 0.5\right)\right) \cdot 2\right)\right) \]
  7. Applied rewrites67.8%

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \frac{1}{180}\right)\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\left(\frac{-1}{180} \cdot \pi\right) \cdot \left|angle\right|\right), \cos \left(\left(-\sqrt[3]{-\left(\pi \cdot \pi\right) \cdot \pi}\right) \cdot \frac{1}{2}\right), \cos \left(\left(angle \cdot \pi\right) \cdot \frac{-1}{180}\right) \cdot \sin \left(\left(-\left(\mathsf{neg}\left(\color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \cdot \frac{1}{2}\right)\right) \cdot 2\right)\right) \]
    3. add-cbrt-cubeN/A

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

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

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

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot \left|angle\right|\right), \cos \left(\left(-\sqrt[3]{-\left(\pi \cdot \pi\right) \cdot \pi}\right) \cdot 0.5\right), \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \sin \left(\left(-\sqrt[3]{-\color{blue}{\left(\pi \cdot \pi\right)} \cdot \pi}\right) \cdot 0.5\right)\right) \cdot 2\right)\right) \]
  9. Applied rewrites67.8%

    \[\leadsto \left(b - a\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\mathsf{fma}\left(\sin \left(\left(-0.005555555555555556 \cdot \pi\right) \cdot \left|angle\right|\right), \cos \left(\left(-\sqrt[3]{-\left(\pi \cdot \pi\right) \cdot \pi}\right) \cdot 0.5\right), \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \sin \left(\left(-\color{blue}{\sqrt[3]{-\left(\pi \cdot \pi\right) \cdot \pi}}\right) \cdot 0.5\right)\right) \cdot 2\right)\right) \]
  10. Add Preprocessing

Alternative 2: 67.9% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ \left(b - a\_m\right) \cdot \left(\left(\left(b + a\_m\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot 2\right)\right) \end{array} \]
a_m = (fabs.f64 a)
(FPCore (a_m b angle)
 :precision binary64
 (*
  (- b a_m)
  (*
   (* (+ b a_m) (sin (* PI (* angle 0.005555555555555556))))
   (* (cos (* -0.005555555555555556 (* PI angle))) 2.0))))
a_m = fabs(a);
double code(double a_m, double b, double angle) {
	return (b - a_m) * (((b + a_m) * sin((((double) M_PI) * (angle * 0.005555555555555556)))) * (cos((-0.005555555555555556 * (((double) M_PI) * angle))) * 2.0));
}
a_m = Math.abs(a);
public static double code(double a_m, double b, double angle) {
	return (b - a_m) * (((b + a_m) * Math.sin((Math.PI * (angle * 0.005555555555555556)))) * (Math.cos((-0.005555555555555556 * (Math.PI * angle))) * 2.0));
}
a_m = math.fabs(a)
def code(a_m, b, angle):
	return (b - a_m) * (((b + a_m) * math.sin((math.pi * (angle * 0.005555555555555556)))) * (math.cos((-0.005555555555555556 * (math.pi * angle))) * 2.0))
a_m = abs(a)
function code(a_m, b, angle)
	return Float64(Float64(b - a_m) * Float64(Float64(Float64(b + a_m) * sin(Float64(pi * Float64(angle * 0.005555555555555556)))) * Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle))) * 2.0)))
end
a_m = abs(a);
function tmp = code(a_m, b, angle)
	tmp = (b - a_m) * (((b + a_m) * sin((pi * (angle * 0.005555555555555556)))) * (cos((-0.005555555555555556 * (pi * angle))) * 2.0));
end
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b_, angle_] := N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(N[(b + a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|

\\
\left(b - a\_m\right) \cdot \left(\left(\left(b + a\_m\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot 2\right)\right)
\end{array}
Derivation
  1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.9% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;angle \leq 1.86 \cdot 10^{+171}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\

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


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

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8599999999999999e171 < angle

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 67.9% accurate, 2.1× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2e133 < angle

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 67.9% accurate, 1.3× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\ \left(\left(\sin t\_0 \cdot \left(a\_m + b\right)\right) \cdot \left(b - a\_m\right)\right) \cdot \left(\cos t\_0 \cdot 2\right) \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (let* ((t_0 (* (* 0.005555555555555556 angle) PI)))
       (* (* (* (sin t_0) (+ a_m b)) (- b a_m)) (* (cos t_0) 2.0))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double t_0 = (0.005555555555555556 * angle) * ((double) M_PI);
    	return ((sin(t_0) * (a_m + b)) * (b - a_m)) * (cos(t_0) * 2.0);
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	double t_0 = (0.005555555555555556 * angle) * Math.PI;
    	return ((Math.sin(t_0) * (a_m + b)) * (b - a_m)) * (Math.cos(t_0) * 2.0);
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	t_0 = (0.005555555555555556 * angle) * math.pi
    	return ((math.sin(t_0) * (a_m + b)) * (b - a_m)) * (math.cos(t_0) * 2.0)
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	t_0 = Float64(Float64(0.005555555555555556 * angle) * pi)
    	return Float64(Float64(Float64(sin(t_0) * Float64(a_m + b)) * Float64(b - a_m)) * Float64(cos(t_0) * 2.0))
    end
    
    a_m = abs(a);
    function tmp = code(a_m, b, angle)
    	t_0 = (0.005555555555555556 * angle) * pi;
    	tmp = ((sin(t_0) * (a_m + b)) * (b - a_m)) * (cos(t_0) * 2.0);
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]}, N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(a$95$m + b), $MachinePrecision]), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    t_0 := \left(0.005555555555555556 \cdot angle\right) \cdot \pi\\
    \left(\left(\sin t\_0 \cdot \left(a\_m + b\right)\right) \cdot \left(b - a\_m\right)\right) \cdot \left(\cos t\_0 \cdot 2\right)
    \end{array}
    \end{array}
    
    Derivation
    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

    Alternative 6: 67.8% accurate, 2.2× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.50000000000000001e-28 < angle

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 67.8% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 65.3% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 63.6% accurate, 4.3× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.0000000000000001e47 < angle

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b + \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right)\right)\right)\right) \]
        10. distribute-lft-inN/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(b + a, b, \left(b + a\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right)\right)\right) \]
        19. lower-neg.f6453.7

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(b + a, b, \left(b + a\right) \cdot \left(-a\right)\right)\right)\right) \]
      6. Applied rewrites53.7%

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

    Alternative 10: 63.6% accurate, 5.3× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.99999999999999997e73 < angle

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(b, b, \mathsf{neg}\left({a}^{2}\right)\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(b, b, \mathsf{neg}\left(a \cdot a\right)\right)\right)\right) \]
        8. distribute-lft-neg-inN/A

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(b, b, \left(\mathsf{neg}\left(a\right)\right) \cdot a\right)\right)\right) \]
        10. lower-neg.f6453.7

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right)\right)\right) \]
      6. Applied rewrites53.7%

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

    Alternative 11: 63.5% accurate, 5.5× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.59999999999999991e-28 < angle

      1. Initial program 54.3%

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

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

        \[\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 \color{blue}{\left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        2. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 63.5% accurate, 5.5× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.59999999999999991e-28 < angle

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 63.5% accurate, 5.5× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.9999999999999998e-167 < a

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 63.0% accurate, 5.5× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.9999999999999998e-167 < a

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 63.0% accurate, 5.5× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.9999999999999998e-167 < a

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(\left(b - a\right) \cdot \left(\left(angle \cdot \left(a + b\right)\right) \cdot \pi\right)\right) \]
        12. lift-+.f6462.7

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

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

    Alternative 16: 63.0% accurate, 5.5× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.50000000000000001e-28 < angle

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 17: 63.0% accurate, 5.5× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.9999999999999998e-167 < a

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 18: 62.7% accurate, 6.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 19: 61.1% accurate, 2.1× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \]
      9. Applied rewrites40.5%

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

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(-1 \cdot a\right) \cdot \left(\color{blue}{a} \cdot angle\right)\right)\right) \]
      11. Step-by-step derivation
        1. lower-*.f6438.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(-1 \cdot a\right) \cdot \left(a \cdot angle\right)\right)\right) \]
      12. Applied rewrites38.7%

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

      if -1.0000000000000001e-250 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{b}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot b\right)\right)\right) \]
      9. Applied rewrites40.5%

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

    Alternative 20: 61.1% accurate, 2.1× speedup?

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

      1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
        16. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        17. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        18. lower-*.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
        19. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
        20. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
        21. lower-+.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      6. Applied rewrites62.7%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
      7. Taylor expanded in a around inf

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \]
      9. Applied rewrites40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
        3. lift-*.f64N/A

          \[\leadsto \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \cdot \frac{1}{90} \]
        4. lift-*.f64N/A

          \[\leadsto \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \cdot \frac{1}{90} \]
        5. associate-*r*N/A

          \[\leadsto \left(\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a \cdot angle\right)\right) \cdot \frac{1}{90} \]
        6. associate-*l*N/A

          \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(\left(a \cdot angle\right) \cdot \frac{1}{90}\right)} \]
        7. lower-*.f64N/A

          \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(\left(a \cdot angle\right) \cdot \frac{1}{90}\right)} \]
        8. lower-*.f64N/A

          \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \left(\color{blue}{\left(a \cdot angle\right)} \cdot \frac{1}{90}\right) \]
        9. lower-*.f6440.7

          \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \left(\left(a \cdot angle\right) \cdot \color{blue}{0.011111111111111112}\right) \]
        10. lift-*.f64N/A

          \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \left(\left(a \cdot angle\right) \cdot \frac{1}{90}\right) \]
        11. *-commutativeN/A

          \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \left(\left(angle \cdot a\right) \cdot \frac{1}{90}\right) \]
        12. lower-*.f6440.7

          \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \left(\left(angle \cdot a\right) \cdot 0.011111111111111112\right) \]
      11. Applied rewrites40.7%

        \[\leadsto \left(\pi \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(\left(angle \cdot a\right) \cdot 0.011111111111111112\right)} \]

      if -1.0000000000000001e-250 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

      1. Initial program 54.3%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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.f6451.0

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
      4. Applied rewrites51.0%

        \[\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. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        6. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        7. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        8. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        9. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)\right) \]
        11. difference-of-squares-revN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        13. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        14. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
        16. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        17. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        18. lower-*.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
        19. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
        20. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
        21. lower-+.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      6. Applied rewrites62.7%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
      7. Taylor expanded in a around 0

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{b}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot b\right)\right)\right) \]
      9. Applied rewrites40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{b}\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 21: 61.1% accurate, 2.1× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-250}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b - a\_m\right) \cdot \left(\left(angle \cdot a\_m\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot b\right)\right)\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -1e-250)
       (* 0.011111111111111112 (* (- b a_m) (* (* angle a_m) PI)))
       (* 0.011111111111111112 (* PI (* (- b a_m) (* angle b))))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double tmp;
    	if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -1e-250) {
    		tmp = 0.011111111111111112 * ((b - a_m) * ((angle * a_m) * ((double) M_PI)));
    	} else {
    		tmp = 0.011111111111111112 * (((double) M_PI) * ((b - a_m) * (angle * b)));
    	}
    	return tmp;
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	double tmp;
    	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -1e-250) {
    		tmp = 0.011111111111111112 * ((b - a_m) * ((angle * a_m) * Math.PI));
    	} else {
    		tmp = 0.011111111111111112 * (Math.PI * ((b - a_m) * (angle * b)));
    	}
    	return tmp;
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	tmp = 0
    	if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -1e-250:
    		tmp = 0.011111111111111112 * ((b - a_m) * ((angle * a_m) * math.pi))
    	else:
    		tmp = 0.011111111111111112 * (math.pi * ((b - a_m) * (angle * b)))
    	return tmp
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	tmp = 0.0
    	if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -1e-250)
    		tmp = Float64(0.011111111111111112 * Float64(Float64(b - a_m) * Float64(Float64(angle * a_m) * pi)));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a_m) * Float64(angle * b))));
    	end
    	return tmp
    end
    
    a_m = abs(a);
    function tmp_2 = code(a_m, b, angle)
    	tmp = 0.0;
    	if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -1e-250)
    		tmp = 0.011111111111111112 * ((b - a_m) * ((angle * a_m) * pi));
    	else
    		tmp = 0.011111111111111112 * (pi * ((b - a_m) * (angle * b)));
    	end
    	tmp_2 = tmp;
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-250], N[(0.011111111111111112 * N[(N[(b - a$95$m), $MachinePrecision] * N[(N[(angle * a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(Pi * N[(N[(b - a$95$m), $MachinePrecision] * N[(angle * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-250}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(b - a\_m\right) \cdot \left(\left(angle \cdot a\_m\right) \cdot \pi\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot b\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.0000000000000001e-250

      1. Initial program 54.3%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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.f6451.0

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
      4. Applied rewrites51.0%

        \[\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. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        6. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        7. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        8. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        9. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)\right) \]
        11. difference-of-squares-revN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        13. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        14. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
        16. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        17. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        18. lower-*.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
        19. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
        20. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
        21. lower-+.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      6. Applied rewrites62.7%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
      7. Taylor expanded in a around inf

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \]
      9. Applied rewrites40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)}\right) \]
        2. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right) \cdot \color{blue}{\pi}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right) \cdot \pi\right) \]
        4. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a \cdot angle\right) \cdot \pi\right)}\right) \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a \cdot angle\right) \cdot \pi\right)}\right) \]
        6. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\left(b - a\right) \cdot \left(\left(a \cdot angle\right) \cdot \color{blue}{\pi}\right)\right) \]
        7. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(b - a\right) \cdot \left(\left(a \cdot angle\right) \cdot \pi\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(b - a\right) \cdot \left(\left(angle \cdot a\right) \cdot \pi\right)\right) \]
        9. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\left(b - a\right) \cdot \left(\left(angle \cdot a\right) \cdot \pi\right)\right) \]
      11. Applied rewrites40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(angle \cdot a\right) \cdot \pi\right)}\right) \]

      if -1.0000000000000001e-250 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

      1. Initial program 54.3%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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.f6451.0

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
      4. Applied rewrites51.0%

        \[\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. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        6. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        7. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        8. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        9. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)\right) \]
        11. difference-of-squares-revN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        13. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        14. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
        16. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        17. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        18. lower-*.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
        19. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
        20. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
        21. lower-+.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      6. Applied rewrites62.7%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
      7. Taylor expanded in a around 0

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{b}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot b\right)\right)\right) \]
      9. Applied rewrites40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{b}\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 22: 61.1% accurate, 2.1× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-250}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot b\right)\right)\right)\\ \end{array} \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (if (<= (* 2.0 (- (pow b 2.0) (pow a_m 2.0))) -1e-250)
       (* 0.011111111111111112 (* PI (* (- b a_m) (* a_m angle))))
       (* 0.011111111111111112 (* PI (* (- b a_m) (* angle b))))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	double tmp;
    	if ((2.0 * (pow(b, 2.0) - pow(a_m, 2.0))) <= -1e-250) {
    		tmp = 0.011111111111111112 * (((double) M_PI) * ((b - a_m) * (a_m * angle)));
    	} else {
    		tmp = 0.011111111111111112 * (((double) M_PI) * ((b - a_m) * (angle * b)));
    	}
    	return tmp;
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	double tmp;
    	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a_m, 2.0))) <= -1e-250) {
    		tmp = 0.011111111111111112 * (Math.PI * ((b - a_m) * (a_m * angle)));
    	} else {
    		tmp = 0.011111111111111112 * (Math.PI * ((b - a_m) * (angle * b)));
    	}
    	return tmp;
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	tmp = 0
    	if (2.0 * (math.pow(b, 2.0) - math.pow(a_m, 2.0))) <= -1e-250:
    		tmp = 0.011111111111111112 * (math.pi * ((b - a_m) * (a_m * angle)))
    	else:
    		tmp = 0.011111111111111112 * (math.pi * ((b - a_m) * (angle * b)))
    	return tmp
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	tmp = 0.0
    	if (Float64(2.0 * Float64((b ^ 2.0) - (a_m ^ 2.0))) <= -1e-250)
    		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a_m) * Float64(a_m * angle))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a_m) * Float64(angle * b))));
    	end
    	return tmp
    end
    
    a_m = abs(a);
    function tmp_2 = code(a_m, b, angle)
    	tmp = 0.0;
    	if ((2.0 * ((b ^ 2.0) - (a_m ^ 2.0))) <= -1e-250)
    		tmp = 0.011111111111111112 * (pi * ((b - a_m) * (a_m * angle)));
    	else
    		tmp = 0.011111111111111112 * (pi * ((b - a_m) * (angle * b)));
    	end
    	tmp_2 = tmp;
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e-250], N[(0.011111111111111112 * N[(Pi * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(Pi * N[(N[(b - a$95$m), $MachinePrecision] * N[(angle * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    \begin{array}{l}
    \mathbf{if}\;2 \cdot \left({b}^{2} - {a\_m}^{2}\right) \leq -1 \cdot 10^{-250}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m \cdot angle\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(angle \cdot b\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -1.0000000000000001e-250

      1. Initial program 54.3%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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.f6451.0

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
      4. Applied rewrites51.0%

        \[\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. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        6. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        7. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        8. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        9. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)\right) \]
        11. difference-of-squares-revN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        13. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        14. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
        16. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        17. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        18. lower-*.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
        19. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
        20. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
        21. lower-+.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      6. Applied rewrites62.7%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
      7. Taylor expanded in a around inf

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \]
      9. Applied rewrites40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]

      if -1.0000000000000001e-250 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

      1. Initial program 54.3%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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.f6451.0

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
      4. Applied rewrites51.0%

        \[\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. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        5. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
        6. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        7. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
        8. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        9. lift-pow.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
        10. unpow2N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)\right) \]
        11. difference-of-squares-revN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        12. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        13. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        14. lift--.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
        16. associate-*l*N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        17. lower-*.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
        18. lower-*.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
        19. lift-+.f64N/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
        20. +-commutativeN/A

          \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
        21. lower-+.f6462.7

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      6. Applied rewrites62.7%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
      7. Taylor expanded in a around 0

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{b}\right)\right)\right) \]
      8. Step-by-step derivation
        1. lower-*.f6440.5

          \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot b\right)\right)\right) \]
      9. Applied rewrites40.5%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{b}\right)\right)\right) \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 23: 40.5% accurate, 7.8× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m \cdot angle\right)\right)\right) \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (* 0.011111111111111112 (* PI (* (- b a_m) (* a_m angle)))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (((double) M_PI) * ((b - a_m) * (a_m * angle)));
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (Math.PI * ((b - a_m) * (a_m * angle)));
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	return 0.011111111111111112 * (math.pi * ((b - a_m) * (a_m * angle)))
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	return Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a_m) * Float64(a_m * angle))))
    end
    
    a_m = abs(a);
    function tmp = code(a_m, b, angle)
    	tmp = 0.011111111111111112 * (pi * ((b - a_m) * (a_m * angle)));
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(Pi * N[(N[(b - a$95$m), $MachinePrecision] * N[(a$95$m * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\_m\right) \cdot \left(a\_m \cdot angle\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 54.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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.f6451.0

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
    4. Applied rewrites51.0%

      \[\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. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
      3. lift-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot angle\right) \]
      4. associate-*l*N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
      6. lift--.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
      8. unpow2N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
      9. lift-pow.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
      10. unpow2N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)\right) \]
      11. difference-of-squares-revN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      13. lift-+.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      14. lift--.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
      16. associate-*l*N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
      17. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
      18. lower-*.f6462.7

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
      19. lift-+.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
      20. +-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      21. lower-+.f6462.7

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
    6. Applied rewrites62.7%

      \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
    7. Taylor expanded in a around inf

      \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
    8. Step-by-step derivation
      1. lower-*.f6440.5

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \]
    9. Applied rewrites40.5%

      \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
    10. Add Preprocessing

    Alternative 24: 20.4% accurate, 9.4× speedup?

    \[\begin{array}{l} a_m = \left|a\right| \\ 0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(a\_m \cdot angle\right)\right)\right) \end{array} \]
    a_m = (fabs.f64 a)
    (FPCore (a_m b angle)
     :precision binary64
     (* 0.011111111111111112 (* PI (* b (* a_m angle)))))
    a_m = fabs(a);
    double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (((double) M_PI) * (b * (a_m * angle)));
    }
    
    a_m = Math.abs(a);
    public static double code(double a_m, double b, double angle) {
    	return 0.011111111111111112 * (Math.PI * (b * (a_m * angle)));
    }
    
    a_m = math.fabs(a)
    def code(a_m, b, angle):
    	return 0.011111111111111112 * (math.pi * (b * (a_m * angle)))
    
    a_m = abs(a)
    function code(a_m, b, angle)
    	return Float64(0.011111111111111112 * Float64(pi * Float64(b * Float64(a_m * angle))))
    end
    
    a_m = abs(a);
    function tmp = code(a_m, b, angle)
    	tmp = 0.011111111111111112 * (pi * (b * (a_m * angle)));
    end
    
    a_m = N[Abs[a], $MachinePrecision]
    code[a$95$m_, b_, angle_] := N[(0.011111111111111112 * N[(Pi * N[(b * N[(a$95$m * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    a_m = \left|a\right|
    
    \\
    0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(a\_m \cdot angle\right)\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 54.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. 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.f6451.0

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{\color{blue}{2}}\right)\right)\right) \]
    4. Applied rewrites51.0%

      \[\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. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \color{blue}{angle}\right) \]
      3. lift-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot angle\right) \]
      4. associate-*l*N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
      5. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)}\right) \]
      6. lift--.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
      7. lift-pow.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot angle\right)\right) \]
      8. unpow2N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
      9. lift-pow.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - {a}^{2}\right) \cdot angle\right)\right) \]
      10. unpow2N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b \cdot b - a \cdot a\right) \cdot angle\right)\right) \]
      11. difference-of-squares-revN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      12. +-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      13. lift-+.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      14. lift--.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot angle\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot angle\right)\right) \]
      16. associate-*l*N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
      17. lower-*.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot angle\right)}\right)\right) \]
      18. lower-*.f6462.7

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \color{blue}{angle}\right)\right)\right) \]
      19. lift-+.f64N/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot angle\right)\right)\right) \]
      20. +-commutativeN/A

        \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
      21. lower-+.f6462.7

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)\right) \]
    6. Applied rewrites62.7%

      \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot angle\right)\right)}\right) \]
    7. Taylor expanded in a around inf

      \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
    8. Step-by-step derivation
      1. lower-*.f6440.5

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot angle\right)\right)\right) \]
    9. Applied rewrites40.5%

      \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(a \cdot \color{blue}{angle}\right)\right)\right) \]
    10. Taylor expanded in a around 0

      \[\leadsto \frac{1}{90} \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{a} \cdot angle\right)\right)\right) \]
    11. Step-by-step derivation
      1. Applied rewrites20.4%

        \[\leadsto 0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{a} \cdot angle\right)\right)\right) \]
      2. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025150 
      (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)))))