ab-angle->ABCF B

Percentage Accurate: 54.4% → 67.3%
Time: 6.9s
Alternatives: 20
Speedup: 13.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 54.4% accurate, 1.0× speedup?

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

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

Alternative 1: 67.3% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\ \mathbf{if}\;angle \leq 4.1 \cdot 10^{+83}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(-\pi\right) + \frac{\pi}{2}\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{\pi}{angle}, 0.5, 0.005555555555555556 \cdot \pi\right) \cdot angle\right)\right) \cdot t\_0\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0
         (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a))))
   (if (<= angle 4.1e+83)
     (*
      (* 2.0 (sin (+ (* (* 0.005555555555555556 angle) (- PI)) (/ PI 2.0))))
      t_0)
     (*
      (*
       2.0
       (sin (* (fma (/ PI angle) 0.5 (* 0.005555555555555556 PI)) angle)))
      t_0))))
double code(double a, double b, double angle) {
	double t_0 = (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a);
	double tmp;
	if (angle <= 4.1e+83) {
		tmp = (2.0 * sin((((0.005555555555555556 * angle) * -((double) M_PI)) + (((double) M_PI) / 2.0)))) * t_0;
	} else {
		tmp = (2.0 * sin((fma((((double) M_PI) / angle), 0.5, (0.005555555555555556 * ((double) M_PI))) * angle))) * t_0;
	}
	return tmp;
}
function code(a, b, angle)
	t_0 = Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a))
	tmp = 0.0
	if (angle <= 4.1e+83)
		tmp = Float64(Float64(2.0 * sin(Float64(Float64(Float64(0.005555555555555556 * angle) * Float64(-pi)) + Float64(pi / 2.0)))) * t_0);
	else
		tmp = Float64(Float64(2.0 * sin(Float64(fma(Float64(pi / angle), 0.5, Float64(0.005555555555555556 * pi)) * angle))) * t_0);
	end
	return tmp
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 4.1e+83], N[(N[(2.0 * N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * (-Pi)), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(2.0 * N[Sin[N[(N[(N[(Pi / angle), $MachinePrecision] * 0.5 + N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{\pi}{angle}, 0.5, 0.005555555555555556 \cdot \pi\right) \cdot angle\right)\right) \cdot t\_0\\


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

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \sin \left(\left(-\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      17. lift-PI.f6479.6

        \[\leadsto \left(2 \cdot \sin \left(\left(-\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) + \frac{\pi}{2}\right)\right) \cdot \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) \]
    9. Applied rewrites79.6%

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

    if 4.1000000000000001e83 < angle

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      20. lift-PI.f6440.4

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \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) \]
    9. Applied rewrites40.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{\pi}{angle}, \frac{1}{2}, \frac{1}{180} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
      9. lift-PI.f6441.1

        \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{\pi}{angle}, 0.5, 0.005555555555555556 \cdot \pi\right) \cdot angle\right)\right) \cdot \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) \]
    12. Applied rewrites41.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 4.1 \cdot 10^{+83}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(-\pi\right) + \frac{\pi}{2}\right)\right) \cdot \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)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{\pi}{angle}, 0.5, 0.005555555555555556 \cdot \pi\right) \cdot angle\right)\right) \cdot \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)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 65.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle}{180}\\ t_1 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+294}\right):\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (/ angle 180.0)))
        (t_1 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+294)))
     (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)
     (*
      2.0
      (* (sin (* (* PI angle) 0.005555555555555556)) (* (+ b a) (- b a)))))))
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle / 180.0);
	double t_1 = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+294)) {
		tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (sin(((((double) M_PI) * angle) * 0.005555555555555556)) * ((b + a) * (b - a)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle / 180.0);
	double t_1 = ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0);
	double tmp;
	if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+294)) {
		tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (Math.sin(((Math.PI * angle) * 0.005555555555555556)) * ((b + a) * (b - a)));
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = math.pi * (angle / 180.0)
	t_1 = ((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)
	tmp = 0
	if (t_1 <= -math.inf) or not (t_1 <= 5e+294):
		tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112
	else:
		tmp = 2.0 * (math.sin(((math.pi * angle) * 0.005555555555555556)) * ((b + a) * (b - a)))
	return tmp
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle / 180.0))
	t_1 = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+294))
		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(pi * angle) * 0.005555555555555556)) * Float64(Float64(b + a) * Float64(b - a))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = pi * (angle / 180.0);
	t_1 = ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0);
	tmp = 0.0;
	if ((t_1 <= -Inf) || ~((t_1 <= 5e+294)))
		tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112;
	else
		tmp = 2.0 * (sin(((pi * angle) * 0.005555555555555556)) * ((b + a) * (b - a)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = 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]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+294]], $MachinePrecision]], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \pi \cdot \frac{angle}{180}\\
