ab-angle->ABCF B

Percentage Accurate: 54.4% → 67.7%
Time: 9.6s
Alternatives: 16
Speedup: 5.2×

Specification

?
\[\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} \]
(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}
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}

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 16 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} 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} \]
(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}
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}

Alternative 1: 67.7% accurate, 0.7× speedup?

\[\begin{array}{l} t_0 := \left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\\ t_1 := \sin t\_0 \cdot \left(\left|a\right| + b\right)\\ t_2 := b - \left|a\right|\\ t_3 := \pi \cdot \left|angle\right|\\ t_4 := t\_1 \cdot t\_2\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|a\right| \leq 2.5 \cdot 10^{+25}:\\ \;\;\;\;\left(\left(t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_3, 0.005555555555555556, 0.5 \cdot \pi\right)\right)\right) \cdot 2\right) \cdot t\_1\\ \mathbf{elif}\;\left|a\right| \leq 2.02 \cdot 10^{+192}:\\ \;\;\;\;t\_4 \cdot \left(\left(-\sin \left(-0.5 \cdot \pi - \left|\left|angle\right|\right| \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4 \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(-0.005555555555555556, \left|angle\right| \cdot \pi, t\_0\right)}{2}\right) \cdot \sin \left(\frac{\mathsf{fma}\left(t\_3, -0.011111111111111112, \pi\right)}{2}\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (* 0.005555555555555556 (fabs angle)) PI))
        (t_1 (* (sin t_0) (+ (fabs a) b)))
        (t_2 (- b (fabs a)))
        (t_3 (* PI (fabs angle)))
        (t_4 (* t_1 t_2)))
   (*
    (copysign 1.0 angle)
    (if (<= (fabs a) 2.5e+25)
      (* (* (* t_2 (sin (fma t_3 0.005555555555555556 (* 0.5 PI)))) 2.0) t_1)
      (if (<= (fabs a) 2.02e+192)
        (*
         t_4
         (*
          (-
           (sin
            (-
             (* -0.5 PI)
             (* (fabs (fabs angle)) (* PI -0.005555555555555556)))))
          2.0))
        (*
         t_4
         (*
          2.0
          (*
           (cos (/ (fma -0.005555555555555556 (* (fabs angle) PI) t_0) 2.0))
           (sin (/ (fma t_3 -0.011111111111111112 PI) 2.0))))))))))
