ab-angle->ABCF B

Percentage Accurate: 54.1% → 68.2%
Time: 4.0s
Alternatives: 18
Speedup: 3.3×

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))))
  (* (* (* 2 (- (pow b 2) (pow a 2))) (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), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $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 18 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.1% 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))))
  (* (* (* 2 (- (pow b 2) (pow a 2))) (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), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(2 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $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: 68.2% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := b - \left|a\right|\\ t_1 := \frac{-1}{2} \cdot \pi - \frac{-1}{2} \cdot \pi\\ t_2 := \left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\\ t_3 := \left|a\right| + b\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 109999999999999994813382992798917661634827554997553248915876435581884342024512697523016464072704:\\ \;\;\;\;t\_3 \cdot \left(t\_0 \cdot \sin \left(\left(\left({\pi}^{\frac{2}{3}} \cdot \left|angle\right|\right) \cdot \sqrt[3]{\pi}\right) \cdot \frac{1}{90}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(2 \cdot \left(\sin \left(\frac{t\_1 - t\_2}{2}\right) \cdot \cos \left(\frac{t\_1 + t\_2}{2}\right)\right)\right) \cdot \left(\left(2 \cdot t\_3\right) \cdot t\_0\right)}{2}\\ \end{array} \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (let* ((t_0 (- b (fabs a)))
       (t_1 (- (* -1/2 PI) (* -1/2 PI)))
       (t_2 (+ (* (* 1/90 (fabs angle)) PI) PI))
       (t_3 (+ (fabs a) b)))
  (*
   (copysign 1 angle)
   (if (<=
        (fabs angle)
        109999999999999994813382992798917661634827554997553248915876435581884342024512697523016464072704)
     (*
      t_3
      (*
       t_0
       (sin (* (* (* (pow PI 2/3) (fabs angle)) (cbrt PI)) 1/90))))
     (/
      (*
       (* 2 (* (sin (/ (- t_1 t_2) 2)) (cos (/ (+ t_1 t_2) 2))))
       (* (* 2 t_3) t_0))
      2)))))
double code(double a, double b, double angle) {
	double t_0 = b - fabs(a);
	double t_1 = (-0.5 * ((double) M_PI)) - (-0.5 * ((double) M_PI));
	double t_2 = ((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) + ((double) M_PI);
	double t_3 = fabs(a) + b;
	double tmp;
	if (fabs(angle) <= 1.1e+95) {
		tmp = t_3 * (t_0 * sin((((pow(((double) M_PI), 0.6666666666666666) * fabs(angle)) * cbrt(((double) M_PI))) * 0.011111111111111112)));
	} else {
		tmp = ((2.0 * (sin(((t_1 - t_2) / 2.0)) * cos(((t_1 + t_2) / 2.0)))) * ((2.0 * t_3) * t_0)) / 2.0;
	}
	return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = b - Math.abs(a);
	double t_1 = (-0.5 * Math.PI) - (-0.5 * Math.PI);
	double t_2 = ((0.011111111111111112 * Math.abs(angle)) * Math.PI) + Math.PI;
	double t_3 = Math.abs(a) + b;
	double tmp;
	if (Math.abs(angle) <= 1.1e+95) {
		tmp = t_3 * (t_0 * Math.sin((((Math.pow(Math.PI, 0.6666666666666666) * Math.abs(angle)) * Math.cbrt(Math.PI)) * 0.011111111111111112)));
	} else {
		tmp = ((2.0 * (Math.sin(((t_1 - t_2) / 2.0)) * Math.cos(((t_1 + t_2) / 2.0)))) * ((2.0 * t_3) * t_0)) / 2.0;
	}
	return Math.copySign(1.0, angle) * tmp;
}
function code(a, b, angle)
	t_0 = Float64(b - abs(a))
	t_1 = Float64(Float64(-0.5 * pi) - Float64(-0.5 * pi))
	t_2 = Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) + pi)
	t_3 = Float64(abs(a) + b)
	tmp = 0.0
	if (abs(angle) <= 1.1e+95)
		tmp = Float64(t_3 * Float64(t_0 * sin(Float64(Float64(Float64((pi ^ 0.6666666666666666) * abs(angle)) * cbrt(pi)) * 0.011111111111111112))));
	else
		tmp = Float64(Float64(Float64(2.0 * Float64(sin(Float64(Float64(t_1 - t_2) / 2.0)) * cos(Float64(Float64(t_1 + t_2) / 2.0)))) * Float64(Float64(2.0 * t_3) * t_0)) / 2.0);
	end
	return Float64(copysign(1.0, angle) * tmp)
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(-1/2 * Pi), $MachinePrecision] - N[(-1/2 * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] + Pi), $MachinePrecision]}, Block[{t$95$3 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 109999999999999994813382992798917661634827554997553248915876435581884342024512697523016464072704], N[(t$95$3 * N[(t$95$0 * N[Sin[N[(N[(N[(N[Power[Pi, 2/3], $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * N[Power[Pi, 1/3], $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2 * N[(N[Sin[N[(N[(t$95$1 - t$95$2), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$1 + t$95$2), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2 * t$95$3), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / 2), $MachinePrecision]]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := b - \left|a\right|\\
t_1 := \frac{-1}{2} \cdot \pi - \frac{-1}{2} \cdot \pi\\
t_2 := \left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\\
t_3 := \left|a\right| + b\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 109999999999999994813382992798917661634827554997553248915876435581884342024512697523016464072704:\\
\;\;\;\;t\_3 \cdot \left(t\_0 \cdot \sin \left(\left(\left({\pi}^{\frac{2}{3}} \cdot \left|angle\right|\right) \cdot \sqrt[3]{\pi}\right) \cdot \frac{1}{90}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \left(\sin \left(\frac{t\_1 - t\_2}{2}\right) \cdot \cos \left(\frac{t\_1 + t\_2}{2}\right)\right)\right) \cdot \left(\left(2 \cdot t\_3\right) \cdot t\_0\right)}{2}\\


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(angle \cdot \sqrt[3]{\pi \cdot \pi}\right) \cdot \sqrt[3]{\color{blue}{\pi}}\right) \cdot \frac{1}{90}\right)\right) \]
      17. lower-cbrt.f6468.6%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(angle \cdot \sqrt[3]{\pi \cdot \pi}\right) \cdot \color{blue}{\sqrt[3]{\pi}}\right) \cdot \frac{1}{90}\right)\right) \]
    5. Applied rewrites68.6%

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(\left(angle \cdot \sqrt[3]{\pi \cdot \pi}\right) \cdot \sqrt[3]{\pi}\right)} \cdot \frac{1}{90}\right)\right) \]
    6. Step-by-step derivation
      1. lift-cbrt.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(\color{blue}{{\pi}^{\left(\frac{2}{3}\right)}} \cdot angle\right) \cdot \sqrt[3]{\pi}\right) \cdot \frac{1}{90}\right)\right) \]
      8. metadata-eval68.6%

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

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

    if 1.0999999999999999e95 < angle

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Applied rewrites27.1%

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

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

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

Alternative 2: 67.8% accurate, 1.2× speedup?

\[\begin{array}{l} t_0 := b - \left|a\right|\\ t_1 := \left|a\right| + b\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544:\\ \;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot \frac{1}{90}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sin \pi - \sin \left(\left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\right)\right) \cdot \left(t\_1 \cdot 2\right)\right) \cdot \left(t\_0 \cdot \frac{1}{2}\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (let* ((t_0 (- b (fabs a))) (t_1 (+ (fabs a) b)))
  (*
   (copysign 1 angle)
   (if (<=
        (fabs angle)
        122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544)
     (* t_1 (* t_0 (sin (* (* (fabs angle) PI) 1/90))))
     (*
      (*
       (- (sin PI) (sin (+ (* (* 1/90 (fabs angle)) PI) PI)))
       (* t_1 2))
      (* t_0 1/2))))))
double code(double a, double b, double angle) {
	double t_0 = b - fabs(a);
	double t_1 = fabs(a) + b;
	double tmp;
	if (fabs(angle) <= 1.22e+95) {
		tmp = t_1 * (t_0 * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112)));
	} else {
		tmp = ((sin(((double) M_PI)) - sin((((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) + ((double) M_PI)))) * (t_1 * 2.0)) * (t_0 * 0.5);
	}
	return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = b - Math.abs(a);
	double t_1 = Math.abs(a) + b;
	double tmp;
	if (Math.abs(angle) <= 1.22e+95) {
		tmp = t_1 * (t_0 * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112)));
	} else {
		tmp = ((Math.sin(Math.PI) - Math.sin((((0.011111111111111112 * Math.abs(angle)) * Math.PI) + Math.PI))) * (t_1 * 2.0)) * (t_0 * 0.5);
	}
	return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle):
	t_0 = b - math.fabs(a)
	t_1 = math.fabs(a) + b
	tmp = 0
	if math.fabs(angle) <= 1.22e+95:
		tmp = t_1 * (t_0 * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112)))
	else:
		tmp = ((math.sin(math.pi) - math.sin((((0.011111111111111112 * math.fabs(angle)) * math.pi) + math.pi))) * (t_1 * 2.0)) * (t_0 * 0.5)
	return math.copysign(1.0, angle) * tmp