t_1 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+294}\right):\\
\;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\

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


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

    1. Initial program 41.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
    8. Applied rewrites60.7%

      \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, \left(-a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
    9. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
    11. Applied rewrites77.9%

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

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

    1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -\infty \lor \neg \left(\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) \leq 5 \cdot 10^{+294}\right):\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 37.8% accurate, 0.9× speedup?

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

      1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
        13. lower--.f6447.0

          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
      5. Applied rewrites47.0%

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        7. lift-PI.f6421.5

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
      8. Applied rewrites21.5%

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

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

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

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

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

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
      10. Applied rewrites21.5%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        12. lift-*.f6434.1

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

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

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

      1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        7. lift-PI.f6443.0

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
      8. Applied rewrites43.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{-1}{90} \]
        15. lift-PI.f6443.0

          \[\leadsto \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \pi\right) \cdot -0.011111111111111112 \]
      10. Applied rewrites43.0%

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

    Alternative 4: 58.2% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\ \mathbf{if}\;t\_0 \leq -4 \cdot 10^{-286} \lor \neg \left(t\_0 \leq \infty\right):\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (let* ((t_0 (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
       (if (or (<= t_0 -4e-286) (not (<= t_0 INFINITY)))
         (* (* -0.011111111111111112 a) (* (* angle PI) a))
         (* (* (* PI (* b b)) angle) 0.011111111111111112))))
    double code(double a, double b, double angle) {
    	double t_0 = 2.0 * (pow(b, 2.0) - pow(a, 2.0));
    	double tmp;
    	if ((t_0 <= -4e-286) || !(t_0 <= ((double) INFINITY))) {
    		tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
    	} else {
    		tmp = ((((double) M_PI) * (b * b)) * angle) * 0.011111111111111112;
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double t_0 = 2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0));
    	double tmp;
    	if ((t_0 <= -4e-286) || !(t_0 <= Double.POSITIVE_INFINITY)) {
    		tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
    	} else {
    		tmp = ((Math.PI * (b * b)) * angle) * 0.011111111111111112;
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	t_0 = 2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))
    	tmp = 0
    	if (t_0 <= -4e-286) or not (t_0 <= math.inf):
    		tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a)
    	else:
    		tmp = ((math.pi * (b * b)) * angle) * 0.011111111111111112
    	return tmp
    
    function code(a, b, angle)
    	t_0 = Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0)))
    	tmp = 0.0
    	if ((t_0 <= -4e-286) || !(t_0 <= Inf))
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a));
    	else
    		tmp = Float64(Float64(Float64(pi * Float64(b * b)) * angle) * 0.011111111111111112);
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	t_0 = 2.0 * ((b ^ 2.0) - (a ^ 2.0));
    	tmp = 0.0;
    	if ((t_0 <= -4e-286) || ~((t_0 <= Inf)))
    		tmp = (-0.011111111111111112 * a) * ((angle * pi) * a);
    	else
    		tmp = ((pi * (b * b)) * angle) * 0.011111111111111112;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -4e-286], N[Not[LessEqual[t$95$0, Infinity]], $MachinePrecision]], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := 2 \cdot \left({b}^{2} - {a}^{2}\right)\\
    \mathbf{if}\;t\_0 \leq -4 \cdot 10^{-286} \lor \neg \left(t\_0 \leq \infty\right):\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
    
    
    \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)))) < -4.0000000000000002e-286 or +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

      1. Initial program 45.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        7. lift-PI.f6452.6

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

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

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

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

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

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        5. lower-*.f6452.7

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
      10. Applied rewrites52.7%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        12. lift-*.f6465.3

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
      12. Applied rewrites65.3%

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

      if -4.0000000000000002e-286 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < +inf.0

      1. Initial program 62.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
      8. Applied rewrites62.1%

        \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
    3. Recombined 2 regimes into one program.
    4. Final simplification63.6%

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

    Alternative 5: 67.1% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\ \mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(-\pi\right) + \frac{\pi}{2}\right)\right) \cdot \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)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\right) \cdot 2\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (let* ((t_0 (* (* angle PI) 0.005555555555555556)))
       (if (<= angle 6.6e+84)
         (*
          (* 2.0 (sin (+ (* (* 0.005555555555555556 angle) (- PI)) (/ PI 2.0))))
          (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a)))
         (* (* (* (* (sin (fma 0.5 PI t_0)) (+ a b)) (- b a)) (sin t_0)) 2.0))))
    double code(double a, double b, double angle) {
    	double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
    	double tmp;
    	if (angle <= 6.6e+84) {
    		tmp = (2.0 * sin((((0.005555555555555556 * angle) * -((double) M_PI)) + (((double) M_PI) / 2.0)))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
    	} else {
    		tmp = (((sin(fma(0.5, ((double) M_PI), t_0)) * (a + b)) * (b - a)) * sin(t_0)) * 2.0;
    	}
    	return tmp;
    }
    
    function code(a, b, angle)
    	t_0 = Float64(Float64(angle * pi) * 0.005555555555555556)
    	tmp = 0.0
    	if (angle <= 6.6e+84)
    		tmp = Float64(Float64(2.0 * sin(Float64(Float64(Float64(0.005555555555555556 * angle) * Float64(-pi)) + Float64(pi / 2.0)))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a)));
    	else
    		tmp = Float64(Float64(Float64(Float64(sin(fma(0.5, pi, t_0)) * Float64(a + b)) * Float64(b - a)) * sin(t_0)) * 2.0);
    	end
    	return tmp
    end
    
    code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 6.6e+84], N[(N[(2.0 * N[Sin[N[(N[(N[(0.005555555555555556 * angle), $MachinePrecision] * (-Pi)), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
    \mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\
    \;\;\;\;\left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(-\pi\right) + \frac{\pi}{2}\right)\right) \cdot \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)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\right) \cdot 2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 6.60000000000000034e84

      1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \sin \left(\left(-\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) + \frac{\mathsf{PI}\left(\right)}{2}\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        17. lift-PI.f6479.6

          \[\leadsto \left(2 \cdot \sin \left(\left(-\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) + \frac{\pi}{2}\right)\right) \cdot \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) \]
      9. Applied rewrites79.6%

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

      if 6.60000000000000034e84 < angle

      1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        20. lift-PI.f6440.4

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \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) \]
      9. Applied rewrites40.4%

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

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

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

          \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot 2 \]
      12. Applied rewrites40.6%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(-\pi\right) + \frac{\pi}{2}\right)\right) \cdot \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)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(0.5, \pi, \left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot 2\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 67.4% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\ \mathbf{if}\;angle \leq 4.3 \cdot 10^{+83}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \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)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\right) \cdot 2\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (let* ((t_0 (* (* angle PI) 0.005555555555555556)))
       (if (<= angle 4.3e+83)
         (*
          (* 2.0 (cos (* (* PI angle) 0.005555555555555556)))
          (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a)))
         (* (* (* (* (sin (fma 0.5 PI t_0)) (+ a b)) (- b a)) (sin t_0)) 2.0))))
    double code(double a, double b, double angle) {
    	double t_0 = (angle * ((double) M_PI)) * 0.005555555555555556;
    	double tmp;
    	if (angle <= 4.3e+83) {
    		tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
    	} else {
    		tmp = (((sin(fma(0.5, ((double) M_PI), t_0)) * (a + b)) * (b - a)) * sin(t_0)) * 2.0;
    	}
    	return tmp;
    }
    
    function code(a, b, angle)
    	t_0 = Float64(Float64(angle * pi) * 0.005555555555555556)
    	tmp = 0.0
    	if (angle <= 4.3e+83)
    		tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a)));
    	else
    		tmp = Float64(Float64(Float64(Float64(sin(fma(0.5, pi, t_0)) * Float64(a + b)) * Float64(b - a)) * sin(t_0)) * 2.0);
    	end
    	return tmp
    end
    
    code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, If[LessEqual[angle, 4.3e+83], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(angle \cdot \pi\right) \cdot 0.005555555555555556\\
    \mathbf{if}\;angle \leq 4.3 \cdot 10^{+83}:\\
    \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \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)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\right) \cdot 2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 4.3e83

      1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.3e83 < angle

      1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        20. lift-PI.f6440.4

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \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) \]
      9. Applied rewrites40.4%

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

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

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

          \[\leadsto \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot 2 \]
      12. Applied rewrites40.6%

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

    Alternative 7: 67.6% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\ \mathbf{if}\;angle \leq 1.35 \cdot 10^{+84}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot t\_0\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot t\_0\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (let* ((t_0
             (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a))))
       (if (<= angle 1.35e+84)
         (* (* 2.0 (cos (* (* PI angle) 0.005555555555555556))) t_0)
         (* (* 2.0 (sin (* (* angle PI) 0.005555555555555556))) t_0))))
    double code(double a, double b, double angle) {
    	double t_0 = (sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a);
    	double tmp;
    	if (angle <= 1.35e+84) {
    		tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * t_0;
    	} else {
    		tmp = (2.0 * sin(((angle * ((double) M_PI)) * 0.005555555555555556))) * t_0;
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double t_0 = (Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b)) * (b - a);
    	double tmp;
    	if (angle <= 1.35e+84) {
    		tmp = (2.0 * Math.cos(((Math.PI * angle) * 0.005555555555555556))) * t_0;
    	} else {
    		tmp = (2.0 * Math.sin(((angle * Math.PI) * 0.005555555555555556))) * t_0;
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	t_0 = (math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b)) * (b - a)
    	tmp = 0
    	if angle <= 1.35e+84:
    		tmp = (2.0 * math.cos(((math.pi * angle) * 0.005555555555555556))) * t_0
    	else:
    		tmp = (2.0 * math.sin(((angle * math.pi) * 0.005555555555555556))) * t_0
    	return tmp
    
    function code(a, b, angle)
    	t_0 = Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a))
    	tmp = 0.0
    	if (angle <= 1.35e+84)
    		tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * t_0);
    	else
    		tmp = Float64(Float64(2.0 * sin(Float64(Float64(angle * pi) * 0.005555555555555556))) * t_0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	t_0 = (sin(((0.005555555555555556 * angle) * pi)) * (a + b)) * (b - a);
    	tmp = 0.0;
    	if (angle <= 1.35e+84)
    		tmp = (2.0 * cos(((pi * angle) * 0.005555555555555556))) * t_0;
    	else
    		tmp = (2.0 * sin(((angle * pi) * 0.005555555555555556))) * t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, 1.35e+84], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision], N[(N[(2.0 * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\\
    \mathbf{if}\;angle \leq 1.35 \cdot 10^{+84}:\\
    \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(2 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 1.35e84

      1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.35e84 < angle

      1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(\frac{1}{180} \cdot angle, \pi, \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        20. lift-PI.f6440.4

          \[\leadsto \left(2 \cdot \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot angle, \pi, \frac{\pi}{2}\right)\right)\right) \cdot \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) \]
      9. Applied rewrites40.4%

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

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

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

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

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

          \[\leadsto \left(2 \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)\right) \cdot \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) \]
      12. Applied rewrites36.2%

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

    Alternative 8: 66.8% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\ \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \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)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= angle 6.6e+84)
       (*
        (* 2.0 (cos (* (* PI angle) 0.005555555555555556)))
        (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a)))
       (* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (angle <= 6.6e+84) {
    		tmp = (2.0 * cos(((((double) M_PI) * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
    	} else {
    		tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (angle <= 6.6e+84) {
    		tmp = (2.0 * Math.cos(((Math.PI * angle) * 0.005555555555555556))) * ((Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b)) * (b - a));
    	} else {
    		tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if angle <= 6.6e+84:
    		tmp = (2.0 * math.cos(((math.pi * angle) * 0.005555555555555556))) * ((math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b)) * (b - a))
    	else:
    		tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112)
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (angle <= 6.6e+84)
    		tmp = Float64(Float64(2.0 * cos(Float64(Float64(pi * angle) * 0.005555555555555556))) * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a)));
    	else
    		tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112));
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (angle <= 6.6e+84)
    		tmp = (2.0 * cos(((pi * angle) * 0.005555555555555556))) * ((sin(((0.005555555555555556 * angle) * pi)) * (a + b)) * (b - a));
    	else
    		tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112);
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[angle, 6.6e+84], N[(N[(2.0 * N[Cos[N[(N[(Pi * angle), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\
    \;\;\;\;\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \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)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 6.60000000000000034e84

      1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.60000000000000034e84 < angle

      1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 58.3% accurate, 1.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-286}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -4e-286)
       (* (* -0.011111111111111112 a) (* (* angle PI) a))
       (* (* (* PI angle) (* b (- b a))) 0.011111111111111112)))
    double code(double a, double b, double angle) {
    	double tmp;
    	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -4e-286) {
    		tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
    	} else {
    		tmp = ((((double) M_PI) * angle) * (b * (b - a))) * 0.011111111111111112;
    	}
    	return tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -4e-286) {
    		tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
    	} else {
    		tmp = ((Math.PI * angle) * (b * (b - a))) * 0.011111111111111112;
    	}
    	return tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -4e-286:
    		tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a)
    	else:
    		tmp = ((math.pi * angle) * (b * (b - a))) * 0.011111111111111112
    	return tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -4e-286)
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a));
    	else
    		tmp = Float64(Float64(Float64(pi * angle) * Float64(b * Float64(b - a))) * 0.011111111111111112);
    	end
    	return tmp
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -4e-286)
    		tmp = (-0.011111111111111112 * a) * ((angle * pi) * a);
    	else
    		tmp = ((pi * angle) * (b * (b - a))) * 0.011111111111111112;
    	end
    	tmp_2 = tmp;
    end
    
    code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e-286], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * angle), $MachinePrecision] * N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-286}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112\\
    
    
    \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)))) < -4.0000000000000002e-286

      1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
        13. lower--.f6450.8

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        7. lift-PI.f6450.3

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
      8. Applied rewrites50.3%

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

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

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

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

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        5. lower-*.f6450.3

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
      10. Applied rewrites50.3%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        12. lift-*.f6464.5

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
      12. Applied rewrites64.5%

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

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

      1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
        13. lower--.f6461.8

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

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

        \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
      7. Step-by-step derivation
        1. Applied rewrites59.3%

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

      Alternative 10: 39.8% accurate, 1.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{+224}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \pi\\ \end{array} \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -1e+224)
         (* (* -0.011111111111111112 a) (* (* angle PI) a))
         (* (* (* -0.011111111111111112 (* a a)) angle) PI)))
      double code(double a, double b, double angle) {
      	double tmp;
      	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -1e+224) {
      		tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
      	} else {
      		tmp = ((-0.011111111111111112 * (a * a)) * angle) * ((double) M_PI);
      	}
      	return tmp;
      }
      
      public static double code(double a, double b, double angle) {
      	double tmp;
      	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -1e+224) {
      		tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
      	} else {
      		tmp = ((-0.011111111111111112 * (a * a)) * angle) * Math.PI;
      	}
      	return tmp;
      }
      
      def code(a, b, angle):
      	tmp = 0
      	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -1e+224:
      		tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a)
      	else:
      		tmp = ((-0.011111111111111112 * (a * a)) * angle) * math.pi
      	return tmp
      
      function code(a, b, angle)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -1e+224)
      		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a));
      	else
      		tmp = Float64(Float64(Float64(-0.011111111111111112 * Float64(a * a)) * angle) * pi);
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, b, angle)
      	tmp = 0.0;
      	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -1e+224)
      		tmp = (-0.011111111111111112 * a) * ((angle * pi) * a);
      	else
      		tmp = ((-0.011111111111111112 * (a * a)) * angle) * pi;
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1e+224], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * Pi), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -1 \cdot 10^{+224}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \pi\\
      
      
      \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)))) < -9.9999999999999997e223

        1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          13. lower--.f6448.0

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
        5. Applied rewrites48.0%

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          7. lift-PI.f6448.0

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
        8. Applied rewrites48.0%

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

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

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

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

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          5. lower-*.f6448.0

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        10. Applied rewrites48.0%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
          12. lift-*.f6474.6

            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        12. Applied rewrites74.6%

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

        if -9.9999999999999997e223 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          13. lower--.f6459.8

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          7. lift-PI.f6434.2

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

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

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

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

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

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

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

            \[\leadsto \left(\left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \mathsf{PI}\left(\right) \]
          7. lift-PI.f6434.3

            \[\leadsto \left(\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot angle\right) \cdot \pi \]
        10. Applied rewrites34.3%

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

      Alternative 11: 39.8% accurate, 1.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+276}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right)\\ \end{array} \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e+276)
         (* (* -0.011111111111111112 a) (* (* angle PI) a))
         (* (* (* -0.011111111111111112 a) a) (* angle PI))))
      double code(double a, double b, double angle) {
      	double tmp;
      	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e+276) {
      		tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
      	} else {
      		tmp = ((-0.011111111111111112 * a) * a) * (angle * ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double a, double b, double angle) {
      	double tmp;
      	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e+276) {
      		tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
      	} else {
      		tmp = ((-0.011111111111111112 * a) * a) * (angle * Math.PI);
      	}
      	return tmp;
      }
      
      def code(a, b, angle):
      	tmp = 0
      	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e+276:
      		tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a)
      	else:
      		tmp = ((-0.011111111111111112 * a) * a) * (angle * math.pi)
      	return tmp
      
      function code(a, b, angle)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e+276)
      		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a));
      	else
      		tmp = Float64(Float64(Float64(-0.011111111111111112 * a) * a) * Float64(angle * pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, b, angle)
      	tmp = 0.0;
      	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e+276)
      		tmp = (-0.011111111111111112 * a) * ((angle * pi) * a);
      	else
      		tmp = ((-0.011111111111111112 * a) * a) * (angle * pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+276], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(-0.011111111111111112 * a), $MachinePrecision] * a), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+276}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\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)))) < -5.00000000000000001e276

        1. Initial program 45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          7. lift-PI.f6448.6

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

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

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

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

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

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          5. lower-*.f6448.6

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        10. Applied rewrites48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -5.00000000000000001e276 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          7. lift-PI.f6434.4

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
        8. Applied rewrites34.4%

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

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

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

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

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          5. lower-*.f6434.4

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        10. Applied rewrites34.4%

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

      Alternative 12: 39.8% accurate, 1.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+170}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right)\\ \end{array} \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (if (<= (* 2.0 (- (pow b 2.0) (pow a 2.0))) -5e+170)
         (* (* -0.011111111111111112 a) (* (* angle PI) a))
         (* (* -0.011111111111111112 (* a a)) (* angle PI))))
      double code(double a, double b, double angle) {
      	double tmp;
      	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e+170) {
      		tmp = (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
      	} else {
      		tmp = (-0.011111111111111112 * (a * a)) * (angle * ((double) M_PI));
      	}
      	return tmp;
      }
      
      public static double code(double a, double b, double angle) {
      	double tmp;
      	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e+170) {
      		tmp = (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
      	} else {
      		tmp = (-0.011111111111111112 * (a * a)) * (angle * Math.PI);
      	}
      	return tmp;
      }
      
      def code(a, b, angle):
      	tmp = 0
      	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e+170:
      		tmp = (-0.011111111111111112 * a) * ((angle * math.pi) * a)
      	else:
      		tmp = (-0.011111111111111112 * (a * a)) * (angle * math.pi)
      	return tmp
      
      function code(a, b, angle)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e+170)
      		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a));
      	else
      		tmp = Float64(Float64(-0.011111111111111112 * Float64(a * a)) * Float64(angle * pi));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, b, angle)
      	tmp = 0.0;
      	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e+170)
      		tmp = (-0.011111111111111112 * a) * ((angle * pi) * a);
      	else
      		tmp = (-0.011111111111111112 * (a * a)) * (angle * pi);
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, b_, angle_] := If[LessEqual[N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e+170], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(-0.011111111111111112 * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{+170}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\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)))) < -4.99999999999999977e170

        1. Initial program 45.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          7. lift-PI.f6446.6

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

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

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

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

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

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          5. lower-*.f6446.6

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        10. Applied rewrites46.6%

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

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

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

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

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

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

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{a}\right) \]
          9. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          10. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          11. lift-PI.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
          12. lift-*.f6471.5

            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        12. Applied rewrites71.5%

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]

        if -4.99999999999999977e170 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 56.8%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
          2. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          5. *-commutativeN/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          6. lower-*.f64N/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          7. lift-PI.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          8. unpow2N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          9. unpow2N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
          10. difference-of-squaresN/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          11. lower-*.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          12. lower-+.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          13. lower--.f6460.5

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
        5. Applied rewrites60.5%

          \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
        6. Taylor expanded in a around inf

          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          4. pow2N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          7. lift-PI.f6434.4

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
        8. Applied rewrites34.4%

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 62.7% accurate, 3.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\ \;\;\;\;\mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (if (<= angle 6.6e+84)
         (*
          (fma (pow (* angle PI) 2.0) -3.08641975308642e-5 2.0)
          (* (* (* (* angle PI) 0.005555555555555556) (+ a b)) (- b a)))
         (* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
      double code(double a, double b, double angle) {
      	double tmp;
      	if (angle <= 6.6e+84) {
      		tmp = fma(pow((angle * ((double) M_PI)), 2.0), -3.08641975308642e-5, 2.0) * ((((angle * ((double) M_PI)) * 0.005555555555555556) * (a + b)) * (b - a));
      	} else {
      		tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
      	}
      	return tmp;
      }
      
      function code(a, b, angle)
      	tmp = 0.0
      	if (angle <= 6.6e+84)
      		tmp = Float64(fma((Float64(angle * pi) ^ 2.0), -3.08641975308642e-5, 2.0) * Float64(Float64(Float64(Float64(angle * pi) * 0.005555555555555556) * Float64(a + b)) * Float64(b - a)));
      	else
      		tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112));
      	end
      	return tmp
      end
      
      code[a_, b_, angle_] := If[LessEqual[angle, 6.6e+84], N[(N[(N[Power[N[(angle * Pi), $MachinePrecision], 2.0], $MachinePrecision] * -3.08641975308642e-5 + 2.0), $MachinePrecision] * N[(N[(N[(N[(angle * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;angle \leq 6.6 \cdot 10^{+84}:\\
      \;\;\;\;\mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if angle < 6.60000000000000034e84

        1. Initial program 60.6%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around inf

          \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-cos.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          9. lift-PI.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          10. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. Applied rewrites63.9%

          \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \]
          2. lift-sin.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
          4. lift-PI.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
          6. lift-+.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          7. lift--.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
          8. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. associate-*r*N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
          10. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        7. Applied rewrites75.9%

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        8. Taylor expanded in angle around 0

          \[\leadsto \left(2 + \frac{-1}{32400} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right)\right) \cdot \left(\color{blue}{\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
        9. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \left(\frac{-1}{32400} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) + 2\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \left(\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}\right) \cdot \frac{-1}{32400} + 2\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
          3. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(a + b\right)}\right) \cdot \left(b - a\right)\right) \]
          4. pow-prod-downN/A

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
          5. lower-pow.f64N/A

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{a} + b\right)\right) \cdot \left(b - a\right)\right) \]
          6. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \mathsf{PI}\left(\right)\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
          7. lift-PI.f6471.9

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \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) \]
        10. Applied rewrites71.9%

          \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\color{blue}{\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
        11. Taylor expanded in angle around 0

          \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        12. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
          2. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
          3. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, \frac{-1}{32400}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
          4. lift-PI.f6469.5

            \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
        13. Applied rewrites69.5%

          \[\leadsto \mathsf{fma}\left({\left(angle \cdot \pi\right)}^{2}, -3.08641975308642 \cdot 10^{-5}, 2\right) \cdot \left(\left(\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]

        if 6.60000000000000034e84 < angle

        1. Initial program 25.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
          2. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          5. *-commutativeN/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          6. lower-*.f64N/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          7. lift-PI.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          8. unpow2N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          9. unpow2N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
          10. difference-of-squaresN/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          11. lower-*.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          12. lower-+.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          13. lower--.f6436.7

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
        5. Applied rewrites36.7%

          \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
          2. lift-*.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          3. lift-+.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          4. lift--.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          5. lift-*.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          6. associate-*l*N/A

            \[\leadsto \left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
          7. lift-PI.f64N/A

            \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right) \]
          8. lift-*.f64N/A

            \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
          9. *-commutativeN/A

            \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
          10. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
          11. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
          12. lift-PI.f64N/A

            \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot \frac{1}{90}\right) \]
          13. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
          14. *-commutativeN/A

            \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
          15. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
          16. lift--.f64N/A

            \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
          17. +-commutativeN/A

            \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right) \]
          18. lower-+.f6436.7

            \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \]
        7. Applied rewrites36.7%

          \[\leadsto \left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 14: 65.4% accurate, 3.3× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 6.8 \cdot 10^{+81}:\\ \;\;\;\;2 \cdot \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)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
      (FPCore (a b angle)
       :precision binary64
       (if (<= angle 6.8e+81)
         (* 2.0 (* (* (sin (* (* 0.005555555555555556 angle) PI)) (+ a b)) (- b a)))
         (* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
      double code(double a, double b, double angle) {
      	double tmp;
      	if (angle <= 6.8e+81) {
      		tmp = 2.0 * ((sin(((0.005555555555555556 * angle) * ((double) M_PI))) * (a + b)) * (b - a));
      	} else {
      		tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
      	}
      	return tmp;
      }
      
      public static double code(double a, double b, double angle) {
      	double tmp;
      	if (angle <= 6.8e+81) {
      		tmp = 2.0 * ((Math.sin(((0.005555555555555556 * angle) * Math.PI)) * (a + b)) * (b - a));
      	} else {
      		tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
      	}
      	return tmp;
      }
      
      def code(a, b, angle):
      	tmp = 0
      	if angle <= 6.8e+81:
      		tmp = 2.0 * ((math.sin(((0.005555555555555556 * angle) * math.pi)) * (a + b)) * (b - a))
      	else:
      		tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112)
      	return tmp
      
      function code(a, b, angle)
      	tmp = 0.0
      	if (angle <= 6.8e+81)
      		tmp = Float64(2.0 * Float64(Float64(sin(Float64(Float64(0.005555555555555556 * angle) * pi)) * Float64(a + b)) * Float64(b - a)));
      	else
      		tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, b, angle)
      	tmp = 0.0;
      	if (angle <= 6.8e+81)
      		tmp = 2.0 * ((sin(((0.005555555555555556 * angle) * pi)) * (a + b)) * (b - a));
      	else
      		tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112);
      	end
      	tmp_2 = tmp;
      end
      
      code[a_, b_, angle_] := If[LessEqual[angle, 6.8e+81], N[(2.0 * N[(N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;angle \leq 6.8 \cdot 10^{+81}:\\
      \;\;\;\;2 \cdot \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)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if angle < 6.80000000000000005e81

        1. Initial program 60.4%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around inf

          \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-cos.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          9. lift-PI.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          10. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. Applied rewrites63.7%

          \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right) \]
          2. lift-sin.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(\color{blue}{b} + a\right) \cdot \left(b - a\right)\right)\right) \]
          4. lift-PI.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \]
          6. lift-+.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          7. lift--.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
          8. lift-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. associate-*r*N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
          10. lower-*.f64N/A

            \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\left(\sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        7. Applied rewrites75.8%

          \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
        8. Taylor expanded in angle around 0

          \[\leadsto 2 \cdot \left(\color{blue}{\left(\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]
        9. Step-by-step derivation
          1. Applied rewrites74.4%

            \[\leadsto 2 \cdot \left(\color{blue}{\left(\sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(a + b\right)\right)} \cdot \left(b - a\right)\right) \]

          if 6.80000000000000005e81 < angle

          1. Initial program 26.6%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6436.0

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites36.0%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift--.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            6. associate-*l*N/A

              \[\leadsto \left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right) \]
            8. lift-*.f64N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            9. *-commutativeN/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            10. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
            11. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            12. lift-PI.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot \frac{1}{90}\right) \]
            13. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
            14. *-commutativeN/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            15. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            16. lift--.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            17. +-commutativeN/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right) \]
            18. lower-+.f6436.0

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \]
          7. Applied rewrites36.0%

            \[\leadsto \left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)} \]
        10. Recombined 2 regimes into one program.
        11. Add Preprocessing

        Alternative 15: 62.5% accurate, 3.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 0.0024:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;angle \leq 6.6 \cdot 10^{+84}:\\ \;\;\;\;\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (if (<= angle 0.0024)
           (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)
           (if (<= angle 6.6e+84)
             (* (sin (* (* angle PI) 0.011111111111111112)) (* b b))
             (* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112)))))
        double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 0.0024) {
        		tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
        	} else if (angle <= 6.6e+84) {
        		tmp = sin(((angle * ((double) M_PI)) * 0.011111111111111112)) * (b * b);
        	} else {
        		tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
        	}
        	return tmp;
        }
        
        public static double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 0.0024) {
        		tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
        	} else if (angle <= 6.6e+84) {
        		tmp = Math.sin(((angle * Math.PI) * 0.011111111111111112)) * (b * b);
        	} else {
        		tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
        	}
        	return tmp;
        }
        
        def code(a, b, angle):
        	tmp = 0
        	if angle <= 0.0024:
        		tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112
        	elif angle <= 6.6e+84:
        		tmp = math.sin(((angle * math.pi) * 0.011111111111111112)) * (b * b)
        	else:
        		tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112)
        	return tmp
        
        function code(a, b, angle)
        	tmp = 0.0
        	if (angle <= 0.0024)
        		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112);
        	elseif (angle <= 6.6e+84)
        		tmp = Float64(sin(Float64(Float64(angle * pi) * 0.011111111111111112)) * Float64(b * b));
        	else
        		tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112));
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, angle)
        	tmp = 0.0;
        	if (angle <= 0.0024)
        		tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112;
        	elseif (angle <= 6.6e+84)
        		tmp = sin(((angle * pi) * 0.011111111111111112)) * (b * b);
        	else
        		tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112);
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, angle_] := If[LessEqual[angle, 0.0024], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[angle, 6.6e+84], N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;angle \leq 0.0024:\\
        \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
        
        \mathbf{elif}\;angle \leq 6.6 \cdot 10^{+84}:\\
        \;\;\;\;\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if angle < 0.00239999999999999979

          1. Initial program 61.7%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6465.8

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites65.8%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Taylor expanded in b around 0

            \[\leadsto \left(-1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            2. *-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) \cdot b + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            3. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
          8. Applied rewrites67.0%

            \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, \left(-a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
          9. Taylor expanded in angle around 0

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. +-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. *-commutativeN/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-+.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6476.9

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          11. Applied rewrites76.9%

            \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

          if 0.00239999999999999979 < angle < 6.60000000000000034e84

          1. Initial program 47.8%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around inf

            \[\leadsto \color{blue}{2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \color{blue}{\left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
            3. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\color{blue}{\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            4. lower-cos.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            6. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            8. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            9. lift-PI.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
            10. lower-*.f64N/A

              \[\leadsto \left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot \frac{1}{180}\right)\right) \cdot \left(\sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. Applied rewrites65.8%

            \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)\right) \cdot \left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
          6. Taylor expanded in b around inf

            \[\leadsto \color{blue}{{b}^{2} \cdot \left(-2 \cdot \frac{{a}^{2} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}{{b}^{2}} + 2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
          7. Applied rewrites31.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\left(\left(a \cdot a\right) \cdot \cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right) \cdot \sin \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}{b \cdot b}, -2, \sin \left(2 \cdot \left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)\right) \cdot \left(b \cdot b\right)} \]
          8. Taylor expanded in a around 0

            \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b} \cdot b\right) \]
          9. Step-by-step derivation
            1. lower-sin.f64N/A

              \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b\right) \]
            2. *-commutativeN/A

              \[\leadsto \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right) \cdot \left(b \cdot b\right) \]
            3. lower-*.f64N/A

              \[\leadsto \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right) \cdot \left(b \cdot b\right) \]
            4. lift-*.f64N/A

              \[\leadsto \sin \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right) \cdot \left(b \cdot b\right) \]
            5. lift-PI.f6446.6

              \[\leadsto \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b \cdot b\right) \]
          10. Applied rewrites46.6%

            \[\leadsto \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(\color{blue}{b} \cdot b\right) \]

          if 6.60000000000000034e84 < angle

          1. Initial program 25.1%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6436.7

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites36.7%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift--.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            6. associate-*l*N/A

              \[\leadsto \left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right) \]
            8. lift-*.f64N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            9. *-commutativeN/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            10. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
            11. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            12. lift-PI.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot \frac{1}{90}\right) \]
            13. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
            14. *-commutativeN/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            15. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            16. lift--.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            17. +-commutativeN/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right) \]
            18. lower-+.f6436.7

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \]
          7. Applied rewrites36.7%

            \[\leadsto \left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 16: 63.0% accurate, 13.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 10^{+24}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (if (<= angle 1e+24)
           (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)
           (* (* PI (* angle (* (- b a) (+ a b)))) 0.011111111111111112)))
        double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 1e+24) {
        		tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
        	} else {
        		tmp = (((double) M_PI) * (angle * ((b - a) * (a + b)))) * 0.011111111111111112;
        	}
        	return tmp;
        }
        
        public static double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 1e+24) {
        		tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
        	} else {
        		tmp = (Math.PI * (angle * ((b - a) * (a + b)))) * 0.011111111111111112;
        	}
        	return tmp;
        }
        
        def code(a, b, angle):
        	tmp = 0
        	if angle <= 1e+24:
        		tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112
        	else:
        		tmp = (math.pi * (angle * ((b - a) * (a + b)))) * 0.011111111111111112
        	return tmp
        
        function code(a, b, angle)
        	tmp = 0.0
        	if (angle <= 1e+24)
        		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112);
        	else
        		tmp = Float64(Float64(pi * Float64(angle * Float64(Float64(b - a) * Float64(a + b)))) * 0.011111111111111112);
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, angle)
        	tmp = 0.0;
        	if (angle <= 1e+24)
        		tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112;
        	else
        		tmp = (pi * (angle * ((b - a) * (a + b)))) * 0.011111111111111112;
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, angle_] := If[LessEqual[angle, 1e+24], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(Pi * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;angle \leq 10^{+24}:\\
        \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot 0.011111111111111112\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if angle < 9.9999999999999998e23

          1. Initial program 61.3%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6465.1

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites65.1%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Taylor expanded in b around 0

            \[\leadsto \left(-1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            2. *-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) \cdot b + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            3. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
          8. Applied rewrites67.3%

            \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, \left(-a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
          9. Taylor expanded in angle around 0

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. +-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. *-commutativeN/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-+.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6476.0

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          11. Applied rewrites76.0%

            \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

          if 9.9999999999999998e23 < angle

          1. Initial program 30.9%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6432.0

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites32.0%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. lift-PI.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. lift--.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            6. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            7. associate-*l*N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            8. lower-*.f64N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            9. lift-PI.f64N/A

              \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            11. *-commutativeN/A

              \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-*.f64N/A

              \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            13. lift--.f64N/A

              \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            14. +-commutativeN/A

              \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot \frac{1}{90} \]
            15. lower-+.f6432.0

              \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot 0.011111111111111112 \]
          7. Applied rewrites32.0%

            \[\leadsto \left(\pi \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right)\right) \cdot 0.011111111111111112 \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 17: 62.9% accurate, 13.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 2 \cdot 10^{+68}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (if (<= angle 2e+68)
           (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)
           (* (* angle PI) (* (* (- b a) (+ a b)) 0.011111111111111112))))
        double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 2e+68) {
        		tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
        	} else {
        		tmp = (angle * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
        	}
        	return tmp;
        }
        
        public static double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 2e+68) {
        		tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
        	} else {
        		tmp = (angle * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
        	}
        	return tmp;
        }
        
        def code(a, b, angle):
        	tmp = 0
        	if angle <= 2e+68:
        		tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112
        	else:
        		tmp = (angle * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112)
        	return tmp
        
        function code(a, b, angle)
        	tmp = 0.0
        	if (angle <= 2e+68)
        		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112);
        	else
        		tmp = Float64(Float64(angle * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112));
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, angle)
        	tmp = 0.0;
        	if (angle <= 2e+68)
        		tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112;
        	else
        		tmp = (angle * pi) * (((b - a) * (a + b)) * 0.011111111111111112);
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, angle_] := If[LessEqual[angle, 2e+68], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;angle \leq 2 \cdot 10^{+68}:\\
        \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if angle < 1.99999999999999991e68

          1. Initial program 60.1%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6462.8

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites62.8%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Taylor expanded in b around 0

            \[\leadsto \left(-1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            2. *-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) \cdot b + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            3. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
          8. Applied rewrites65.0%

            \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, \left(-a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
          9. Taylor expanded in angle around 0

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. +-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. *-commutativeN/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-+.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6473.2

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          11. Applied rewrites73.2%

            \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

          if 1.99999999999999991e68 < angle

          1. Initial program 30.3%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6435.2

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites35.2%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift--.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            6. associate-*l*N/A

              \[\leadsto \left(\pi \cdot angle\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right) \]
            8. lift-*.f64N/A

              \[\leadsto \left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            9. *-commutativeN/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            10. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\right)} \]
            11. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \frac{1}{90}\right) \]
            12. lift-PI.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right) \cdot \frac{1}{90}\right) \]
            13. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{90}}\right) \]
            14. *-commutativeN/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            15. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            16. lift--.f64N/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \frac{1}{90}\right) \]
            17. +-commutativeN/A

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right) \]
            18. lower-+.f6435.2

              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right) \]
          7. Applied rewrites35.2%

            \[\leadsto \left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot 0.011111111111111112\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 18: 62.9% accurate, 13.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;angle \leq 2 \cdot 10^{+68}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (if (<= angle 2e+68)
           (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)
           (* (* 0.011111111111111112 angle) (* (* PI (+ a b)) (- b a)))))
        double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 2e+68) {
        		tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
        	} else {
        		tmp = (0.011111111111111112 * angle) * ((((double) M_PI) * (a + b)) * (b - a));
        	}
        	return tmp;
        }
        
        public static double code(double a, double b, double angle) {
        	double tmp;
        	if (angle <= 2e+68) {
        		tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
        	} else {
        		tmp = (0.011111111111111112 * angle) * ((Math.PI * (a + b)) * (b - a));
        	}
        	return tmp;
        }
        
        def code(a, b, angle):
        	tmp = 0
        	if angle <= 2e+68:
        		tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112
        	else:
        		tmp = (0.011111111111111112 * angle) * ((math.pi * (a + b)) * (b - a))
        	return tmp
        
        function code(a, b, angle)
        	tmp = 0.0
        	if (angle <= 2e+68)
        		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112);
        	else
        		tmp = Float64(Float64(0.011111111111111112 * angle) * Float64(Float64(pi * Float64(a + b)) * Float64(b - a)));
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, angle)
        	tmp = 0.0;
        	if (angle <= 2e+68)
        		tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112;
        	else
        		tmp = (0.011111111111111112 * angle) * ((pi * (a + b)) * (b - a));
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, angle_] := If[LessEqual[angle, 2e+68], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(0.011111111111111112 * angle), $MachinePrecision] * N[(N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;angle \leq 2 \cdot 10^{+68}:\\
        \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(0.011111111111111112 \cdot angle\right) \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if angle < 1.99999999999999991e68

          1. Initial program 60.1%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6462.8

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites62.8%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Taylor expanded in b around 0

            \[\leadsto \left(-1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            2. *-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) \cdot b + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            3. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
          8. Applied rewrites65.0%

            \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, \left(-a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
          9. Taylor expanded in angle around 0

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. +-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. *-commutativeN/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-+.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6473.2

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          11. Applied rewrites73.2%

            \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]

          if 1.99999999999999991e68 < angle

          1. Initial program 30.3%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6435.2

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites35.2%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lift-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. lift-PI.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            5. lift-+.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            6. lift--.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            7. lift-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            8. *-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            9. +-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            10. associate-*r*N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
            11. *-commutativeN/A

              \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
            12. associate-*r*N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
            13. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \]
            14. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \]
            15. associate-*r*N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
            16. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot \color{blue}{\left(b - a\right)}\right) \]
            17. +-commutativeN/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \]
            18. lower-*.f64N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot \left(b + a\right)\right) \cdot \left(\color{blue}{b} - a\right)\right) \]
            19. lift-PI.f64N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \]
            20. +-commutativeN/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
            21. lower-+.f64N/A

              \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \]
          7. Applied rewrites35.2%

            \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \color{blue}{\left(\left(\pi \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 19: 49.5% accurate, 13.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 2 \cdot 10^{-153}:\\ \;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (if (<= a 2e-153)
           (* (* (* PI (* b b)) angle) 0.011111111111111112)
           (* (* (* (* (+ a b) PI) angle) (- b a)) 0.011111111111111112)))
        double code(double a, double b, double angle) {
        	double tmp;
        	if (a <= 2e-153) {
        		tmp = ((((double) M_PI) * (b * b)) * angle) * 0.011111111111111112;
        	} else {
        		tmp = ((((a + b) * ((double) M_PI)) * angle) * (b - a)) * 0.011111111111111112;
        	}
        	return tmp;
        }
        
        public static double code(double a, double b, double angle) {
        	double tmp;
        	if (a <= 2e-153) {
        		tmp = ((Math.PI * (b * b)) * angle) * 0.011111111111111112;
        	} else {
        		tmp = ((((a + b) * Math.PI) * angle) * (b - a)) * 0.011111111111111112;
        	}
        	return tmp;
        }
        
        def code(a, b, angle):
        	tmp = 0
        	if a <= 2e-153:
        		tmp = ((math.pi * (b * b)) * angle) * 0.011111111111111112
        	else:
        		tmp = ((((a + b) * math.pi) * angle) * (b - a)) * 0.011111111111111112
        	return tmp
        
        function code(a, b, angle)
        	tmp = 0.0
        	if (a <= 2e-153)
        		tmp = Float64(Float64(Float64(pi * Float64(b * b)) * angle) * 0.011111111111111112);
        	else
        		tmp = Float64(Float64(Float64(Float64(Float64(a + b) * pi) * angle) * Float64(b - a)) * 0.011111111111111112);
        	end
        	return tmp
        end
        
        function tmp_2 = code(a, b, angle)
        	tmp = 0.0;
        	if (a <= 2e-153)
        		tmp = ((pi * (b * b)) * angle) * 0.011111111111111112;
        	else
        		tmp = ((((a + b) * pi) * angle) * (b - a)) * 0.011111111111111112;
        	end
        	tmp_2 = tmp;
        end
        
        code[a_, b_, angle_] := If[LessEqual[a, 2e-153], N[(N[(N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision] * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(N[(N[(N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision] * angle), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq 2 \cdot 10^{-153}:\\
        \;\;\;\;\left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < 2.00000000000000008e-153

          1. Initial program 56.1%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6459.6

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites59.6%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Taylor expanded in a around 0

            \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
            2. lower-*.f64N/A

              \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
            3. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
            5. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
            6. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
            7. lower-*.f6444.3

              \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
          8. Applied rewrites44.3%

            \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]

          if 2.00000000000000008e-153 < a

          1. Initial program 50.2%

            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
          2. Add Preprocessing
          3. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            2. lower-*.f64N/A

              \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
            3. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            4. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            6. lower-*.f64N/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            7. lift-PI.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            8. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
            9. unpow2N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
            10. difference-of-squaresN/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            11. lower-*.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            12. lower-+.f64N/A

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            13. lower--.f6452.7

              \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
          5. Applied rewrites52.7%

            \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
          6. Taylor expanded in b around 0

            \[\leadsto \left(-1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \left(b \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            2. *-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)\right) \cdot b + -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
            3. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right) + angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right), b, -1 \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \frac{1}{90} \]
          8. Applied rewrites54.3%

            \[\leadsto \mathsf{fma}\left(angle \cdot \mathsf{fma}\left(\pi, b, \left(0 \cdot a\right) \cdot \pi\right), b, \left(-a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
          9. Taylor expanded in angle around 0

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot \frac{1}{90} \]
          10. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            2. +-commutativeN/A

              \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            3. *-commutativeN/A

              \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
            4. associate-*r*N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            5. *-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            6. +-commutativeN/A

              \[\leadsto \left(\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            7. associate-*r*N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            8. lower-*.f64N/A

              \[\leadsto \left(\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            9. *-commutativeN/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            10. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\mathsf{PI}\left(\right) \cdot \left(a + b\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            11. *-commutativeN/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            12. lower-*.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            13. lift-+.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            14. lift-PI.f64N/A

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
            15. lift--.f6466.3

              \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
          11. Applied rewrites66.3%

            \[\leadsto \left(\left(\left(\left(a + b\right) \cdot \pi\right) \cdot angle\right) \cdot \left(b - a\right)\right) \cdot 0.011111111111111112 \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 20: 38.8% accurate, 21.6× speedup?

        \[\begin{array}{l} \\ \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \end{array} \]
        (FPCore (a b angle)
         :precision binary64
         (* (* -0.011111111111111112 a) (* (* angle PI) a)))
        double code(double a, double b, double angle) {
        	return (-0.011111111111111112 * a) * ((angle * ((double) M_PI)) * a);
        }
        
        public static double code(double a, double b, double angle) {
        	return (-0.011111111111111112 * a) * ((angle * Math.PI) * a);
        }
        
        def code(a, b, angle):
        	return (-0.011111111111111112 * a) * ((angle * math.pi) * a)
        
        function code(a, b, angle)
        	return Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(angle * pi) * a))
        end
        
        function tmp = code(a, b, angle)
        	tmp = (-0.011111111111111112 * a) * ((angle * pi) * a);
        end
        
        code[a_, b_, angle_] := N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(angle * Pi), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right)
        \end{array}
        
        Derivation
        1. Initial program 53.9%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
          2. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \cdot \color{blue}{\frac{1}{90}} \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          5. *-commutativeN/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          6. lower-*.f64N/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          7. lift-PI.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          8. unpow2N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - {a}^{2}\right)\right) \cdot \frac{1}{90} \]
          9. unpow2N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \frac{1}{90} \]
          10. difference-of-squaresN/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          11. lower-*.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          12. lower-+.f64N/A

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \frac{1}{90} \]
          13. lower--.f6457.1

            \[\leadsto \left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
        5. Applied rewrites57.1%

          \[\leadsto \color{blue}{\left(\left(\pi \cdot angle\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112} \]
        6. Taylor expanded in a around inf

          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          4. pow2N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          7. lift-PI.f6437.4

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
        8. Applied rewrites37.4%

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \pi\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          5. lower-*.f6437.4

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        10. Applied rewrites37.4%

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
        11. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \color{blue}{\pi}\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \pi\right) \]
          4. lift-PI.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. associate-*l*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{a}\right) \]
          9. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          10. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          11. lift-PI.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
          12. lift-*.f6439.8

            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot a\right) \]
        12. Applied rewrites39.8%

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{a}\right) \]
        13. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2025064 
        (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)))))