double code(double a, double b, double angle) {
	double t_0 = (0.005555555555555556 * fabs(angle)) * ((double) M_PI);
	double t_1 = sin(t_0) * (fabs(a) + b);
	double t_2 = b - fabs(a);
	double t_3 = ((double) M_PI) * fabs(angle);
	double t_4 = t_1 * t_2;
	double tmp;
	if (fabs(a) <= 2.5e+25) {
		tmp = ((t_2 * sin(fma(t_3, 0.005555555555555556, (0.5 * ((double) M_PI))))) * 2.0) * t_1;
	} else if (fabs(a) <= 2.02e+192) {
		tmp = t_4 * (-sin(((-0.5 * ((double) M_PI)) - (fabs(fabs(angle)) * (((double) M_PI) * -0.005555555555555556)))) * 2.0);
	} else {
		tmp = t_4 * (2.0 * (cos((fma(-0.005555555555555556, (fabs(angle) * ((double) M_PI)), t_0) / 2.0)) * sin((fma(t_3, -0.011111111111111112, ((double) M_PI)) / 2.0))));
	}
	return copysign(1.0, angle) * tmp;
}
function code(a, b, angle)
	t_0 = Float64(Float64(0.005555555555555556 * abs(angle)) * pi)
	t_1 = Float64(sin(t_0) * Float64(abs(a) + b))
	t_2 = Float64(b - abs(a))
	t_3 = Float64(pi * abs(angle))
	t_4 = Float64(t_1 * t_2)
	tmp = 0.0
	if (abs(a) <= 2.5e+25)
		tmp = Float64(Float64(Float64(t_2 * sin(fma(t_3, 0.005555555555555556, Float64(0.5 * pi)))) * 2.0) * t_1);
	elseif (abs(a) <= 2.02e+192)
		tmp = Float64(t_4 * Float64(Float64(-sin(Float64(Float64(-0.5 * pi) - Float64(abs(abs(angle)) * Float64(pi * -0.005555555555555556))))) * 2.0));
	else
		tmp = Float64(t_4 * Float64(2.0 * Float64(cos(Float64(fma(-0.005555555555555556, Float64(abs(angle) * pi), t_0) / 2.0)) * sin(Float64(fma(t_3, -0.011111111111111112, pi) / 2.0)))));
	end
	return Float64(copysign(1.0, angle) * tmp)
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$2), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[a], $MachinePrecision], 2.5e+25], N[(N[(N[(t$95$2 * N[Sin[N[(t$95$3 * 0.005555555555555556 + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[N[Abs[a], $MachinePrecision], 2.02e+192], N[(t$95$4 * N[((-N[Sin[N[(N[(-0.5 * Pi), $MachinePrecision] - N[(N[Abs[N[Abs[angle], $MachinePrecision]], $MachinePrecision] * N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * 2.0), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(2.0 * N[(N[Cos[N[(N[(-0.005555555555555556 * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] + t$95$0), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[Sin[N[(N[(t$95$3 * -0.011111111111111112 + Pi), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]]]
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\\
t_1 := \sin t\_0 \cdot \left(\left|a\right| + b\right)\\
t_2 := b - \left|a\right|\\
t_3 := \pi \cdot \left|angle\right|\\
t_4 := t\_1 \cdot t\_2\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 2.5 \cdot 10^{+25}:\\
\;\;\;\;\left(\left(t\_2 \cdot \sin \left(\mathsf{fma}\left(t\_3, 0.005555555555555556, 0.5 \cdot \pi\right)\right)\right) \cdot 2\right) \cdot t\_1\\

\mathbf{elif}\;\left|a\right| \leq 2.02 \cdot 10^{+192}:\\
\;\;\;\;t\_4 \cdot \left(\left(-\sin \left(-0.5 \cdot \pi - \left|\left|angle\right|\right| \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot 2\right)\\

\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(-0.005555555555555556, \left|angle\right| \cdot \pi, t\_0\right)}{2}\right) \cdot \sin \left(\frac{\mathsf{fma}\left(t\_3, -0.011111111111111112, \pi\right)}{2}\right)\right)\right)\\


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

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot 2\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.50000000000000012e25 < a < 2.02e192

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

    if 2.02e192 < a

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \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) \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(\frac{-1}{180}, angle \cdot \pi, \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \color{blue}{\cos \left(\frac{\frac{-1}{180} \cdot \left(angle \cdot \pi\right) - \left(\frac{1}{180} \cdot angle\right) \cdot \pi}{2}\right)}\right)\right) \]
      2. sin-+PI/2-revN/A

        \[\leadsto \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) \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(\frac{-1}{180}, angle \cdot \pi, \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \color{blue}{\sin \left(\frac{\frac{-1}{180} \cdot \left(angle \cdot \pi\right) - \left(\frac{1}{180} \cdot angle\right) \cdot \pi}{2} + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)\right) \]
      3. lower-sin.f64N/A

        \[\leadsto \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) \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(\frac{-1}{180}, angle \cdot \pi, \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \color{blue}{\sin \left(\frac{\frac{-1}{180} \cdot \left(angle \cdot \pi\right) - \left(\frac{1}{180} \cdot angle\right) \cdot \pi}{2} + \frac{\mathsf{PI}\left(\right)}{2}\right)}\right)\right) \]
      4. lift-/.f64N/A

        \[\leadsto \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) \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(\frac{-1}{180}, angle \cdot \pi, \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \sin \left(\color{blue}{\frac{\frac{-1}{180} \cdot \left(angle \cdot \pi\right) - \left(\frac{1}{180} \cdot angle\right) \cdot \pi}{2}} + \frac{\mathsf{PI}\left(\right)}{2}\right)\right)\right) \]
      5. lift-PI.f64N/A

        \[\leadsto \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) \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(\frac{-1}{180}, angle \cdot \pi, \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \sin \left(\frac{\frac{-1}{180} \cdot \left(angle \cdot \pi\right) - \left(\frac{1}{180} \cdot angle\right) \cdot \pi}{2} + \frac{\color{blue}{\pi}}{2}\right)\right)\right) \]
      6. div-add-revN/A

        \[\leadsto \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) \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(\frac{-1}{180}, angle \cdot \pi, \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \sin \color{blue}{\left(\frac{\left(\frac{-1}{180} \cdot \left(angle \cdot \pi\right) - \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) + \pi}{2}\right)}\right)\right) \]
      7. lower-/.f64N/A

        \[\leadsto \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) \cdot \left(2 \cdot \left(\cos \left(\frac{\mathsf{fma}\left(\frac{-1}{180}, angle \cdot \pi, \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right)}{2}\right) \cdot \sin \color{blue}{\left(\frac{\left(\frac{-1}{180} \cdot \left(angle \cdot \pi\right) - \left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) + \pi}{2}\right)}\right)\right) \]
    6. Applied rewrites67.4%

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

Alternative 2: 67.6% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := \left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\\ t_1 := \left|b\right| - \left|a\right|\\ t_2 := \left|a\right| + \left|b\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 7 \cdot 10^{+129}:\\ \;\;\;\;\left(\left(t\_1 \cdot \cos \left(-0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\frac{1}{\frac{180}{\left|angle\right|}} \cdot \pi\right) \cdot t\_2\right)\\ \mathbf{elif}\;\left|angle\right| \leq 2.2 \cdot 10^{+287}:\\ \;\;\;\;\left(\left(\sin t\_0 \cdot t\_2\right) \cdot t\_1\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, {\left(\left|angle\right|\right)}^{2} \cdot {\pi}^{3}, 0.011111111111111112 \cdot \pi\right)\right) \cdot \left|b\right|\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (* 0.005555555555555556 (fabs angle)) PI))
        (t_1 (- (fabs b) (fabs a)))
        (t_2 (+ (fabs a) (fabs b))))
   (*
    (copysign 1.0 angle)
    (if (<= (fabs angle) 7e+129)
      (*
       (* (* t_1 (cos (* -0.005555555555555556 (* (fabs angle) PI)))) 2.0)
       (* (sin (* (/ 1.0 (/ 180.0 (fabs angle))) PI)) t_2))
      (if (<= (fabs angle) 2.2e+287)
        (* (* (* (sin t_0) t_2) t_1) (* (sin (fma 0.5 PI t_0)) 2.0))
        (*
         t_1
         (*
          (*
           (fabs angle)
           (fma
            -2.2862368541380886e-7
            (* (pow (fabs angle) 2.0) (pow PI 3.0))
            (* 0.011111111111111112 PI)))
          (fabs b))))))))
double code(double a, double b, double angle) {
	double t_0 = (0.005555555555555556 * fabs(angle)) * ((double) M_PI);
	double t_1 = fabs(b) - fabs(a);
	double t_2 = fabs(a) + fabs(b);
	double tmp;
	if (fabs(angle) <= 7e+129) {
		tmp = ((t_1 * cos((-0.005555555555555556 * (fabs(angle) * ((double) M_PI))))) * 2.0) * (sin(((1.0 / (180.0 / fabs(angle))) * ((double) M_PI))) * t_2);
	} else if (fabs(angle) <= 2.2e+287) {
		tmp = ((sin(t_0) * t_2) * t_1) * (sin(fma(0.5, ((double) M_PI), t_0)) * 2.0);
	} else {
		tmp = t_1 * ((fabs(angle) * fma(-2.2862368541380886e-7, (pow(fabs(angle), 2.0) * pow(((double) M_PI), 3.0)), (0.011111111111111112 * ((double) M_PI)))) * fabs(b));
	}
	return copysign(1.0, angle) * tmp;
}
function code(a, b, angle)
	t_0 = Float64(Float64(0.005555555555555556 * abs(angle)) * pi)
	t_1 = Float64(abs(b) - abs(a))
	t_2 = Float64(abs(a) + abs(b))
	tmp = 0.0
	if (abs(angle) <= 7e+129)
		tmp = Float64(Float64(Float64(t_1 * cos(Float64(-0.005555555555555556 * Float64(abs(angle) * pi)))) * 2.0) * Float64(sin(Float64(Float64(1.0 / Float64(180.0 / abs(angle))) * pi)) * t_2));
	elseif (abs(angle) <= 2.2e+287)
		tmp = Float64(Float64(Float64(sin(t_0) * t_2) * t_1) * Float64(sin(fma(0.5, pi, t_0)) * 2.0));
	else
		tmp = Float64(t_1 * Float64(Float64(abs(angle) * fma(-2.2862368541380886e-7, Float64((abs(angle) ^ 2.0) * (pi ^ 3.0)), Float64(0.011111111111111112 * pi))) * abs(b)));
	end
	return Float64(copysign(1.0, angle) * tmp)
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 7e+129], N[(N[(N[(t$95$1 * N[Cos[N[(-0.005555555555555556 * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(1.0 / N[(180.0 / N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 2.2e+287], N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[Sin[N[(0.5 * Pi + t$95$0), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(-2.2862368541380886e-7 * N[(N[Power[N[Abs[angle], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\\
t_1 := \left|b\right| - \left|a\right|\\
t_2 := \left|a\right| + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 7 \cdot 10^{+129}:\\
\;\;\;\;\left(\left(t\_1 \cdot \cos \left(-0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\frac{1}{\frac{180}{\left|angle\right|}} \cdot \pi\right) \cdot t\_2\right)\\

\mathbf{elif}\;\left|angle\right| \leq 2.2 \cdot 10^{+287}:\\
\;\;\;\;\left(\left(\sin t\_0 \cdot t\_2\right) \cdot t\_1\right) \cdot \left(\sin \left(\mathsf{fma}\left(0.5, \pi, t\_0\right)\right) \cdot 2\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, {\left(\left|angle\right|\right)}^{2} \cdot {\pi}^{3}, 0.011111111111111112 \cdot \pi\right)\right) \cdot \left|b\right|\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 6.9999999999999997e129

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot 2\right) \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.9999999999999997e129 < angle < 2.20000000000000003e287

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \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) \cdot \left(\color{blue}{\sin \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right)} \cdot 2\right) \]
      3. lift-*.f64N/A

        \[\leadsto \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) \cdot \left(\sin \left(\color{blue}{\left(\frac{1}{180} \cdot angle\right) \cdot \pi} + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot 2\right) \]
      4. lift-*.f64N/A

        \[\leadsto \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) \cdot \left(\sin \left(\color{blue}{\left(\frac{1}{180} \cdot angle\right)} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot 2\right) \]
      5. *-commutativeN/A

        \[\leadsto \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) \cdot \left(\sin \left(\color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot 2\right) \]
      6. metadata-evalN/A

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

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

        \[\leadsto \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) \cdot \left(\sin \left(\color{blue}{\frac{angle}{180}} \cdot \pi + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot 2\right) \]
      9. *-commutativeN/A

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

        \[\leadsto \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) \cdot \left(\sin \left(\color{blue}{\pi \cdot \frac{angle}{180}} + \frac{\mathsf{PI}\left(\right)}{2}\right) \cdot 2\right) \]
      11. lower-sin.f64N/A

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

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

        \[\leadsto \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) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\pi \cdot \frac{1}{2}}\right) \cdot 2\right) \]
      14. metadata-evalN/A

        \[\leadsto \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) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \color{blue}{\frac{1}{2}}\right) \cdot 2\right) \]
      15. *-commutativeN/A

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

        \[\leadsto \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) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180} + \color{blue}{\frac{1}{2} \cdot \pi}\right) \cdot 2\right) \]
      17. +-commutativeN/A

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

        \[\leadsto \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) \cdot \left(\sin \left(\color{blue}{\frac{1}{2} \cdot \pi} + \pi \cdot \frac{angle}{180}\right) \cdot 2\right) \]
      19. lower-fma.f6466.9

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

        \[\leadsto \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) \cdot \left(\sin \left(\mathsf{fma}\left(\frac{1}{2}, \pi, \color{blue}{\pi \cdot \frac{angle}{180}}\right)\right) \cdot 2\right) \]
      21. *-commutativeN/A

        \[\leadsto \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) \cdot \left(\sin \left(\mathsf{fma}\left(\frac{1}{2}, \pi, \color{blue}{\frac{angle}{180} \cdot \pi}\right)\right) \cdot 2\right) \]
    5. Applied rewrites67.2%

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

    if 2.20000000000000003e287 < angle

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
    5. Step-by-step derivation
      1. Applied rewrites42.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(b - a\right) \cdot \left(\left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, {angle}^{2} \cdot {\pi}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot b\right) \]
        8. lower-PI.f6440.2

          \[\leadsto \left(b - a\right) \cdot \left(\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, {angle}^{2} \cdot {\pi}^{3}, 0.011111111111111112 \cdot \pi\right)\right) \cdot b\right) \]
      6. Applied rewrites40.2%

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

    Alternative 3: 67.4% accurate, 1.1× speedup?

    \[\begin{array}{l} t_0 := \sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(a + b\right)\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 9.6 \cdot 10^{+144}:\\ \;\;\;\;\left(t\_0 \cdot \left(b - a\right)\right) \cdot \left(\left(-\sin \left(-0.5 \cdot \pi - \left|\left|angle\right|\right| \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot 2\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b - a\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot \left|angle\right|, 0.005555555555555556, 0.5 \cdot \pi\right)\right)\right) \cdot 2\right) \cdot t\_0\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (let* ((t_0 (* (sin (* (* 0.005555555555555556 (fabs angle)) PI)) (+ a b))))
       (*
        (copysign 1.0 angle)
        (if (<= (fabs angle) 9.6e+144)
          (*
           (* t_0 (- b a))
           (*
            (-
             (sin
              (-
               (* -0.5 PI)
               (* (fabs (fabs angle)) (* PI -0.005555555555555556)))))
            2.0))
          (*
           (*
            (*
             (- b a)
             (sin (fma (* PI (fabs angle)) 0.005555555555555556 (* 0.5 PI))))
            2.0)
           t_0)))))
    double code(double a, double b, double angle) {
    	double t_0 = sin(((0.005555555555555556 * fabs(angle)) * ((double) M_PI))) * (a + b);
    	double tmp;
    	if (fabs(angle) <= 9.6e+144) {
    		tmp = (t_0 * (b - a)) * (-sin(((-0.5 * ((double) M_PI)) - (fabs(fabs(angle)) * (((double) M_PI) * -0.005555555555555556)))) * 2.0);
    	} else {
    		tmp = (((b - a) * sin(fma((((double) M_PI) * fabs(angle)), 0.005555555555555556, (0.5 * ((double) M_PI))))) * 2.0) * t_0;
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    function code(a, b, angle)
    	t_0 = Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) * pi)) * Float64(a + b))
    	tmp = 0.0
    	if (abs(angle) <= 9.6e+144)
    		tmp = Float64(Float64(t_0 * Float64(b - a)) * Float64(Float64(-sin(Float64(Float64(-0.5 * pi) - Float64(abs(abs(angle)) * Float64(pi * -0.005555555555555556))))) * 2.0));
    	else
    		tmp = Float64(Float64(Float64(Float64(b - a) * sin(fma(Float64(pi * abs(angle)), 0.005555555555555556, Float64(0.5 * pi)))) * 2.0) * t_0);
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 9.6e+144], N[(N[(t$95$0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[((-N[Sin[N[(N[(-0.5 * Pi), $MachinePrecision] - N[(N[Abs[N[Abs[angle], $MachinePrecision]], $MachinePrecision] * N[(Pi * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * 0.005555555555555556 + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * t$95$0), $MachinePrecision]]), $MachinePrecision]]
    
    \begin{array}{l}
    t_0 := \sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(a + b\right)\\
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 9.6 \cdot 10^{+144}:\\
    \;\;\;\;\left(t\_0 \cdot \left(b - a\right)\right) \cdot \left(\left(-\sin \left(-0.5 \cdot \pi - \left|\left|angle\right|\right| \cdot \left(\pi \cdot -0.005555555555555556\right)\right)\right) \cdot 2\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\left(b - a\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot \left|angle\right|, 0.005555555555555556, 0.5 \cdot \pi\right)\right)\right) \cdot 2\right) \cdot t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 9.6000000000000002e144

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

      if 9.6000000000000002e144 < angle

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\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)} \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot 2\right) \]
        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 67.3% accurate, 1.1× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 7 \cdot 10^{+129}:\\ \;\;\;\;\left(\left(\left(b - a\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\frac{1}{\frac{180}{\left|angle\right|}} \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(b - a\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot \left|angle\right|, 0.005555555555555556, 0.5 \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(a + b\right)\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 7e+129)
        (*
         (* (* (- b a) (cos (* -0.005555555555555556 (* (fabs angle) PI)))) 2.0)
         (* (sin (* (/ 1.0 (/ 180.0 (fabs angle))) PI)) (+ a b)))
        (*
         (*
          (*
           (- b a)
           (sin (fma (* PI (fabs angle)) 0.005555555555555556 (* 0.5 PI))))
          2.0)
         (* (sin (* (* 0.005555555555555556 (fabs angle)) PI)) (+ a b))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 7e+129) {
    		tmp = (((b - a) * cos((-0.005555555555555556 * (fabs(angle) * ((double) M_PI))))) * 2.0) * (sin(((1.0 / (180.0 / fabs(angle))) * ((double) M_PI))) * (a + b));
    	} else {
    		tmp = (((b - a) * sin(fma((((double) M_PI) * fabs(angle)), 0.005555555555555556, (0.5 * ((double) M_PI))))) * 2.0) * (sin(((0.005555555555555556 * fabs(angle)) * ((double) M_PI))) * (a + b));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 7e+129)
    		tmp = Float64(Float64(Float64(Float64(b - a) * cos(Float64(-0.005555555555555556 * Float64(abs(angle) * pi)))) * 2.0) * Float64(sin(Float64(Float64(1.0 / Float64(180.0 / abs(angle))) * pi)) * Float64(a + b)));
    	else
    		tmp = Float64(Float64(Float64(Float64(b - a) * sin(fma(Float64(pi * abs(angle)), 0.005555555555555556, Float64(0.5 * pi)))) * 2.0) * Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) * pi)) * Float64(a + b)));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 7e+129], N[(N[(N[(N[(b - a), $MachinePrecision] * N[Cos[N[(-0.005555555555555556 * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(1.0 / N[(180.0 / N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * 0.005555555555555556 + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 7 \cdot 10^{+129}:\\
    \;\;\;\;\left(\left(\left(b - a\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\frac{1}{\frac{180}{\left|angle\right|}} \cdot \pi\right) \cdot \left(a + b\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\left(b - a\right) \cdot \sin \left(\mathsf{fma}\left(\pi \cdot \left|angle\right|, 0.005555555555555556, 0.5 \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\left(0.005555555555555556 \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(a + b\right)\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 6.9999999999999997e129

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\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)} \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot 2\right) \]
        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.9999999999999997e129 < angle

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\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)} \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot 2\right) \]
        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 66.9% accurate, 1.1× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 9.2 \cdot 10^{+142}:\\ \;\;\;\;\left(\left(\left(b - \left|a\right|\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\frac{\left|angle\right|}{180} \cdot \pi\right) \cdot \left(\left|a\right| + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(b, b, \left(-\left|a\right|\right) \cdot \left|a\right|\right)\right) \cdot \pi\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 9.2e+142)
        (*
         (*
          (* (- b (fabs a)) (cos (* -0.005555555555555556 (* (fabs angle) PI))))
          2.0)
         (* (sin (* (/ (fabs angle) 180.0) PI)) (+ (fabs a) b)))
        (*
         0.011111111111111112
         (* (* (fabs angle) (fma b b (* (- (fabs a)) (fabs a)))) PI)))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 9.2e+142) {
    		tmp = (((b - fabs(a)) * cos((-0.005555555555555556 * (fabs(angle) * ((double) M_PI))))) * 2.0) * (sin(((fabs(angle) / 180.0) * ((double) M_PI))) * (fabs(a) + b));
    	} else {
    		tmp = 0.011111111111111112 * ((fabs(angle) * fma(b, b, (-fabs(a) * fabs(a)))) * ((double) M_PI));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 9.2e+142)
    		tmp = Float64(Float64(Float64(Float64(b - abs(a)) * cos(Float64(-0.005555555555555556 * Float64(abs(angle) * pi)))) * 2.0) * Float64(sin(Float64(Float64(abs(angle) / 180.0) * pi)) * Float64(abs(a) + b)));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * fma(b, b, Float64(Float64(-abs(a)) * abs(a)))) * pi));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 9.2e+142], N[(N[(N[(N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(-0.005555555555555556 * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[(N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(b * b + N[((-N[Abs[a], $MachinePrecision]) * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 9.2 \cdot 10^{+142}:\\
    \;\;\;\;\left(\left(\left(b - \left|a\right|\right) \cdot \cos \left(-0.005555555555555556 \cdot \left(\left|angle\right| \cdot \pi\right)\right)\right) \cdot 2\right) \cdot \left(\sin \left(\frac{\left|angle\right|}{180} \cdot \pi\right) \cdot \left(\left|a\right| + b\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(b, b, \left(-\left|a\right|\right) \cdot \left|a\right|\right)\right) \cdot \pi\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 9.20000000000000009e142

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\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)} \cdot \left(\cos \left(\left(\frac{1}{180} \cdot angle\right) \cdot \pi\right) \cdot 2\right) \]
        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

      if 9.20000000000000009e142 < angle

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 66.9% accurate, 1.7× speedup?

    \[\begin{array}{l} t_0 := \left|b\right| - \left|a\right|\\ t_1 := \left|a\right| + \left|b\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{-11}:\\ \;\;\;\;t\_1 \cdot \left(0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(\pi \cdot t\_0\right)\right)\right)\\ \mathbf{elif}\;\left|angle\right| \leq 9.6 \cdot 10^{+144}:\\ \;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(\left|b\right|, \left|b\right|, \left(-\left|a\right|\right) \cdot \left|a\right|\right)\right) \cdot \pi\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (let* ((t_0 (- (fabs b) (fabs a))) (t_1 (+ (fabs a) (fabs b))))
       (*
        (copysign 1.0 angle)
        (if (<= (fabs angle) 5e-11)
          (* t_1 (* 0.011111111111111112 (* (fabs angle) (* PI t_0))))
          (if (<= (fabs angle) 9.6e+144)
            (* (* t_0 t_1) (sin (* (* (fabs angle) PI) 0.011111111111111112)))
            (*
             0.011111111111111112
             (*
              (* (fabs angle) (fma (fabs b) (fabs b) (* (- (fabs a)) (fabs a))))
              PI)))))))
    double code(double a, double b, double angle) {
    	double t_0 = fabs(b) - fabs(a);
    	double t_1 = fabs(a) + fabs(b);
    	double tmp;
    	if (fabs(angle) <= 5e-11) {
    		tmp = t_1 * (0.011111111111111112 * (fabs(angle) * (((double) M_PI) * t_0)));
    	} else if (fabs(angle) <= 9.6e+144) {
    		tmp = (t_0 * t_1) * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112));
    	} else {
    		tmp = 0.011111111111111112 * ((fabs(angle) * fma(fabs(b), fabs(b), (-fabs(a) * fabs(a)))) * ((double) M_PI));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    function code(a, b, angle)
    	t_0 = Float64(abs(b) - abs(a))
    	t_1 = Float64(abs(a) + abs(b))
    	tmp = 0.0
    	if (abs(angle) <= 5e-11)
    		tmp = Float64(t_1 * Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * t_0))));
    	elseif (abs(angle) <= 9.6e+144)
    		tmp = Float64(Float64(t_0 * t_1) * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112)));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * fma(abs(b), abs(b), Float64(Float64(-abs(a)) * abs(a)))) * pi));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 5e-11], N[(t$95$1 * N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 9.6e+144], N[(N[(t$95$0 * t$95$1), $MachinePrecision] * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] * N[Abs[b], $MachinePrecision] + N[((-N[Abs[a], $MachinePrecision]) * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
    
    \begin{array}{l}
    t_0 := \left|b\right| - \left|a\right|\\
    t_1 := \left|a\right| + \left|b\right|\\
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{-11}:\\
    \;\;\;\;t\_1 \cdot \left(0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(\pi \cdot t\_0\right)\right)\right)\\
    
    \mathbf{elif}\;\left|angle\right| \leq 9.6 \cdot 10^{+144}:\\
    \;\;\;\;\left(t\_0 \cdot t\_1\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(\left|b\right|, \left|b\right|, \left(-\left|a\right|\right) \cdot \left|a\right|\right)\right) \cdot \pi\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if angle < 5.00000000000000018e-11

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.00000000000000018e-11 < angle < 9.6000000000000002e144

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.6000000000000002e144 < angle

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 66.9% accurate, 1.9× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 9.6 \cdot 10^{+144}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot \left|angle\right|\right)\right) \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right)\right) \cdot \pi\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 9.6e+144)
        (* (- b a) (* (sin (* 0.011111111111111112 (* PI (fabs angle)))) (+ b a)))
        (* 0.011111111111111112 (* (* (fabs angle) (fma b b (* (- a) a))) PI)))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 9.6e+144) {
    		tmp = (b - a) * (sin((0.011111111111111112 * (((double) M_PI) * fabs(angle)))) * (b + a));
    	} else {
    		tmp = 0.011111111111111112 * ((fabs(angle) * fma(b, b, (-a * a))) * ((double) M_PI));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 9.6e+144)
    		tmp = Float64(Float64(b - a) * Float64(sin(Float64(0.011111111111111112 * Float64(pi * abs(angle)))) * Float64(b + a)));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * fma(b, b, Float64(Float64(-a) * a))) * pi));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 9.6e+144], N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(0.011111111111111112 * N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(b * b + N[((-a) * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 9.6 \cdot 10^{+144}:\\
    \;\;\;\;\left(b - a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(\pi \cdot \left|angle\right|\right)\right) \cdot \left(b + a\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(b, b, \left(-a\right) \cdot a\right)\right) \cdot \pi\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 9.6000000000000002e144

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 9.6000000000000002e144 < angle

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 66.2% accurate, 1.9× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 3.1 \cdot 10^{+25}:\\ \;\;\;\;\left(\left|a\right| + \left|b\right|\right) \cdot \left(0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left|b\right| - \left|a\right|\right)\right)\right)\right)\\ \mathbf{elif}\;\left|angle\right| \leq 1.4 \cdot 10^{+50}:\\ \;\;\;\;\left|b\right| \cdot \left(\left|b\right| \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(\left|b\right|, \left|b\right|, \left(-\left|a\right|\right) \cdot \left|a\right|\right)\right) \cdot \pi\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 3.1e+25)
        (*
         (+ (fabs a) (fabs b))
         (* 0.011111111111111112 (* (fabs angle) (* PI (- (fabs b) (fabs a))))))
        (if (<= (fabs angle) 1.4e+50)
          (*
           (fabs b)
           (* (fabs b) (sin (* (* (fabs angle) PI) 0.011111111111111112))))
          (*
           0.011111111111111112
           (*
            (* (fabs angle) (fma (fabs b) (fabs b) (* (- (fabs a)) (fabs a))))
            PI))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 3.1e+25) {
    		tmp = (fabs(a) + fabs(b)) * (0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (fabs(b) - fabs(a)))));
    	} else if (fabs(angle) <= 1.4e+50) {
    		tmp = fabs(b) * (fabs(b) * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112)));
    	} else {
    		tmp = 0.011111111111111112 * ((fabs(angle) * fma(fabs(b), fabs(b), (-fabs(a) * fabs(a)))) * ((double) M_PI));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 3.1e+25)
    		tmp = Float64(Float64(abs(a) + abs(b)) * Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(abs(b) - abs(a))))));
    	elseif (abs(angle) <= 1.4e+50)
    		tmp = Float64(abs(b) * Float64(abs(b) * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * fma(abs(b), abs(b), Float64(Float64(-abs(a)) * abs(a)))) * pi));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 3.1e+25], N[(N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 1.4e+50], N[(N[Abs[b], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] * N[Abs[b], $MachinePrecision] + N[((-N[Abs[a], $MachinePrecision]) * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 3.1 \cdot 10^{+25}:\\
    \;\;\;\;\left(\left|a\right| + \left|b\right|\right) \cdot \left(0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left|b\right| - \left|a\right|\right)\right)\right)\right)\\
    
    \mathbf{elif}\;\left|angle\right| \leq 1.4 \cdot 10^{+50}:\\
    \;\;\;\;\left|b\right| \cdot \left(\left|b\right| \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \mathsf{fma}\left(\left|b\right|, \left|b\right|, \left(-\left|a\right|\right) \cdot \left|a\right|\right)\right) \cdot \pi\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if angle < 3.0999999999999998e25

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 3.0999999999999998e25 < angle < 1.3999999999999999e50

      1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
      5. Step-by-step derivation
        1. Applied rewrites42.4%

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

          \[\leadsto b \cdot \left(\color{blue}{b} \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
        3. Step-by-step derivation
          1. Applied rewrites40.9%

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

          if 1.3999999999999999e50 < angle

          1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 64.3% accurate, 1.3× speedup?

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

          1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(b - a\right) \cdot \left(a \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
            5. lower-PI.f6442.6

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

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

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

          1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 10: 62.8% accurate, 5.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 11: 62.8% accurate, 5.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 12: 58.3% accurate, 4.3× speedup?

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

          1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.5600000000000001e162 < b

          1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
          5. Step-by-step derivation
            1. Applied rewrites42.4%

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

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

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

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

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

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

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

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

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

                \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
              2. lower-PI.f6438.3

                \[\leadsto b \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right) \]
            7. Applied rewrites38.3%

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

          Alternative 13: 58.2% accurate, 4.7× speedup?

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

            1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.5600000000000001e162 < b

            1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
            5. Step-by-step derivation
              1. Applied rewrites42.4%

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

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

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

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

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

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

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

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

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

                  \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                2. lower-PI.f6438.3

                  \[\leadsto b \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right) \]
              7. Applied rewrites38.3%

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

            Alternative 14: 41.7% accurate, 6.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
            5. Step-by-step derivation
              1. Applied rewrites42.4%

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

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

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

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

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

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

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

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

              Alternative 15: 41.5% accurate, 2.1× speedup?

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

                1. Initial program 54.4%

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

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

                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  3. associate-*l*N/A

                    \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                  4. lift-*.f64N/A

                    \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                  6. associate-*l*N/A

                    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                  7. lift-sin.f64N/A

                    \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  8. lift-cos.f64N/A

                    \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
                  9. 2-sinN/A

                    \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                  10. count-2N/A

                    \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)} \]
                3. Applied rewrites68.0%

                  \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
                4. Taylor expanded in a around 0

                  \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
                5. Step-by-step derivation
                  1. Applied rewrites42.4%

                    \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right) \]
                  2. Taylor expanded in angle around 0

                    \[\leadsto b \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto b \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                    5. lower--.f6441.7

                      \[\leadsto b \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
                  4. Applied rewrites41.7%

                    \[\leadsto b \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]
                  5. Taylor expanded in a around inf

                    \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                  6. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                    4. lower-PI.f6420.4

                      \[\leadsto b \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \]
                  7. Applied rewrites20.4%

                    \[\leadsto b \cdot \left(-0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(angle \cdot \pi\right)\right)}\right) \]

                  if -2.00000000000000006e-206 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

                  1. Initial program 54.4%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                    7. lift-sin.f64N/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    8. lift-cos.f64N/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
                    9. 2-sinN/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                    10. count-2N/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)} \]
                  3. Applied rewrites68.0%

                    \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
                  4. Taylor expanded in a around 0

                    \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
                  5. Step-by-step derivation
                    1. Applied rewrites42.4%

                      \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right) \]
                    2. Taylor expanded in angle around 0

                      \[\leadsto b \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                      3. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                      4. lower-PI.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                      5. lower--.f6441.7

                        \[\leadsto b \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
                    4. Applied rewrites41.7%

                      \[\leadsto b \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]
                    5. Taylor expanded in a around 0

                      \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(b \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                      2. lower-PI.f6438.3

                        \[\leadsto b \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right) \]
                    7. Applied rewrites38.3%

                      \[\leadsto b \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \color{blue}{\pi}\right)\right)\right) \]
                  6. Recombined 2 regimes into one program.
                  7. Add Preprocessing

                  Alternative 16: 20.2% accurate, 8.6× speedup?

                  \[\left|b\right| \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \]
                  (FPCore (a b angle)
                   :precision binary64
                   (* (fabs b) (* -0.011111111111111112 (* a (* angle PI)))))
                  double code(double a, double b, double angle) {
                  	return fabs(b) * (-0.011111111111111112 * (a * (angle * ((double) M_PI))));
                  }
                  
                  public static double code(double a, double b, double angle) {
                  	return Math.abs(b) * (-0.011111111111111112 * (a * (angle * Math.PI)));
                  }
                  
                  def code(a, b, angle):
                  	return math.fabs(b) * (-0.011111111111111112 * (a * (angle * math.pi)))
                  
                  function code(a, b, angle)
                  	return Float64(abs(b) * Float64(-0.011111111111111112 * Float64(a * Float64(angle * pi))))
                  end
                  
                  function tmp = code(a, b, angle)
                  	tmp = abs(b) * (-0.011111111111111112 * (a * (angle * pi)));
                  end
                  
                  code[a_, b_, angle_] := N[(N[Abs[b], $MachinePrecision] * N[(-0.011111111111111112 * N[(a * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \left|b\right| \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)
                  
                  Derivation
                  1. Initial program 54.4%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                    7. lift-sin.f64N/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    8. lift-cos.f64N/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
                    9. 2-sinN/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                    10. count-2N/A

                      \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)} \]
                  3. Applied rewrites68.0%

                    \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)} \]
                  4. Taylor expanded in a around 0

                    \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
                  5. Step-by-step derivation
                    1. Applied rewrites42.4%

                      \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right) \]
                    2. Taylor expanded in angle around 0

                      \[\leadsto b \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                      3. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                      4. lower-PI.f64N/A

                        \[\leadsto b \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                      5. lower--.f6441.7

                        \[\leadsto b \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
                    4. Applied rewrites41.7%

                      \[\leadsto b \cdot \color{blue}{\left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]
                    5. Taylor expanded in a around inf

                      \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \color{blue}{\left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)}\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
                      2. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right) \]
                      3. lower-*.f64N/A

                        \[\leadsto b \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                      4. lower-PI.f6420.4

                        \[\leadsto b \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right) \]
                    7. Applied rewrites20.4%

                      \[\leadsto b \cdot \left(-0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(angle \cdot \pi\right)\right)}\right) \]
                    8. Add Preprocessing

                    Reproduce

                    ?
                    herbie shell --seed 2025171 
                    (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)))))