function code(a, b, angle)
	t_0 = Float64(b - abs(a))
	t_1 = Float64(abs(a) + b)
	tmp = 0.0
	if (abs(angle) <= 1.22e+95)
		tmp = Float64(t_1 * Float64(t_0 * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112))));
	else
		tmp = Float64(Float64(Float64(sin(pi) - sin(Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) + pi))) * Float64(t_1 * 2.0)) * Float64(t_0 * 0.5));
	end
	return Float64(copysign(1.0, angle) * tmp)
end
function tmp_2 = code(a, b, angle)
	t_0 = b - abs(a);
	t_1 = abs(a) + b;
	tmp = 0.0;
	if (abs(angle) <= 1.22e+95)
		tmp = t_1 * (t_0 * sin(((abs(angle) * pi) * 0.011111111111111112)));
	else
		tmp = ((sin(pi) - sin((((0.011111111111111112 * abs(angle)) * pi) + pi))) * (t_1 * 2.0)) * (t_0 * 0.5);
	end
	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544], N[(t$95$1 * N[(t$95$0 * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[Pi], $MachinePrecision] - N[Sin[N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] + Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * 2), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * 1/2), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := b - \left|a\right|\\
t_1 := \left|a\right| + b\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544:\\
\;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot \frac{1}{90}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\sin \pi - \sin \left(\left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\right)\right) \cdot \left(t\_1 \cdot 2\right)\right) \cdot \left(t\_0 \cdot \frac{1}{2}\right)\\


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2200000000000001e95 < angle

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Applied rewrites27.1%

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

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

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

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

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

        \[\leadsto \frac{\left(\cos \left(0 - \frac{1}{2} \cdot \pi\right) - \cos \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right) \cdot \pi} - \pi \cdot \frac{-1}{2}\right)\right) \cdot \left(\left(2 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)}{2} \]
      6. lower-*.f6426.9%

        \[\leadsto \frac{\left(\cos \left(0 - \frac{1}{2} \cdot \pi\right) - \cos \left(\color{blue}{\left(\frac{1}{90} \cdot angle\right)} \cdot \pi - \pi \cdot \frac{-1}{2}\right)\right) \cdot \left(\left(2 \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right)}{2} \]
    4. Applied rewrites26.9%

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

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

Alternative 3: 67.8% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := b - \left|a\right|\\ t_1 := \left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\\ t_2 := \left|a\right| + b\\ t_3 := \frac{-1}{2} \cdot \pi - \frac{-1}{2} \cdot \pi\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544:\\ \;\;\;\;t\_2 \cdot \left(t\_0 \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot \frac{1}{90}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(2 \cdot \left(\sin \left(\frac{t\_3 - t\_1}{2}\right) \cdot \cos \left(\frac{t\_3 + t\_1}{2}\right)\right)\right) \cdot \left(\left(2 \cdot t\_2\right) \cdot t\_0\right)}{2}\\ \end{array} \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (let* ((t_0 (- b (fabs a)))
       (t_1 (+ (* (* 1/90 (fabs angle)) PI) PI))
       (t_2 (+ (fabs a) b))
       (t_3 (- (* -1/2 PI) (* -1/2 PI))))
  (*
   (copysign 1 angle)
   (if (<=
        (fabs angle)
        122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544)
     (* t_2 (* t_0 (sin (* (* (fabs angle) PI) 1/90))))
     (/
      (*
       (* 2 (* (sin (/ (- t_3 t_1) 2)) (cos (/ (+ t_3 t_1) 2))))
       (* (* 2 t_2) t_0))
      2)))))
double code(double a, double b, double angle) {
	double t_0 = b - fabs(a);
	double t_1 = ((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) + ((double) M_PI);
	double t_2 = fabs(a) + b;
	double t_3 = (-0.5 * ((double) M_PI)) - (-0.5 * ((double) M_PI));
	double tmp;
	if (fabs(angle) <= 1.22e+95) {
		tmp = t_2 * (t_0 * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112)));
	} else {
		tmp = ((2.0 * (sin(((t_3 - t_1) / 2.0)) * cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0;
	}
	return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = b - Math.abs(a);
	double t_1 = ((0.011111111111111112 * Math.abs(angle)) * Math.PI) + Math.PI;
	double t_2 = Math.abs(a) + b;
	double t_3 = (-0.5 * Math.PI) - (-0.5 * Math.PI);
	double tmp;
	if (Math.abs(angle) <= 1.22e+95) {
		tmp = t_2 * (t_0 * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112)));
	} else {
		tmp = ((2.0 * (Math.sin(((t_3 - t_1) / 2.0)) * Math.cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0;
	}
	return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle):
	t_0 = b - math.fabs(a)
	t_1 = ((0.011111111111111112 * math.fabs(angle)) * math.pi) + math.pi
	t_2 = math.fabs(a) + b
	t_3 = (-0.5 * math.pi) - (-0.5 * math.pi)
	tmp = 0
	if math.fabs(angle) <= 1.22e+95:
		tmp = t_2 * (t_0 * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112)))
	else:
		tmp = ((2.0 * (math.sin(((t_3 - t_1) / 2.0)) * math.cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0
	return math.copysign(1.0, angle) * tmp
function code(a, b, angle)
	t_0 = Float64(b - abs(a))
	t_1 = Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) + pi)
	t_2 = Float64(abs(a) + b)
	t_3 = Float64(Float64(-0.5 * pi) - Float64(-0.5 * pi))
	tmp = 0.0
	if (abs(angle) <= 1.22e+95)
		tmp = Float64(t_2 * Float64(t_0 * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112))));
	else
		tmp = Float64(Float64(Float64(2.0 * Float64(sin(Float64(Float64(t_3 - t_1) / 2.0)) * cos(Float64(Float64(t_3 + t_1) / 2.0)))) * Float64(Float64(2.0 * t_2) * t_0)) / 2.0);
	end
	return Float64(copysign(1.0, angle) * tmp)
end
function tmp_2 = code(a, b, angle)
	t_0 = b - abs(a);
	t_1 = ((0.011111111111111112 * abs(angle)) * pi) + pi;
	t_2 = abs(a) + b;
	t_3 = (-0.5 * pi) - (-0.5 * pi);
	tmp = 0.0;
	if (abs(angle) <= 1.22e+95)
		tmp = t_2 * (t_0 * sin(((abs(angle) * pi) * 0.011111111111111112)));
	else
		tmp = ((2.0 * (sin(((t_3 - t_1) / 2.0)) * cos(((t_3 + t_1) / 2.0)))) * ((2.0 * t_2) * t_0)) / 2.0;
	end
	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] + Pi), $MachinePrecision]}, Block[{t$95$2 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-1/2 * Pi), $MachinePrecision] - N[(-1/2 * Pi), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544], N[(t$95$2 * N[(t$95$0 * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2 * N[(N[Sin[N[(N[(t$95$3 - t$95$1), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(t$95$3 + t$95$1), $MachinePrecision] / 2), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(2 * t$95$2), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] / 2), $MachinePrecision]]), $MachinePrecision]]]]]
\begin{array}{l}
t_0 := b - \left|a\right|\\
t_1 := \left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi + \pi\\
t_2 := \left|a\right| + b\\
t_3 := \frac{-1}{2} \cdot \pi - \frac{-1}{2} \cdot \pi\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 122000000000000006913119480225967436871409575765767305984376187617974147724947271645625313132544:\\
\;\;\;\;t\_2 \cdot \left(t\_0 \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot \frac{1}{90}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\left(2 \cdot \left(\sin \left(\frac{t\_3 - t\_1}{2}\right) \cdot \cos \left(\frac{t\_3 + t\_1}{2}\right)\right)\right) \cdot \left(\left(2 \cdot t\_2\right) \cdot t\_0\right)}{2}\\


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2200000000000001e95 < angle

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Applied rewrites27.1%

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

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

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

Alternative 4: 67.5% accurate, 1.8× speedup?

\[\begin{array}{l} \mathbf{if}\;\left|a\right| \leq 549999999999999956603258195768086461654723523156372230507658473319512693915163480152926077793794477926070024461497827820572263214299772340635469176401651039300337687939013232287576626105770303862730433435560529687113014705508278468436865391708340224:\\ \;\;\;\;\left(\left|a\right| + b\right) \cdot \left(\left(b - \left|a\right|\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \pi\right) \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{-1}{90} \cdot \left({\left(\left|a\right|\right)}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\\ \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (if (<=
     (fabs a)
     549999999999999956603258195768086461654723523156372230507658473319512693915163480152926077793794477926070024461497827820572263214299772340635469176401651039300337687939013232287576626105770303862730433435560529687113014705508278468436865391708340224)
  (* (+ (fabs a) b) (* (- b (fabs a)) (sin (* (* 1/90 PI) angle))))
  (*
   (* -1/90 (* (pow (fabs a) 2) (* angle PI)))
   (cos (/ (* angle PI) 180)))))
double code(double a, double b, double angle) {
	double tmp;
	if (fabs(a) <= 5.5e+248) {
		tmp = (fabs(a) + b) * ((b - fabs(a)) * sin(((0.011111111111111112 * ((double) M_PI)) * angle)));
	} else {
		tmp = (-0.011111111111111112 * (pow(fabs(a), 2.0) * (angle * ((double) M_PI)))) * cos(((angle * ((double) M_PI)) / 180.0));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if (Math.abs(a) <= 5.5e+248) {
		tmp = (Math.abs(a) + b) * ((b - Math.abs(a)) * Math.sin(((0.011111111111111112 * Math.PI) * angle)));
	} else {
		tmp = (-0.011111111111111112 * (Math.pow(Math.abs(a), 2.0) * (angle * Math.PI))) * Math.cos(((angle * Math.PI) / 180.0));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if math.fabs(a) <= 5.5e+248:
		tmp = (math.fabs(a) + b) * ((b - math.fabs(a)) * math.sin(((0.011111111111111112 * math.pi) * angle)))
	else:
		tmp = (-0.011111111111111112 * (math.pow(math.fabs(a), 2.0) * (angle * math.pi))) * math.cos(((angle * math.pi) / 180.0))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (abs(a) <= 5.5e+248)
		tmp = Float64(Float64(abs(a) + b) * Float64(Float64(b - abs(a)) * sin(Float64(Float64(0.011111111111111112 * pi) * angle))));
	else
		tmp = Float64(Float64(-0.011111111111111112 * Float64((abs(a) ^ 2.0) * Float64(angle * pi))) * cos(Float64(Float64(angle * pi) / 180.0)));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (abs(a) <= 5.5e+248)
		tmp = (abs(a) + b) * ((b - abs(a)) * sin(((0.011111111111111112 * pi) * angle)));
	else
		tmp = (-0.011111111111111112 * ((abs(a) ^ 2.0) * (angle * pi))) * cos(((angle * pi) / 180.0));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[N[Abs[a], $MachinePrecision], 549999999999999956603258195768086461654723523156372230507658473319512693915163480152926077793794477926070024461497827820572263214299772340635469176401651039300337687939013232287576626105770303862730433435560529687113014705508278468436865391708340224], N[(N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision] * N[(N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(1/90 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1/90 * N[(N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle * Pi), $MachinePrecision] / 180), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left|a\right| \leq 549999999999999956603258195768086461654723523156372230507658473319512693915163480152926077793794477926070024461497827820572263214299772340635469176401651039300337687939013232287576626105770303862730433435560529687113014705508278468436865391708340224:\\
\;\;\;\;\left(\left|a\right| + b\right) \cdot \left(\left(b - \left|a\right|\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \pi\right) \cdot angle\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\frac{-1}{90} \cdot \left({\left(\left|a\right|\right)}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(\frac{angle \cdot \pi}{180}\right)\\


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

    if 5.4999999999999996e248 < a

    1. Initial program 54.1%

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

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

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

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

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

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

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

        \[\leadsto \left(-2 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      7. lower-PI.f6435.9%

        \[\leadsto \left(-2 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    4. Applied rewrites35.9%

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

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

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

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

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

        \[\leadsto \left(\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. lower-PI.f6434.9%

        \[\leadsto \left(\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Applied rewrites34.9%

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

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

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

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

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

        \[\leadsto \left(\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \left(\frac{\color{blue}{angle \cdot \pi}}{180}\right) \]
      6. lower-/.f6435.1%

        \[\leadsto \left(\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \cos \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)} \]
    9. Applied rewrites35.1%

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

Alternative 5: 67.3% accurate, 3.3× speedup?

\[\begin{array}{l} t_0 := \left|a\right| + b\\ t_1 := b - \left|a\right|\\ \mathbf{if}\;\left|a\right| \leq 294999999999999979715892151964708824211181979871733743190477131889411011138639576703702293249515424096579239073331843163821161847545577565121560611077028454405154333307039309919961205010578929076059141599838785369121243529216:\\ \;\;\;\;t\_0 \cdot \left(t\_1 \cdot \sin \left(\left(\frac{1}{90} \cdot \pi\right) \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot t\_1\right) \cdot t\_0\right)\\ \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (let* ((t_0 (+ (fabs a) b)) (t_1 (- b (fabs a))))
  (if (<=
       (fabs a)
       294999999999999979715892151964708824211181979871733743190477131889411011138639576703702293249515424096579239073331843163821161847545577565121560611077028454405154333307039309919961205010578929076059141599838785369121243529216)
    (* t_0 (* t_1 (sin (* (* 1/90 PI) angle))))
    (* 1/90 (* (* (* angle PI) t_1) t_0)))))
double code(double a, double b, double angle) {
	double t_0 = fabs(a) + b;
	double t_1 = b - fabs(a);
	double tmp;
	if (fabs(a) <= 2.95e+224) {
		tmp = t_0 * (t_1 * sin(((0.011111111111111112 * ((double) M_PI)) * angle)));
	} else {
		tmp = 0.011111111111111112 * (((angle * ((double) M_PI)) * t_1) * t_0);
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.abs(a) + b;
	double t_1 = b - Math.abs(a);
	double tmp;
	if (Math.abs(a) <= 2.95e+224) {
		tmp = t_0 * (t_1 * Math.sin(((0.011111111111111112 * Math.PI) * angle)));
	} else {
		tmp = 0.011111111111111112 * (((angle * Math.PI) * t_1) * t_0);
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = math.fabs(a) + b
	t_1 = b - math.fabs(a)
	tmp = 0
	if math.fabs(a) <= 2.95e+224:
		tmp = t_0 * (t_1 * math.sin(((0.011111111111111112 * math.pi) * angle)))
	else:
		tmp = 0.011111111111111112 * (((angle * math.pi) * t_1) * t_0)
	return tmp
function code(a, b, angle)
	t_0 = Float64(abs(a) + b)
	t_1 = Float64(b - abs(a))
	tmp = 0.0
	if (abs(a) <= 2.95e+224)
		tmp = Float64(t_0 * Float64(t_1 * sin(Float64(Float64(0.011111111111111112 * pi) * angle))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(angle * pi) * t_1) * t_0));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = abs(a) + b;
	t_1 = b - abs(a);
	tmp = 0.0;
	if (abs(a) <= 2.95e+224)
		tmp = t_0 * (t_1 * sin(((0.011111111111111112 * pi) * angle)));
	else
		tmp = 0.011111111111111112 * (((angle * pi) * t_1) * t_0);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$1 = N[(b - N[Abs[a], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[a], $MachinePrecision], 294999999999999979715892151964708824211181979871733743190477131889411011138639576703702293249515424096579239073331843163821161847545577565121560611077028454405154333307039309919961205010578929076059141599838785369121243529216], N[(t$95$0 * N[(t$95$1 * N[Sin[N[(N[(1/90 * Pi), $MachinePrecision] * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[(angle * Pi), $MachinePrecision] * t$95$1), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|a\right| + b\\
t_1 := b - \left|a\right|\\
\mathbf{if}\;\left|a\right| \leq 294999999999999979715892151964708824211181979871733743190477131889411011138639576703702293249515424096579239073331843163821161847545577565121560611077028454405154333307039309919961205010578929076059141599838785369121243529216:\\
\;\;\;\;t\_0 \cdot \left(t\_1 \cdot \sin \left(\left(\frac{1}{90} \cdot \pi\right) \cdot angle\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot t\_1\right) \cdot t\_0\right)\\


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

    if 2.9499999999999998e224 < a

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 66.5% accurate, 1.3× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(\left|a\right| + \left|b\right|\right) \cdot \left(\left|b\right| \cdot t\_0\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)))) < 1.9999999999999999e-268

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in a around inf

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      7. lower-PI.f6435.9%

        \[\leadsto -1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\right) \]
    6. Applied rewrites35.9%

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left(\left(\sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right) \cdot a\right) \cdot a\right) \]
    8. Applied rewrites41.2%

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

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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in a around 0

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(b \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\right) \]
    6. Applied rewrites42.6%

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

Alternative 7: 65.1% accurate, 1.3× speedup?

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

\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \left(\left|b\right| \cdot \sin \left(\frac{1}{90} \cdot \left(angle \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)))) < -5e-206

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-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.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in a around 0

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(b \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\right) \]
    6. Applied rewrites42.6%

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

Alternative 8: 64.4% accurate, 1.8× speedup?

\[\begin{array}{l} t_0 := \left|a\right| + \left|b\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq \frac{5072854620270127}{9223372036854775808}:\\ \;\;\;\;\left(\left(\left|angle\right| \cdot \left(t\_0 \cdot \pi\right)\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \frac{1}{90}\\ \mathbf{elif}\;\left|angle\right| \leq 4000000000000000193386768462214636230113579383562057023488:\\ \;\;\;\;\left(\left(-\left|a\right|\right) \cdot \left|a\right|\right) \cdot \sin \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(t\_0 \cdot \left(-1 \cdot \left|a\right|\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (let* ((t_0 (+ (fabs a) (fabs b))))
  (*
   (copysign 1 angle)
   (if (<= (fabs angle) 5072854620270127/9223372036854775808)
     (* (* (* (fabs angle) (* t_0 PI)) (- (fabs b) (fabs a))) 1/90)
     (if (<=
          (fabs angle)
          4000000000000000193386768462214636230113579383562057023488)
       (*
        (* (- (fabs a)) (fabs a))
        (sin (* 1/90 (* (fabs angle) PI))))
       (* 1/90 (* (fabs angle) (* PI (* t_0 (* -1 (fabs a)))))))))))
double code(double a, double b, double angle) {
	double t_0 = fabs(a) + fabs(b);
	double tmp;
	if (fabs(angle) <= 0.00055) {
		tmp = ((fabs(angle) * (t_0 * ((double) M_PI))) * (fabs(b) - fabs(a))) * 0.011111111111111112;
	} else if (fabs(angle) <= 4e+57) {
		tmp = (-fabs(a) * fabs(a)) * sin((0.011111111111111112 * (fabs(angle) * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (t_0 * (-1.0 * fabs(a)))));
	}
	return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.abs(a) + Math.abs(b);
	double tmp;
	if (Math.abs(angle) <= 0.00055) {
		tmp = ((Math.abs(angle) * (t_0 * Math.PI)) * (Math.abs(b) - Math.abs(a))) * 0.011111111111111112;
	} else if (Math.abs(angle) <= 4e+57) {
		tmp = (-Math.abs(a) * Math.abs(a)) * Math.sin((0.011111111111111112 * (Math.abs(angle) * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (t_0 * (-1.0 * Math.abs(a)))));
	}
	return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle):
	t_0 = math.fabs(a) + math.fabs(b)
	tmp = 0
	if math.fabs(angle) <= 0.00055:
		tmp = ((math.fabs(angle) * (t_0 * math.pi)) * (math.fabs(b) - math.fabs(a))) * 0.011111111111111112
	elif math.fabs(angle) <= 4e+57:
		tmp = (-math.fabs(a) * math.fabs(a)) * math.sin((0.011111111111111112 * (math.fabs(angle) * math.pi)))
	else:
		tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (t_0 * (-1.0 * math.fabs(a)))))
	return math.copysign(1.0, angle) * tmp
function code(a, b, angle)
	t_0 = Float64(abs(a) + abs(b))
	tmp = 0.0
	if (abs(angle) <= 0.00055)
		tmp = Float64(Float64(Float64(abs(angle) * Float64(t_0 * pi)) * Float64(abs(b) - abs(a))) * 0.011111111111111112);
	elseif (abs(angle) <= 4e+57)
		tmp = Float64(Float64(Float64(-abs(a)) * abs(a)) * sin(Float64(0.011111111111111112 * Float64(abs(angle) * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(t_0 * Float64(-1.0 * abs(a))))));
	end
	return Float64(copysign(1.0, angle) * tmp)
end
function tmp_2 = code(a, b, angle)
	t_0 = abs(a) + abs(b);
	tmp = 0.0;
	if (abs(angle) <= 0.00055)
		tmp = ((abs(angle) * (t_0 * pi)) * (abs(b) - abs(a))) * 0.011111111111111112;
	elseif (abs(angle) <= 4e+57)
		tmp = (-abs(a) * abs(a)) * sin((0.011111111111111112 * (abs(angle) * pi)));
	else
		tmp = 0.011111111111111112 * (abs(angle) * (pi * (t_0 * (-1.0 * abs(a)))));
	end
	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 5072854620270127/9223372036854775808], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(t$95$0 * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision], If[LessEqual[N[Abs[angle], $MachinePrecision], 4000000000000000193386768462214636230113579383562057023488], N[(N[((-N[Abs[a], $MachinePrecision]) * N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(t$95$0 * N[(-1 * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_0 := \left|a\right| + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq \frac{5072854620270127}{9223372036854775808}:\\
\;\;\;\;\left(\left(\left|angle\right| \cdot \left(t\_0 \cdot \pi\right)\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \frac{1}{90}\\

\mathbf{elif}\;\left|angle\right| \leq 4000000000000000193386768462214636230113579383562057023488:\\
\;\;\;\;\left(\left(-\left|a\right|\right) \cdot \left|a\right|\right) \cdot \sin \left(\frac{1}{90} \cdot \left(\left|angle\right| \cdot \pi\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(t\_0 \cdot \left(-1 \cdot \left|a\right|\right)\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 5.5000000000000003e-4

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(angle \cdot \left(\left(a + b\right) \cdot \pi\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
    8. Applied rewrites62.9%

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

    if 5.5000000000000003e-4 < angle < 4.0000000000000002e57

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in a around inf

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

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

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

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

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

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

        \[\leadsto -1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
      7. lower-PI.f6435.9%

        \[\leadsto -1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\right) \]
    6. Applied rewrites35.9%

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

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

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

        \[\leadsto \mathsf{neg}\left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)\right) \]
      4. distribute-lft-neg-inN/A

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

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

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

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

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

        \[\leadsto \left(\left(\mathsf{neg}\left(a\right)\right) \cdot a\right) \cdot \sin \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \pi\right)\right)} \]
      10. lower-neg.f6435.9%

        \[\leadsto \left(\left(-a\right) \cdot a\right) \cdot \sin \left(\color{blue}{\frac{1}{90}} \cdot \left(angle \cdot \pi\right)\right) \]
    8. Applied rewrites35.9%

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

    if 4.0000000000000002e57 < angle

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(-1 \cdot a\right)\right)\right)\right) \]
    9. Applied rewrites37.0%

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

Alternative 9: 64.1% accurate, 1.3× speedup?

\[\begin{array}{l} \mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq \frac{-1129605583483287}{22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;b \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right)\\ \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (if (<=
     (* 2 (- (pow b 2) (pow a 2)))
     -1129605583483287/22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296)
  (* 1/90 (* (* (* angle PI) (- b a)) (+ a b)))
  (* b (* (- b a) (sin (* (* angle PI) 1/90))))))
double code(double a, double b, double angle) {
	double tmp;
	if ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) <= -5e-206) {
		tmp = 0.011111111111111112 * (((angle * ((double) M_PI)) * (b - a)) * (a + b));
	} else {
		tmp = b * ((b - a) * sin(((angle * ((double) M_PI)) * 0.011111111111111112)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if ((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) <= -5e-206) {
		tmp = 0.011111111111111112 * (((angle * Math.PI) * (b - a)) * (a + b));
	} else {
		tmp = b * ((b - a) * Math.sin(((angle * Math.PI) * 0.011111111111111112)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) <= -5e-206:
		tmp = 0.011111111111111112 * (((angle * math.pi) * (b - a)) * (a + b))
	else:
		tmp = b * ((b - a) * math.sin(((angle * math.pi) * 0.011111111111111112)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if (Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) <= -5e-206)
		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(angle * pi) * Float64(b - a)) * Float64(a + b)));
	else
		tmp = Float64(b * Float64(Float64(b - a) * sin(Float64(Float64(angle * pi) * 0.011111111111111112))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if ((2.0 * ((b ^ 2.0) - (a ^ 2.0))) <= -5e-206)
		tmp = 0.011111111111111112 * (((angle * pi) * (b - a)) * (a + b));
	else
		tmp = b * ((b - a) * sin(((angle * pi) * 0.011111111111111112)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[LessEqual[N[(2 * N[(N[Power[b, 2], $MachinePrecision] - N[Power[a, 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1129605583483287/22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296], N[(1/90 * N[(N[(N[(angle * Pi), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(angle * Pi), $MachinePrecision] * 1/90), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;2 \cdot \left({b}^{2} - {a}^{2}\right) \leq \frac{-1129605583483287}{22592111669665739975592870737637022906810831294812620197467215446901550642889587999246991367961839975767182923986271972624986374927027127581012424707895568851446368731861728964581056579941628221790058875830676242925879296}:\\
\;\;\;\;\frac{1}{90} \cdot \left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\

\mathbf{else}:\\
\;\;\;\;b \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\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)))) < -5e-206

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    4. Taylor expanded in angle around 0

      \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-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.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    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.6%

        \[\leadsto \color{blue}{b} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot \frac{1}{90}\right)\right) \]
    6. Recombined 2 regimes into one program.
    7. Add Preprocessing

    Alternative 10: 64.1% accurate, 3.0× speedup?

    \[\begin{array}{l} t_0 := \left|a\right| + \left|b\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq \frac{5718490662849961}{9223372036854775808}:\\ \;\;\;\;\left(\left(\left|angle\right| \cdot \left(t\_0 \cdot \pi\right)\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \frac{1}{90}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(t\_0 \cdot \left(-1 \cdot \left|a\right|\right)\right)\right)\right)\\ \end{array} \end{array} \]
    (FPCore (a b angle)
      :precision binary64
      (let* ((t_0 (+ (fabs a) (fabs b))))
      (*
       (copysign 1 angle)
       (if (<= (fabs angle) 5718490662849961/9223372036854775808)
         (* (* (* (fabs angle) (* t_0 PI)) (- (fabs b) (fabs a))) 1/90)
         (* 1/90 (* (fabs angle) (* PI (* t_0 (* -1 (fabs a))))))))))
    double code(double a, double b, double angle) {
    	double t_0 = fabs(a) + fabs(b);
    	double tmp;
    	if (fabs(angle) <= 0.00062) {
    		tmp = ((fabs(angle) * (t_0 * ((double) M_PI))) * (fabs(b) - fabs(a))) * 0.011111111111111112;
    	} else {
    		tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (t_0 * (-1.0 * fabs(a)))));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double t_0 = Math.abs(a) + Math.abs(b);
    	double tmp;
    	if (Math.abs(angle) <= 0.00062) {
    		tmp = ((Math.abs(angle) * (t_0 * Math.PI)) * (Math.abs(b) - Math.abs(a))) * 0.011111111111111112;
    	} else {
    		tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (t_0 * (-1.0 * Math.abs(a)))));
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	t_0 = math.fabs(a) + math.fabs(b)
    	tmp = 0
    	if math.fabs(angle) <= 0.00062:
    		tmp = ((math.fabs(angle) * (t_0 * math.pi)) * (math.fabs(b) - math.fabs(a))) * 0.011111111111111112
    	else:
    		tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (t_0 * (-1.0 * math.fabs(a)))))
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	t_0 = Float64(abs(a) + abs(b))
    	tmp = 0.0
    	if (abs(angle) <= 0.00062)
    		tmp = Float64(Float64(Float64(abs(angle) * Float64(t_0 * pi)) * Float64(abs(b) - abs(a))) * 0.011111111111111112);
    	else
    		tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(t_0 * Float64(-1.0 * abs(a))))));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	t_0 = abs(a) + abs(b);
    	tmp = 0.0;
    	if (abs(angle) <= 0.00062)
    		tmp = ((abs(angle) * (t_0 * pi)) * (abs(b) - abs(a))) * 0.011111111111111112;
    	else
    		tmp = 0.011111111111111112 * (abs(angle) * (pi * (t_0 * (-1.0 * abs(a)))));
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
    end
    
    code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 5718490662849961/9223372036854775808], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(t$95$0 * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(t$95$0 * N[(-1 * N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
    
    \begin{array}{l}
    t_0 := \left|a\right| + \left|b\right|\\
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq \frac{5718490662849961}{9223372036854775808}:\\
    \;\;\;\;\left(\left(\left|angle\right| \cdot \left(t\_0 \cdot \pi\right)\right) \cdot \left(\left|b\right| - \left|a\right|\right)\right) \cdot \frac{1}{90}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(t\_0 \cdot \left(-1 \cdot \left|a\right|\right)\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 6.2e-4

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(angle \cdot \left(\left(a + b\right) \cdot \pi\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      8. Applied rewrites62.9%

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

      if 6.2e-4 < angle

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(-1 \cdot a\right)\right)\right)\right) \]
      9. Applied rewrites37.0%

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

    Alternative 11: 64.1% accurate, 3.2× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq \frac{4789048565205903}{95780971304118053647396689196894323976171195136475136}:\\ \;\;\;\;\left(\left(\left|angle\right| \cdot \left(\left(a + b\right) \cdot \pi\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\\ \mathbf{else}:\\ \;\;\;\;\left(\left|angle\right| \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right)\\ \end{array} \]
    (FPCore (a b angle)
      :precision binary64
      (*
     (copysign 1 angle)
     (if (<=
          (fabs angle)
          4789048565205903/95780971304118053647396689196894323976171195136475136)
       (* (* (* (fabs angle) (* (+ a b) PI)) (- b a)) 1/90)
       (* (* (fabs angle) PI) (* (* (- b a) (+ a b)) 1/90)))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 5e-38) {
    		tmp = ((fabs(angle) * ((a + b) * ((double) M_PI))) * (b - a)) * 0.011111111111111112;
    	} else {
    		tmp = (fabs(angle) * ((double) M_PI)) * (((b - a) * (a + b)) * 0.011111111111111112);
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (Math.abs(angle) <= 5e-38) {
    		tmp = ((Math.abs(angle) * ((a + b) * Math.PI)) * (b - a)) * 0.011111111111111112;
    	} else {
    		tmp = (Math.abs(angle) * Math.PI) * (((b - a) * (a + b)) * 0.011111111111111112);
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if math.fabs(angle) <= 5e-38:
    		tmp = ((math.fabs(angle) * ((a + b) * math.pi)) * (b - a)) * 0.011111111111111112
    	else:
    		tmp = (math.fabs(angle) * math.pi) * (((b - a) * (a + b)) * 0.011111111111111112)
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 5e-38)
    		tmp = Float64(Float64(Float64(abs(angle) * Float64(Float64(a + b) * pi)) * Float64(b - a)) * 0.011111111111111112);
    	else
    		tmp = Float64(Float64(abs(angle) * pi) * Float64(Float64(Float64(b - a) * Float64(a + b)) * 0.011111111111111112));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (abs(angle) <= 5e-38)
    		tmp = ((abs(angle) * ((a + b) * pi)) * (b - a)) * 0.011111111111111112;
    	else
    		tmp = (abs(angle) * pi) * (((b - a) * (a + b)) * 0.011111111111111112);
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
    end
    
    code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 4789048565205903/95780971304118053647396689196894323976171195136475136], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision], N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * 1/90), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq \frac{4789048565205903}{95780971304118053647396689196894323976171195136475136}:\\
    \;\;\;\;\left(\left(\left|angle\right| \cdot \left(\left(a + b\right) \cdot \pi\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left|angle\right| \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \frac{1}{90}\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 5.0000000000000003e-38

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\left(angle \cdot \left(\left(a + b\right) \cdot \pi\right)\right) \cdot \left(b - a\right)\right) \cdot \frac{1}{90} \]
      8. Applied rewrites62.9%

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

      if 5.0000000000000003e-38 < angle

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 62.6% accurate, 3.2× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq \frac{1461501637330903}{1461501637330902918203684832716283019655932542976}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\left|angle\right| \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\ \end{array} \]
    (FPCore (a b angle)
      :precision binary64
      (*
     (copysign 1 angle)
     (if (<=
          (fabs angle)
          1461501637330903/1461501637330902918203684832716283019655932542976)
       (* 1/90 (* (* (* (fabs angle) PI) (- b a)) (+ a b)))
       (* (* (* 1/90 (fabs angle)) PI) (* (- b a) (+ a b))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 1e-33) {
    		tmp = 0.011111111111111112 * (((fabs(angle) * ((double) M_PI)) * (b - a)) * (a + b));
    	} else {
    		tmp = ((0.011111111111111112 * fabs(angle)) * ((double) M_PI)) * ((b - a) * (a + b));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (Math.abs(angle) <= 1e-33) {
    		tmp = 0.011111111111111112 * (((Math.abs(angle) * Math.PI) * (b - a)) * (a + b));
    	} else {
    		tmp = ((0.011111111111111112 * Math.abs(angle)) * Math.PI) * ((b - a) * (a + b));
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if math.fabs(angle) <= 1e-33:
    		tmp = 0.011111111111111112 * (((math.fabs(angle) * math.pi) * (b - a)) * (a + b))
    	else:
    		tmp = ((0.011111111111111112 * math.fabs(angle)) * math.pi) * ((b - a) * (a + b))
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 1e-33)
    		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(abs(angle) * pi) * Float64(b - a)) * Float64(a + b)));
    	else
    		tmp = Float64(Float64(Float64(0.011111111111111112 * abs(angle)) * pi) * Float64(Float64(b - a) * Float64(a + b)));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (abs(angle) <= 1e-33)
    		tmp = 0.011111111111111112 * (((abs(angle) * pi) * (b - a)) * (a + b));
    	else
    		tmp = ((0.011111111111111112 * abs(angle)) * pi) * ((b - a) * (a + b));
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
    end
    
    code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 1461501637330903/1461501637330902918203684832716283019655932542976], N[(1/90 * N[(N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1/90 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq \frac{1461501637330903}{1461501637330902918203684832716283019655932542976}:\\
    \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\left|angle\right| \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\frac{1}{90} \cdot \left|angle\right|\right) \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 1.0000000000000001e-33

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.0000000000000001e-33 < angle

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 62.1% accurate, 3.2× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq \frac{1461501637330903}{1461501637330902918203684832716283019655932542976}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\left|angle\right| \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \end{array} \]
    (FPCore (a b angle)
      :precision binary64
      (*
     (copysign 1 angle)
     (if (<=
          (fabs angle)
          1461501637330903/1461501637330902918203684832716283019655932542976)
       (* 1/90 (* (* (* (fabs angle) PI) (- b a)) (+ a b)))
       (* 1/90 (* (fabs angle) (* PI (* (+ a b) (- b a))))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 1e-33) {
    		tmp = 0.011111111111111112 * (((fabs(angle) * ((double) M_PI)) * (b - a)) * (a + b));
    	} else {
    		tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * ((a + b) * (b - a))));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (Math.abs(angle) <= 1e-33) {
    		tmp = 0.011111111111111112 * (((Math.abs(angle) * Math.PI) * (b - a)) * (a + b));
    	} else {
    		tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * ((a + b) * (b - a))));
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if math.fabs(angle) <= 1e-33:
    		tmp = 0.011111111111111112 * (((math.fabs(angle) * math.pi) * (b - a)) * (a + b))
    	else:
    		tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * ((a + b) * (b - a))))
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 1e-33)
    		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(abs(angle) * pi) * Float64(b - a)) * Float64(a + b)));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(Float64(a + b) * Float64(b - a)))));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (abs(angle) <= 1e-33)
    		tmp = 0.011111111111111112 * (((abs(angle) * pi) * (b - a)) * (a + b));
    	else
    		tmp = 0.011111111111111112 * (abs(angle) * (pi * ((a + b) * (b - a))));
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
    end
    
    code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 1461501637330903/1461501637330902918203684832716283019655932542976], N[(1/90 * N[(N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq \frac{1461501637330903}{1461501637330902918203684832716283019655932542976}:\\
    \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\left|angle\right| \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 1.0000000000000001e-33

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.0000000000000001e-33 < angle

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

    Alternative 14: 58.5% accurate, 1.8× 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 \frac{6490371073168535}{1298074214633706907132624082305024}:\\ \;\;\;\;\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\left|a\right| + \left|b\right|\right) \cdot t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot angle\right)\right)\\ \end{array} \]
    (FPCore (a b angle)
      :precision binary64
      (let* ((t_0 (- (fabs b) (fabs a))))
      (if (<=
           (* 2 (- (pow (fabs b) 2) (pow (fabs a) 2)))
           6490371073168535/1298074214633706907132624082305024)
        (* 1/90 (* angle (* PI (* (+ (fabs a) (fabs b)) t_0))))
        (* 1/90 (* (* (fabs b) PI) (* t_0 angle))))))
    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-18) {
    		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((fabs(a) + fabs(b)) * t_0)));
    	} else {
    		tmp = 0.011111111111111112 * ((fabs(b) * ((double) M_PI)) * (t_0 * angle));
    	}
    	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-18) {
    		tmp = 0.011111111111111112 * (angle * (Math.PI * ((Math.abs(a) + Math.abs(b)) * t_0)));
    	} else {
    		tmp = 0.011111111111111112 * ((Math.abs(b) * Math.PI) * (t_0 * angle));
    	}
    	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-18:
    		tmp = 0.011111111111111112 * (angle * (math.pi * ((math.fabs(a) + math.fabs(b)) * t_0)))
    	else:
    		tmp = 0.011111111111111112 * ((math.fabs(b) * math.pi) * (t_0 * angle))
    	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-18)
    		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(abs(a) + abs(b)) * t_0))));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(b) * pi) * Float64(t_0 * angle)));
    	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-18)
    		tmp = 0.011111111111111112 * (angle * (pi * ((abs(a) + abs(b)) * t_0)));
    	else
    		tmp = 0.011111111111111112 * ((abs(b) * pi) * (t_0 * angle));
    	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 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 6490371073168535/1298074214633706907132624082305024], N[(1/90 * N[(angle * N[(Pi * N[(N[(N[Abs[a], $MachinePrecision] + N[Abs[b], $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision] * N[(t$95$0 * angle), $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 \frac{6490371073168535}{1298074214633706907132624082305024}:\\
    \;\;\;\;\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(\left|a\right| + \left|b\right|\right) \cdot t\_0\right)\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot angle\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.0000000000000004e-18

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)} \]
      4. Taylor expanded in angle around 0

        \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
      5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{angle}\right)\right) \]
        3. Applied rewrites41.7%

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

      Alternative 15: 43.8% accurate, 0.7× speedup?

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

        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\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)} \]
        4. Taylor expanded in angle around 0

          \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
        5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
          2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
            13. lift-sin.f64N/A

              \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
            14. lift-cos.f64N/A

              \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
          3. Applied rewrites68.9%

            \[\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)} \]
          4. Taylor expanded in angle around 0

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
          5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right) \]
            3. lower-*.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
            4. lower-PI.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
            5. lower-*.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
            6. lower-+.f64N/A

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
            7. lower--.f6454.2%

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
          6. Applied rewrites54.2%

            \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
          7. Taylor expanded in a around 0

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
          8. Step-by-step derivation
            1. Applied rewrites37.7%

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
              2. *-commutativeN/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{angle}\right) \]
              3. lift-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
              4. lift-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
              5. associate-*r*N/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot b\right) \cdot \left(b - a\right)\right) \cdot angle\right) \]
              6. associate-*l*N/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
              7. lower-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
              8. *-commutativeN/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot angle\right)\right) \]
              9. lower-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot angle\right)\right) \]
              10. lower-*.f6441.7%

                \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{angle}\right)\right) \]
            3. Applied rewrites41.7%

              \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
          9. Recombined 2 regimes into one program.
          10. Add Preprocessing

          Alternative 16: 43.8% accurate, 0.7× speedup?

          \[\begin{array}{l} t_0 := \left|b\right| - \left|a\right|\\ t_1 := \pi \cdot \frac{\left|angle\right|}{180}\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq \frac{6518515124270355}{32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\pi \cdot t\_0\right) \cdot \left|b\right|\right) \cdot \left|angle\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot \left|angle\right|\right)\right)\\ \end{array} \end{array} \]
          (FPCore (a b angle)
            :precision binary64
            (let* ((t_0 (- (fabs b) (fabs a))) (t_1 (* PI (/ (fabs angle) 180))))
            (*
             (copysign 1 angle)
             (if (<=
                  (*
                   (* (* 2 (- (pow (fabs b) 2) (pow (fabs a) 2))) (sin t_1))
                   (cos t_1))
                  6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016)
               (* 1/90 (* (* (* PI t_0) (fabs b)) (fabs angle)))
               (* 1/90 (* (* (fabs b) PI) (* t_0 (fabs angle))))))))
          double code(double a, double b, double angle) {
          	double t_0 = fabs(b) - fabs(a);
          	double t_1 = ((double) M_PI) * (fabs(angle) / 180.0);
          	double tmp;
          	if ((((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) {
          		tmp = 0.011111111111111112 * (((((double) M_PI) * t_0) * fabs(b)) * fabs(angle));
          	} else {
          		tmp = 0.011111111111111112 * ((fabs(b) * ((double) M_PI)) * (t_0 * fabs(angle)));
          	}
          	return copysign(1.0, angle) * tmp;
          }
          
          public static double code(double a, double b, double angle) {
          	double t_0 = Math.abs(b) - Math.abs(a);
          	double t_1 = Math.PI * (Math.abs(angle) / 180.0);
          	double tmp;
          	if ((((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) * Math.sin(t_1)) * Math.cos(t_1)) <= 2e-76) {
          		tmp = 0.011111111111111112 * (((Math.PI * t_0) * Math.abs(b)) * Math.abs(angle));
          	} else {
          		tmp = 0.011111111111111112 * ((Math.abs(b) * Math.PI) * (t_0 * Math.abs(angle)));
          	}
          	return Math.copySign(1.0, angle) * tmp;
          }
          
          def code(a, b, angle):
          	t_0 = math.fabs(b) - math.fabs(a)
          	t_1 = math.pi * (math.fabs(angle) / 180.0)
          	tmp = 0
          	if (((2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) * math.sin(t_1)) * math.cos(t_1)) <= 2e-76:
          		tmp = 0.011111111111111112 * (((math.pi * t_0) * math.fabs(b)) * math.fabs(angle))
          	else:
          		tmp = 0.011111111111111112 * ((math.fabs(b) * math.pi) * (t_0 * math.fabs(angle)))
          	return math.copysign(1.0, angle) * tmp
          
          function code(a, b, angle)
          	t_0 = Float64(abs(b) - abs(a))
          	t_1 = Float64(pi * Float64(abs(angle) / 180.0))
          	tmp = 0.0
          	if (Float64(Float64(Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76)
          		tmp = Float64(0.011111111111111112 * Float64(Float64(Float64(pi * t_0) * abs(b)) * abs(angle)));
          	else
          		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(b) * pi) * Float64(t_0 * abs(angle))));
          	end
          	return Float64(copysign(1.0, angle) * tmp)
          end
          
          function tmp_2 = code(a, b, angle)
          	t_0 = abs(b) - abs(a);
          	t_1 = pi * (abs(angle) / 180.0);
          	tmp = 0.0;
          	if ((((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76)
          		tmp = 0.011111111111111112 * (((pi * t_0) * abs(b)) * abs(angle));
          	else
          		tmp = 0.011111111111111112 * ((abs(b) * pi) * (t_0 * abs(angle)));
          	end
          	tmp_2 = (sign(angle) * abs(1.0)) * 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[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[(N[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016], N[(1/90 * N[(N[(N[(Pi * t$95$0), $MachinePrecision] * N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision] * N[(t$95$0 * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
          
          \begin{array}{l}
          t_0 := \left|b\right| - \left|a\right|\\
          t_1 := \pi \cdot \frac{\left|angle\right|}{180}\\
          \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
          \mathbf{if}\;\left(\left(2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq \frac{6518515124270355}{32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016}:\\
          \;\;\;\;\frac{1}{90} \cdot \left(\left(\left(\pi \cdot t\_0\right) \cdot \left|b\right|\right) \cdot \left|angle\right|\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot \left|angle\right|\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.9999999999999999e-76

            1. Initial program 54.1%

              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
              2. lift-*.f64N/A

                \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              3. associate-*l*N/A

                \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
              4. lift-*.f64N/A

                \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
              6. associate-*l*N/A

                \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
              7. lift--.f64N/A

                \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
              8. lift-pow.f64N/A

                \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
              9. unpow2N/A

                \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
              10. lift-pow.f64N/A

                \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
              11. unpow2N/A

                \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
              12. difference-of-squaresN/A

                \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
              13. lift-sin.f64N/A

                \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
              14. lift-cos.f64N/A

                \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
            3. Applied rewrites68.9%

              \[\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)} \]
            4. Taylor expanded in angle around 0

              \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
            5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right) \]
              3. lower-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
              4. lower-PI.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
              5. lower-*.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
              6. lower-+.f64N/A

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
              7. lower--.f6454.2%

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
            6. Applied rewrites54.2%

              \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
            7. Taylor expanded in a around 0

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
            8. Step-by-step derivation
              1. Applied rewrites37.7%

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
                2. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{angle}\right) \]
                3. lower-*.f6437.7%

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{angle}\right) \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
                6. *-commutativeN/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(\left(b - a\right) \cdot b\right)\right) \cdot angle\right) \]
                7. associate-*r*N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot \left(b - a\right)\right) \cdot b\right) \cdot angle\right) \]
                8. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot \left(b - a\right)\right) \cdot b\right) \cdot angle\right) \]
                9. lower-*.f6437.7%

                  \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot \left(b - a\right)\right) \cdot b\right) \cdot angle\right) \]
              3. Applied rewrites37.7%

                \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot \left(b - a\right)\right) \cdot b\right) \cdot \color{blue}{angle}\right) \]

              if 1.9999999999999999e-76 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

              1. Initial program 54.1%

                \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              2. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                2. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                3. associate-*l*N/A

                  \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                5. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                6. associate-*l*N/A

                  \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                7. lift--.f64N/A

                  \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                9. unpow2N/A

                  \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                10. lift-pow.f64N/A

                  \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                11. unpow2N/A

                  \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                12. difference-of-squaresN/A

                  \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                13. lift-sin.f64N/A

                  \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                14. lift-cos.f64N/A

                  \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
              3. Applied rewrites68.9%

                \[\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)} \]
              4. Taylor expanded in angle around 0

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
              5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                4. lower-PI.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
                5. lower-*.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                6. lower-+.f64N/A

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                7. lower--.f6454.2%

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
              6. Applied rewrites54.2%

                \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
              7. Taylor expanded in a around 0

                \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
              8. Step-by-step derivation
                1. Applied rewrites37.7%

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                2. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
                  2. *-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{angle}\right) \]
                  3. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
                  5. associate-*r*N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot b\right) \cdot \left(b - a\right)\right) \cdot angle\right) \]
                  6. associate-*l*N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
                  7. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
                  8. *-commutativeN/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot angle\right)\right) \]
                  9. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot angle\right)\right) \]
                  10. lower-*.f6441.7%

                    \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{angle}\right)\right) \]
                3. Applied rewrites41.7%

                  \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
              9. Recombined 2 regimes into one program.
              10. Add Preprocessing

              Alternative 17: 43.7% accurate, 0.7× speedup?

              \[\begin{array}{l} t_0 := \left|b\right| - \left|a\right|\\ t_1 := \pi \cdot \frac{\left|angle\right|}{180}\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq \frac{6518515124270355}{32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left|b\right| \cdot t\_0\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot \left|angle\right|\right)\right)\\ \end{array} \end{array} \]
              (FPCore (a b angle)
                :precision binary64
                (let* ((t_0 (- (fabs b) (fabs a))) (t_1 (* PI (/ (fabs angle) 180))))
                (*
                 (copysign 1 angle)
                 (if (<=
                      (*
                       (* (* 2 (- (pow (fabs b) 2) (pow (fabs a) 2))) (sin t_1))
                       (cos t_1))
                      6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016)
                   (* 1/90 (* (fabs angle) (* PI (* (fabs b) t_0))))
                   (* 1/90 (* (* (fabs b) PI) (* t_0 (fabs angle))))))))
              double code(double a, double b, double angle) {
              	double t_0 = fabs(b) - fabs(a);
              	double t_1 = ((double) M_PI) * (fabs(angle) / 180.0);
              	double tmp;
              	if ((((2.0 * (pow(fabs(b), 2.0) - pow(fabs(a), 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76) {
              		tmp = 0.011111111111111112 * (fabs(angle) * (((double) M_PI) * (fabs(b) * t_0)));
              	} else {
              		tmp = 0.011111111111111112 * ((fabs(b) * ((double) M_PI)) * (t_0 * fabs(angle)));
              	}
              	return copysign(1.0, angle) * tmp;
              }
              
              public static double code(double a, double b, double angle) {
              	double t_0 = Math.abs(b) - Math.abs(a);
              	double t_1 = Math.PI * (Math.abs(angle) / 180.0);
              	double tmp;
              	if ((((2.0 * (Math.pow(Math.abs(b), 2.0) - Math.pow(Math.abs(a), 2.0))) * Math.sin(t_1)) * Math.cos(t_1)) <= 2e-76) {
              		tmp = 0.011111111111111112 * (Math.abs(angle) * (Math.PI * (Math.abs(b) * t_0)));
              	} else {
              		tmp = 0.011111111111111112 * ((Math.abs(b) * Math.PI) * (t_0 * Math.abs(angle)));
              	}
              	return Math.copySign(1.0, angle) * tmp;
              }
              
              def code(a, b, angle):
              	t_0 = math.fabs(b) - math.fabs(a)
              	t_1 = math.pi * (math.fabs(angle) / 180.0)
              	tmp = 0
              	if (((2.0 * (math.pow(math.fabs(b), 2.0) - math.pow(math.fabs(a), 2.0))) * math.sin(t_1)) * math.cos(t_1)) <= 2e-76:
              		tmp = 0.011111111111111112 * (math.fabs(angle) * (math.pi * (math.fabs(b) * t_0)))
              	else:
              		tmp = 0.011111111111111112 * ((math.fabs(b) * math.pi) * (t_0 * math.fabs(angle)))
              	return math.copysign(1.0, angle) * tmp
              
              function code(a, b, angle)
              	t_0 = Float64(abs(b) - abs(a))
              	t_1 = Float64(pi * Float64(abs(angle) / 180.0))
              	tmp = 0.0
              	if (Float64(Float64(Float64(2.0 * Float64((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76)
              		tmp = Float64(0.011111111111111112 * Float64(abs(angle) * Float64(pi * Float64(abs(b) * t_0))));
              	else
              		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(b) * pi) * Float64(t_0 * abs(angle))));
              	end
              	return Float64(copysign(1.0, angle) * tmp)
              end
              
              function tmp_2 = code(a, b, angle)
              	t_0 = abs(b) - abs(a);
              	t_1 = pi * (abs(angle) / 180.0);
              	tmp = 0.0;
              	if ((((2.0 * ((abs(b) ^ 2.0) - (abs(a) ^ 2.0))) * sin(t_1)) * cos(t_1)) <= 2e-76)
              		tmp = 0.011111111111111112 * (abs(angle) * (pi * (abs(b) * t_0)));
              	else
              		tmp = 0.011111111111111112 * ((abs(b) * pi) * (t_0 * abs(angle)));
              	end
              	tmp_2 = (sign(angle) * abs(1.0)) * 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[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[(N[(N[(2 * N[(N[Power[N[Abs[b], $MachinePrecision], 2], $MachinePrecision] - N[Power[N[Abs[a], $MachinePrecision], 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], 6518515124270355/32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016], N[(1/90 * N[(N[Abs[angle], $MachinePrecision] * N[(Pi * N[(N[Abs[b], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1/90 * N[(N[(N[Abs[b], $MachinePrecision] * Pi), $MachinePrecision] * N[(t$95$0 * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_0 := \left|b\right| - \left|a\right|\\
              t_1 := \pi \cdot \frac{\left|angle\right|}{180}\\
              \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
              \mathbf{if}\;\left(\left(2 \cdot \left({\left(\left|b\right|\right)}^{2} - {\left(\left|a\right|\right)}^{2}\right)\right) \cdot \sin t\_1\right) \cdot \cos t\_1 \leq \frac{6518515124270355}{32592575621351777380295131014550050576823494298654980010178247189670100796213387298934358016}:\\
              \;\;\;\;\frac{1}{90} \cdot \left(\left|angle\right| \cdot \left(\pi \cdot \left(\left|b\right| \cdot t\_0\right)\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{1}{90} \cdot \left(\left(\left|b\right| \cdot \pi\right) \cdot \left(t\_0 \cdot \left|angle\right|\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < 1.9999999999999999e-76

                1. Initial program 54.1%

                  \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                2. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                  2. lift-*.f64N/A

                    \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  3. associate-*l*N/A

                    \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                  4. lift-*.f64N/A

                    \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                  6. associate-*l*N/A

                    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                  7. lift--.f64N/A

                    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  8. lift-pow.f64N/A

                    \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  9. unpow2N/A

                    \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  10. lift-pow.f64N/A

                    \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  11. unpow2N/A

                    \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  12. difference-of-squaresN/A

                    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  13. lift-sin.f64N/A

                    \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                  14. lift-cos.f64N/A

                    \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
                3. Applied rewrites68.9%

                  \[\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)} \]
                4. Taylor expanded in angle around 0

                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                  2. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                  4. lower-PI.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
                  5. lower-*.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                  6. lower-+.f64N/A

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                  7. lower--.f6454.2%

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
                6. Applied rewrites54.2%

                  \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                7. Taylor expanded in a around 0

                  \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                8. Step-by-step derivation
                  1. Applied rewrites37.7%

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]

                  if 1.9999999999999999e-76 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

                  1. Initial program 54.1%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                    7. lift--.f64N/A

                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    8. lift-pow.f64N/A

                      \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    9. unpow2N/A

                      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    10. lift-pow.f64N/A

                      \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    11. unpow2N/A

                      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    12. difference-of-squaresN/A

                      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    13. lift-sin.f64N/A

                      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    14. lift-cos.f64N/A

                      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
                  3. Applied rewrites68.9%

                    \[\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)} \]
                  4. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                  5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                    6. lower-+.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                    7. lower--.f6454.2%

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                  7. Taylor expanded in a around 0

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                  8. Step-by-step derivation
                    1. Applied rewrites37.7%

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                    2. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)}\right) \]
                      2. *-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{angle}\right) \]
                      3. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
                      4. lift-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right) \cdot angle\right) \]
                      5. associate-*r*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot b\right) \cdot \left(b - a\right)\right) \cdot angle\right) \]
                      6. associate-*l*N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
                      7. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(\pi \cdot b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
                      8. *-commutativeN/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot angle\right)\right) \]
                      9. lower-*.f64N/A

                        \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\color{blue}{\left(b - a\right)} \cdot angle\right)\right) \]
                      10. lower-*.f6441.7%

                        \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{angle}\right)\right) \]
                    3. Applied rewrites41.7%

                      \[\leadsto \frac{1}{90} \cdot \left(\left(b \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot angle\right)}\right) \]
                  9. Recombined 2 regimes into one program.
                  10. Add Preprocessing

                  Alternative 18: 38.8% accurate, 15.1× speedup?

                  \[\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left|b\right| \cdot \left(\left|b\right| - \left|a\right|\right)\right)\right)\right) \]
                  (FPCore (a b angle)
                    :precision binary64
                    (* 1/90 (* angle (* PI (* (fabs b) (- (fabs b) (fabs a)))))))
                  double code(double a, double b, double angle) {
                  	return 0.011111111111111112 * (angle * (((double) M_PI) * (fabs(b) * (fabs(b) - fabs(a)))));
                  }
                  
                  public static double code(double a, double b, double angle) {
                  	return 0.011111111111111112 * (angle * (Math.PI * (Math.abs(b) * (Math.abs(b) - Math.abs(a)))));
                  }
                  
                  def code(a, b, angle):
                  	return 0.011111111111111112 * (angle * (math.pi * (math.fabs(b) * (math.fabs(b) - math.fabs(a)))))
                  
                  function code(a, b, angle)
                  	return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(abs(b) * Float64(abs(b) - abs(a))))))
                  end
                  
                  function tmp = code(a, b, angle)
                  	tmp = 0.011111111111111112 * (angle * (pi * (abs(b) * (abs(b) - abs(a)))));
                  end
                  
                  code[a_, b_, angle_] := N[(1/90 * N[(angle * N[(Pi * N[(N[Abs[b], $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                  
                  \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left|b\right| \cdot \left(\left|b\right| - \left|a\right|\right)\right)\right)\right)
                  
                  Derivation
                  1. Initial program 54.1%

                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                  2. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
                    2. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(\left({b}^{2} - {a}^{2}\right) \cdot 2\right)} \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
                    6. associate-*l*N/A

                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
                    7. lift--.f64N/A

                      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    8. lift-pow.f64N/A

                      \[\leadsto \left(\color{blue}{{b}^{2}} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    9. unpow2N/A

                      \[\leadsto \left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    10. lift-pow.f64N/A

                      \[\leadsto \left(b \cdot b - \color{blue}{{a}^{2}}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    11. unpow2N/A

                      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    12. difference-of-squaresN/A

                      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    13. lift-sin.f64N/A

                      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
                    14. lift-cos.f64N/A

                      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
                  3. Applied rewrites68.9%

                    \[\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)} \]
                  4. Taylor expanded in angle around 0

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                  5. 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(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
                    4. lower-PI.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)\right)\right)\right) \]
                    5. lower-*.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}\right)\right)\right) \]
                    6. lower-+.f64N/A

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                    7. lower--.f6454.2%

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
                  6. Applied rewrites54.2%

                    \[\leadsto \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
                  7. Taylor expanded in a around 0

                    \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                  8. Step-by-step derivation
                    1. Applied rewrites37.7%

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right)\right) \]
                    2. Add Preprocessing

                    Reproduce

                    ?
                    herbie shell --seed 2025285 -o generate:evaluate
                    (FPCore (a b angle)
                      :name "ab-angle->ABCF B"
                      :precision binary64
                      (* (* (* 2 (- (pow b 2) (pow a 2))) (sin (* PI (/ angle 180)))) (cos (* PI (/ angle 180)))))