ab-angle->ABCF B

Percentage Accurate: 53.9% → 68.4%
Time: 6.5s
Alternatives: 15
Speedup: 8.4×

Specification

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 53.9% accurate, 1.0× speedup?

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

Alternative 1: 68.4% accurate, 0.8× speedup?

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

\mathbf{elif}\;\left|angle\right| \leq 8.8 \cdot 10^{+165}:\\
\;\;\;\;\left(\left(t\_1 \cdot \left(t\_0 \cdot 2\right)\right) \cdot \sin t\_3\right) \cdot \cos t\_3\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(\log \left(e^{\pi \cdot 0.011111111111111112}\right) \cdot \left|angle\right|\right)\right)\\


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

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(a + b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot 2\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      14. lower--.f6457.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(\pi \cdot angle, \frac{1}{180}, \frac{\color{blue}{\pi}}{2}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(\pi \cdot angle\right)\right)\right)\right) \]
      14. mult-flipN/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(2 \cdot \left(b - a\right)\right) \cdot \left(\sin \left(\mathsf{fma}\left(\pi \cdot angle, \frac{1}{180}, \color{blue}{\pi \cdot \frac{1}{2}}\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(\pi \cdot angle\right)\right)\right)\right) \]
      16. metadata-eval68.2%

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

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

    if 5.2000000000000003e46 < angle < 8.7999999999999996e165

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(a + b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot 2\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      14. lower--.f6457.6%

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot 2\right)\right) \cdot \sin \left(\pi \cdot e^{\color{blue}{\log \left(\frac{180}{angle}\right) \cdot -1}}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. lower-unsound-log.f6427.9%

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

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

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

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

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

        \[\leadsto \left(\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot 2\right)\right) \cdot \sin \left(\pi \cdot e^{\log \left(\frac{180}{angle}\right) \cdot -1}\right)\right) \cdot \cos \left(\pi \cdot \color{blue}{{\left(\frac{180}{angle}\right)}^{-1}}\right) \]
      5. pow-to-expN/A

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

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

        \[\leadsto \left(\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot 2\right)\right) \cdot \sin \left(\pi \cdot e^{\log \left(\frac{180}{angle}\right) \cdot -1}\right)\right) \cdot \cos \left(\pi \cdot e^{\color{blue}{\log \left(\frac{180}{angle}\right) \cdot -1}}\right) \]
      8. lower-unsound-log.f6428.1%

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

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

    if 8.7999999999999996e165 < angle

    1. Initial program 53.9%

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

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

        \[\leadsto \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.0%

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \color{blue}{\log \left(e^{\mathsf{PI}\left(\right)}\right)}\right) \cdot angle\right)\right) \]
      4. log-pow-revN/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left({\left(e^{\color{blue}{\pi}}\right)}^{\frac{1}{90}}\right) \cdot angle\right)\right) \]
      7. pow-expN/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\frac{1}{90} \cdot \pi}}\right) \cdot angle\right)\right) \]
      10. lower-exp.f6466.5%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\pi \cdot \frac{1}{90}}}\right) \cdot angle\right)\right) \]
      13. lower-*.f6466.5%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\pi \cdot 0.011111111111111112}}\right) \cdot angle\right)\right) \]
    7. Applied rewrites66.5%

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

Alternative 2: 68.1% accurate, 1.0× speedup?

\[\begin{array}{l} t_0 := \left|b\right| - a\\ t_1 := \left|\left|angle\right|\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 1.65 \cdot 10^{+167}:\\ \;\;\;\;\left(\left|b\right| + a\right) \cdot \left(\left(2 \cdot t\_0\right) \cdot \frac{\sin \left(\mathsf{fma}\left(t\_1, \pi, \pi \cdot \left|angle\right|\right) \cdot 0.005555555555555556\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot \left|angle\right|, \pi, -\left(t\_1 \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + \left|b\right|\right) \cdot \left(t\_0 \cdot \sin \left(\log \left(e^{\pi \cdot 0.011111111111111112}\right) \cdot \left|angle\right|\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (let* ((t_0 (- (fabs b) a)) (t_1 (fabs (fabs angle))))
  (*
   (copysign 1.0 angle)
   (if (<= (fabs angle) 1.65e+167)
     (*
      (+ (fabs b) a)
      (*
       (* 2.0 t_0)
       (/
        (+
         (sin
          (* (fma t_1 PI (* PI (fabs angle))) 0.005555555555555556))
         (sin
          (fma
           (* 0.005555555555555556 (fabs angle))
           PI
           (- (* (* t_1 PI) 0.005555555555555556)))))
        2.0)))
     (*
      (+ a (fabs b))
      (*
       t_0
       (sin
        (* (log (exp (* PI 0.011111111111111112))) (fabs angle)))))))))
double code(double a, double b, double angle) {
	double t_0 = fabs(b) - a;
	double t_1 = fabs(fabs(angle));
	double tmp;
	if (fabs(angle) <= 1.65e+167) {
		tmp = (fabs(b) + a) * ((2.0 * t_0) * ((sin((fma(t_1, ((double) M_PI), (((double) M_PI) * fabs(angle))) * 0.005555555555555556)) + sin(fma((0.005555555555555556 * fabs(angle)), ((double) M_PI), -((t_1 * ((double) M_PI)) * 0.005555555555555556)))) / 2.0));
	} else {
		tmp = (a + fabs(b)) * (t_0 * sin((log(exp((((double) M_PI) * 0.011111111111111112))) * fabs(angle))));
	}
	return copysign(1.0, angle) * tmp;
}
function code(a, b, angle)
	t_0 = Float64(abs(b) - a)
	t_1 = abs(abs(angle))
	tmp = 0.0
	if (abs(angle) <= 1.65e+167)
		tmp = Float64(Float64(abs(b) + a) * Float64(Float64(2.0 * t_0) * Float64(Float64(sin(Float64(fma(t_1, pi, Float64(pi * abs(angle))) * 0.005555555555555556)) + sin(fma(Float64(0.005555555555555556 * abs(angle)), pi, Float64(-Float64(Float64(t_1 * pi) * 0.005555555555555556))))) / 2.0)));
	else
		tmp = Float64(Float64(a + abs(b)) * Float64(t_0 * sin(Float64(log(exp(Float64(pi * 0.011111111111111112))) * abs(angle)))));
	end
	return Float64(copysign(1.0, angle) * tmp)
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, Block[{t$95$1 = N[Abs[N[Abs[angle], $MachinePrecision]], $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 1.65e+167], N[(N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision] * N[(N[(2.0 * t$95$0), $MachinePrecision] * N[(N[(N[Sin[N[(N[(t$95$1 * Pi + N[(Pi * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]], $MachinePrecision] + N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] * Pi + (-N[(N[(t$95$1 * Pi), $MachinePrecision] * 0.005555555555555556), $MachinePrecision])), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[Sin[N[(N[Log[N[Exp[N[(Pi * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - a\\
t_1 := \left|\left|angle\right|\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 1.65 \cdot 10^{+167}:\\
\;\;\;\;\left(\left|b\right| + a\right) \cdot \left(\left(2 \cdot t\_0\right) \cdot \frac{\sin \left(\mathsf{fma}\left(t\_1, \pi, \pi \cdot \left|angle\right|\right) \cdot 0.005555555555555556\right) + \sin \left(\mathsf{fma}\left(0.005555555555555556 \cdot \left|angle\right|, \pi, -\left(t\_1 \cdot \pi\right) \cdot 0.005555555555555556\right)\right)}{2}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a + \left|b\right|\right) \cdot \left(t\_0 \cdot \sin \left(\log \left(e^{\pi \cdot 0.011111111111111112}\right) \cdot \left|angle\right|\right)\right)\\


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

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(a + b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot 2\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      14. lower--.f6457.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6500000000000001e167 < angle

    1. Initial program 53.9%

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

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

        \[\leadsto \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.0%

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \color{blue}{\log \left(e^{\mathsf{PI}\left(\right)}\right)}\right) \cdot angle\right)\right) \]
      4. log-pow-revN/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left({\left(e^{\color{blue}{\pi}}\right)}^{\frac{1}{90}}\right) \cdot angle\right)\right) \]
      7. pow-expN/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\frac{1}{90} \cdot \pi}}\right) \cdot angle\right)\right) \]
      10. lower-exp.f6466.5%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\pi \cdot \frac{1}{90}}}\right) \cdot angle\right)\right) \]
      13. lower-*.f6466.5%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\pi \cdot 0.011111111111111112}}\right) \cdot angle\right)\right) \]
    7. Applied rewrites66.5%

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

Alternative 3: 68.0% accurate, 1.5× speedup?

\[\begin{array}{l} t_0 := \left|b\right| - a\\ t_1 := a + \left|b\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 8.4 \cdot 10^{+161}:\\ \;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(0.03490658503988659 \cdot \left|angle\right|\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(\log \left(e^{\pi \cdot 0.011111111111111112}\right) \cdot \left|angle\right|\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
  :precision binary64
  (let* ((t_0 (- (fabs b) a)) (t_1 (+ a (fabs b))))
  (*
   (copysign 1.0 angle)
   (if (<= (fabs angle) 8.4e+161)
     (* t_1 (* t_0 (sin (* 0.03490658503988659 (fabs angle)))))
     (*
      t_1
      (*
       t_0
       (sin
        (* (log (exp (* PI 0.011111111111111112))) (fabs angle)))))))))
double code(double a, double b, double angle) {
	double t_0 = fabs(b) - a;
	double t_1 = a + fabs(b);
	double tmp;
	if (fabs(angle) <= 8.4e+161) {
		tmp = t_1 * (t_0 * sin((0.03490658503988659 * fabs(angle))));
	} else {
		tmp = t_1 * (t_0 * sin((log(exp((((double) M_PI) * 0.011111111111111112))) * fabs(angle))));
	}
	return copysign(1.0, angle) * tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = Math.abs(b) - a;
	double t_1 = a + Math.abs(b);
	double tmp;
	if (Math.abs(angle) <= 8.4e+161) {
		tmp = t_1 * (t_0 * Math.sin((0.03490658503988659 * Math.abs(angle))));
	} else {
		tmp = t_1 * (t_0 * Math.sin((Math.log(Math.exp((Math.PI * 0.011111111111111112))) * Math.abs(angle))));
	}
	return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle):
	t_0 = math.fabs(b) - a
	t_1 = a + math.fabs(b)
	tmp = 0
	if math.fabs(angle) <= 8.4e+161:
		tmp = t_1 * (t_0 * math.sin((0.03490658503988659 * math.fabs(angle))))
	else:
		tmp = t_1 * (t_0 * math.sin((math.log(math.exp((math.pi * 0.011111111111111112))) * math.fabs(angle))))
	return math.copysign(1.0, angle) * tmp
function code(a, b, angle)
	t_0 = Float64(abs(b) - a)
	t_1 = Float64(a + abs(b))
	tmp = 0.0
	if (abs(angle) <= 8.4e+161)
		tmp = Float64(t_1 * Float64(t_0 * sin(Float64(0.03490658503988659 * abs(angle)))));
	else
		tmp = Float64(t_1 * Float64(t_0 * sin(Float64(log(exp(Float64(pi * 0.011111111111111112))) * abs(angle)))));
	end
	return Float64(copysign(1.0, angle) * tmp)
end
function tmp_2 = code(a, b, angle)
	t_0 = abs(b) - a;
	t_1 = a + abs(b);
	tmp = 0.0;
	if (abs(angle) <= 8.4e+161)
		tmp = t_1 * (t_0 * sin((0.03490658503988659 * abs(angle))));
	else
		tmp = t_1 * (t_0 * sin((log(exp((pi * 0.011111111111111112))) * 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] - a), $MachinePrecision]}, Block[{t$95$1 = N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 8.4e+161], N[(t$95$1 * N[(t$95$0 * N[Sin[N[(0.03490658503988659 * N[Abs[angle], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(t$95$0 * N[Sin[N[(N[Log[N[Exp[N[(Pi * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left|b\right| - a\\
t_1 := a + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|angle\right| \leq 8.4 \cdot 10^{+161}:\\
\;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(0.03490658503988659 \cdot \left|angle\right|\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(\log \left(e^{\pi \cdot 0.011111111111111112}\right) \cdot \left|angle\right|\right)\right)\\


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

    1. Initial program 53.9%

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

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

        \[\leadsto \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.0%

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
    6. Evaluated real constant68.0%

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

    if 8.4000000000000001e161 < angle

    1. Initial program 53.9%

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

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

        \[\leadsto \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.0%

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\frac{1}{90} \cdot \color{blue}{\log \left(e^{\mathsf{PI}\left(\right)}\right)}\right) \cdot angle\right)\right) \]
      4. log-pow-revN/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left({\left(e^{\color{blue}{\pi}}\right)}^{\frac{1}{90}}\right) \cdot angle\right)\right) \]
      7. pow-expN/A

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\frac{1}{90} \cdot \pi}}\right) \cdot angle\right)\right) \]
      10. lower-exp.f6466.5%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\pi \cdot \frac{1}{90}}}\right) \cdot angle\right)\right) \]
      13. lower-*.f6466.5%

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\log \left(e^{\color{blue}{\pi \cdot 0.011111111111111112}}\right) \cdot angle\right)\right) \]
    7. Applied rewrites66.5%

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

Alternative 4: 67.9% accurate, 2.0× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.5000000000000001e231

    1. Initial program 53.9%

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

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

        \[\leadsto \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.0%

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
    6. Evaluated real constant68.0%

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

    if 1.5000000000000001e231 < b

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(a + b\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot 2\right)}\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      14. lower--.f6457.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 67.7% accurate, 2.2× speedup?

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

      1. Initial program 53.9%

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

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

          \[\leadsto \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.0%

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

        \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
      6. Evaluated real constant68.0%

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

      if 1.65e163 < b

      1. Initial program 53.9%

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

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

        \[\leadsto \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.6%

          \[\leadsto 0.011111111111111112 \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.6%

        \[\leadsto \color{blue}{0.011111111111111112 \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 0.011111111111111112 \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 0.011111111111111112 \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. lift-*.f64N/A

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

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

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(\left(\left(\pi \cdot angle\right) \cdot b\right) \cdot \left(b - a\right)\right) \]
          11. lift-*.f6440.5%

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

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

      Alternative 6: 67.0% accurate, 2.0× speedup?

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

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

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

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

            \[\leadsto \left(a + b\right) \cdot \left(\frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          3. lower--.f6463.3%

            \[\leadsto \left(a + b\right) \cdot \left(0.03490658503988659 \cdot \left(angle \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        9. Applied rewrites63.3%

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

        if 4.0000000000000002e-9 < angle

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

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

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

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

            \[\leadsto \color{blue}{\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\frac{5030569068109113}{144115188075855872} \cdot angle\right)} \]
          5. *-commutativeN/A

            \[\leadsto \color{blue}{\left(\left(b - a\right) \cdot \left(a + b\right)\right)} \cdot \sin \left(\frac{5030569068109113}{144115188075855872} \cdot angle\right) \]
          6. lower-*.f6457.7%

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

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

            \[\leadsto \left(\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}\right) \cdot \sin \left(\frac{5030569068109113}{144115188075855872} \cdot angle\right) \]
          9. lift-+.f6457.7%

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

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

            \[\leadsto \left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \color{blue}{\left(angle \cdot \frac{5030569068109113}{144115188075855872}\right)} \]
          12. lower-*.f6457.7%

            \[\leadsto \left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \color{blue}{\left(angle \cdot 0.03490658503988659\right)} \]
        8. Applied rewrites57.7%

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

      Alternative 7: 66.6% accurate, 2.4× speedup?

      \[\begin{array}{l} t_0 := \left|a\right| + \left|b\right|\\ \mathbf{if}\;\left|a\right| \leq 9 \cdot 10^{-117}:\\ \;\;\;\;t\_0 \cdot \left(\left|b\right| \cdot \sin \left(0.03490658503988659 \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(\left(\left|b\right| - \left|a\right|\right) \cdot \left(angle \cdot \left(0.03490658503988659 + -7.088769245610384 \cdot 10^{-6} \cdot {angle}^{2}\right)\right)\right)\\ \end{array} \]
      (FPCore (a b angle)
        :precision binary64
        (let* ((t_0 (+ (fabs a) (fabs b))))
        (if (<= (fabs a) 9e-117)
          (* t_0 (* (fabs b) (sin (* 0.03490658503988659 angle))))
          (*
           t_0
           (*
            (- (fabs b) (fabs a))
            (*
             angle
             (+
              0.03490658503988659
              (* -7.088769245610384e-6 (pow angle 2.0)))))))))
      double code(double a, double b, double angle) {
      	double t_0 = fabs(a) + fabs(b);
      	double tmp;
      	if (fabs(a) <= 9e-117) {
      		tmp = t_0 * (fabs(b) * sin((0.03490658503988659 * angle)));
      	} else {
      		tmp = t_0 * ((fabs(b) - fabs(a)) * (angle * (0.03490658503988659 + (-7.088769245610384e-6 * pow(angle, 2.0)))));
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(a, b, angle)
      use fmin_fmax_functions
          real(8), intent (in) :: a
          real(8), intent (in) :: b
          real(8), intent (in) :: angle
          real(8) :: t_0
          real(8) :: tmp
          t_0 = abs(a) + abs(b)
          if (abs(a) <= 9d-117) then
              tmp = t_0 * (abs(b) * sin((0.03490658503988659d0 * angle)))
          else
              tmp = t_0 * ((abs(b) - abs(a)) * (angle * (0.03490658503988659d0 + ((-7.088769245610384d-6) * (angle ** 2.0d0)))))
          end if
          code = tmp
      end function
      
      public static double code(double a, double b, double angle) {
      	double t_0 = Math.abs(a) + Math.abs(b);
      	double tmp;
      	if (Math.abs(a) <= 9e-117) {
      		tmp = t_0 * (Math.abs(b) * Math.sin((0.03490658503988659 * angle)));
      	} else {
      		tmp = t_0 * ((Math.abs(b) - Math.abs(a)) * (angle * (0.03490658503988659 + (-7.088769245610384e-6 * Math.pow(angle, 2.0)))));
      	}
      	return tmp;
      }
      
      def code(a, b, angle):
      	t_0 = math.fabs(a) + math.fabs(b)
      	tmp = 0
      	if math.fabs(a) <= 9e-117:
      		tmp = t_0 * (math.fabs(b) * math.sin((0.03490658503988659 * angle)))
      	else:
      		tmp = t_0 * ((math.fabs(b) - math.fabs(a)) * (angle * (0.03490658503988659 + (-7.088769245610384e-6 * math.pow(angle, 2.0)))))
      	return tmp
      
      function code(a, b, angle)
      	t_0 = Float64(abs(a) + abs(b))
      	tmp = 0.0
      	if (abs(a) <= 9e-117)
      		tmp = Float64(t_0 * Float64(abs(b) * sin(Float64(0.03490658503988659 * angle))));
      	else
      		tmp = Float64(t_0 * Float64(Float64(abs(b) - abs(a)) * Float64(angle * Float64(0.03490658503988659 + Float64(-7.088769245610384e-6 * (angle ^ 2.0))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(a, b, angle)
      	t_0 = abs(a) + abs(b);
      	tmp = 0.0;
      	if (abs(a) <= 9e-117)
      		tmp = t_0 * (abs(b) * sin((0.03490658503988659 * angle)));
      	else
      		tmp = t_0 * ((abs(b) - abs(a)) * (angle * (0.03490658503988659 + (-7.088769245610384e-6 * (angle ^ 2.0)))));
      	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[Abs[a], $MachinePrecision], 9e-117], N[(t$95$0 * N[(N[Abs[b], $MachinePrecision] * N[Sin[N[(0.03490658503988659 * angle), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(N[Abs[b], $MachinePrecision] - N[Abs[a], $MachinePrecision]), $MachinePrecision] * N[(angle * N[(0.03490658503988659 + N[(-7.088769245610384e-6 * N[Power[angle, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      t_0 := \left|a\right| + \left|b\right|\\
      \mathbf{if}\;\left|a\right| \leq 9 \cdot 10^{-117}:\\
      \;\;\;\;t\_0 \cdot \left(\left|b\right| \cdot \sin \left(0.03490658503988659 \cdot angle\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0 \cdot \left(\left(\left|b\right| - \left|a\right|\right) \cdot \left(angle \cdot \left(0.03490658503988659 + -7.088769245610384 \cdot 10^{-6} \cdot {angle}^{2}\right)\right)\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < 8.9999999999999994e-117

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

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

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

            \[\leadsto \left(a + b\right) \cdot \left(b \cdot \sin \left(\frac{5030569068109113}{144115188075855872} \cdot angle\right)\right) \]
          3. lower-*.f6441.8%

            \[\leadsto \left(a + b\right) \cdot \left(b \cdot \sin \left(0.03490658503988659 \cdot angle\right)\right) \]
        9. Applied rewrites41.8%

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

        if 8.9999999999999994e-117 < a

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{5030569068109113}{144115188075855872} + \frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot {angle}^{2}\right)\right)}\right) \]
        8. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{5030569068109113}{144115188075855872} + \frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot {angle}^{2}\right)}\right)\right) \]
          2. lower-+.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{5030569068109113}{144115188075855872} + \color{blue}{\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot {angle}^{2}}\right)\right)\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{5030569068109113}{144115188075855872} + \frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot \color{blue}{{angle}^{2}}\right)\right)\right) \]
          4. lower-pow.f6463.3%

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(0.03490658503988659 + -7.088769245610384 \cdot 10^{-6} \cdot {angle}^{\color{blue}{2}}\right)\right)\right) \]
        9. Applied rewrites63.3%

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

      Alternative 8: 65.6% accurate, 2.3× speedup?

      \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 2850000000000:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left|angle\right| \cdot \mathsf{fma}\left(-7.088769245610384 \cdot 10^{-6}, {\left(\left|angle\right|\right)}^{2} \cdot \left(b - a\right), 0.03490658503988659 \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left|angle\right| \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right)\\ \end{array} \]
      (FPCore (a b angle)
        :precision binary64
        (*
       (copysign 1.0 angle)
       (if (<= (fabs angle) 2850000000000.0)
         (*
          (+ a b)
          (*
           (fabs angle)
           (fma
            -7.088769245610384e-6
            (* (pow (fabs angle) 2.0) (- b a))
            (* 0.03490658503988659 (- b a)))))
         (*
          0.011111111111111112
          (* (fabs angle) (log (exp (* (* PI (- b a)) (+ b a)))))))))
      double code(double a, double b, double angle) {
      	double tmp;
      	if (fabs(angle) <= 2850000000000.0) {
      		tmp = (a + b) * (fabs(angle) * fma(-7.088769245610384e-6, (pow(fabs(angle), 2.0) * (b - a)), (0.03490658503988659 * (b - a))));
      	} else {
      		tmp = 0.011111111111111112 * (fabs(angle) * log(exp(((((double) M_PI) * (b - a)) * (b + a)))));
      	}
      	return copysign(1.0, angle) * tmp;
      }
      
      function code(a, b, angle)
      	tmp = 0.0
      	if (abs(angle) <= 2850000000000.0)
      		tmp = Float64(Float64(a + b) * Float64(abs(angle) * fma(-7.088769245610384e-6, Float64((abs(angle) ^ 2.0) * Float64(b - a)), Float64(0.03490658503988659 * Float64(b - a)))));
      	else
      		tmp = Float64(0.011111111111111112 * Float64(abs(angle) * log(exp(Float64(Float64(pi * Float64(b - a)) * Float64(b + a))))));
      	end
      	return Float64(copysign(1.0, angle) * tmp)
      end
      
      code[a_, b_, angle_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 2850000000000.0], N[(N[(a + b), $MachinePrecision] * N[(N[Abs[angle], $MachinePrecision] * N[(-7.088769245610384e-6 * N[(N[Power[N[Abs[angle], $MachinePrecision], 2.0], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] + N[(0.03490658503988659 * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[Log[N[Exp[N[(N[(Pi * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
      \mathbf{if}\;\left|angle\right| \leq 2850000000000:\\
      \;\;\;\;\left(a + b\right) \cdot \left(\left|angle\right| \cdot \mathsf{fma}\left(-7.088769245610384 \cdot 10^{-6}, {\left(\left|angle\right|\right)}^{2} \cdot \left(b - a\right), 0.03490658503988659 \cdot \left(b - a\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;0.011111111111111112 \cdot \left(\left|angle\right| \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if angle < 2.85e12

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot \left({angle}^{2} \cdot \left(b - a\right)\right) + \frac{5030569068109113}{144115188075855872} \cdot \left(b - a\right)\right)\right)} \]
        8. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot \left({angle}^{2} \cdot \left(b - a\right)\right) + \frac{5030569068109113}{144115188075855872} \cdot \left(b - a\right)\right)}\right) \]
          2. lower-fma.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696}, \color{blue}{{angle}^{2} \cdot \left(b - a\right)}, \frac{5030569068109113}{144115188075855872} \cdot \left(b - a\right)\right)\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696}, {angle}^{2} \cdot \color{blue}{\left(b - a\right)}, \frac{5030569068109113}{144115188075855872} \cdot \left(b - a\right)\right)\right) \]
          4. lower-pow.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696}, {angle}^{2} \cdot \left(\color{blue}{b} - a\right), \frac{5030569068109113}{144115188075855872} \cdot \left(b - a\right)\right)\right) \]
          5. lower--.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696}, {angle}^{2} \cdot \left(b - \color{blue}{a}\right), \frac{5030569068109113}{144115188075855872} \cdot \left(b - a\right)\right)\right) \]
          6. lower-*.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696}, {angle}^{2} \cdot \left(b - a\right), \frac{5030569068109113}{144115188075855872} \cdot \left(b - a\right)\right)\right) \]
          7. lower--.f6463.4%

            \[\leadsto \left(a + b\right) \cdot \left(angle \cdot \mathsf{fma}\left(-7.088769245610384 \cdot 10^{-6}, {angle}^{2} \cdot \left(b - a\right), 0.03490658503988659 \cdot \left(b - a\right)\right)\right) \]
        9. Applied rewrites63.4%

          \[\leadsto \left(a + b\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-7.088769245610384 \cdot 10^{-6}, {angle}^{2} \cdot \left(b - a\right), 0.03490658503988659 \cdot \left(b - a\right)\right)\right)} \]

        if 2.85e12 < angle

        1. Initial program 53.9%

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

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

          \[\leadsto \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.6%

            \[\leadsto 0.011111111111111112 \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.6%

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \log \left(e^{\mathsf{PI}\left(\right)}\right)\right)\right) \]
          5. log-pow-revN/A

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          8. pow-expN/A

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          10. lower-exp.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          11. lift-*.f64N/A

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)}\right)\right) \]
          16. lower-*.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)}\right)\right) \]
          17. lift-+.f64N/A

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right) \]
          19. lower-+.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right) \]
        8. Applied rewrites35.2%

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

      Alternative 9: 65.6% accurate, 2.4× speedup?

      \[\begin{array}{l} t_0 := \left|b\right| - a\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 2850000000000:\\ \;\;\;\;\left(a + \left|b\right|\right) \cdot \left(t\_0 \cdot \left(\left|angle\right| \cdot \left(0.03490658503988659 + -7.088769245610384 \cdot 10^{-6} \cdot {\left(\left|angle\right|\right)}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left|angle\right| \cdot \log \left(e^{\left(\pi \cdot t\_0\right) \cdot \left(\left|b\right| + a\right)}\right)\right)\\ \end{array} \end{array} \]
      (FPCore (a b angle)
        :precision binary64
        (let* ((t_0 (- (fabs b) a)))
        (*
         (copysign 1.0 angle)
         (if (<= (fabs angle) 2850000000000.0)
           (*
            (+ a (fabs b))
            (*
             t_0
             (*
              (fabs angle)
              (+
               0.03490658503988659
               (* -7.088769245610384e-6 (pow (fabs angle) 2.0))))))
           (*
            0.011111111111111112
            (* (fabs angle) (log (exp (* (* PI t_0) (+ (fabs b) a))))))))))
      double code(double a, double b, double angle) {
      	double t_0 = fabs(b) - a;
      	double tmp;
      	if (fabs(angle) <= 2850000000000.0) {
      		tmp = (a + fabs(b)) * (t_0 * (fabs(angle) * (0.03490658503988659 + (-7.088769245610384e-6 * pow(fabs(angle), 2.0)))));
      	} else {
      		tmp = 0.011111111111111112 * (fabs(angle) * log(exp(((((double) M_PI) * t_0) * (fabs(b) + a)))));
      	}
      	return copysign(1.0, angle) * tmp;
      }
      
      public static double code(double a, double b, double angle) {
      	double t_0 = Math.abs(b) - a;
      	double tmp;
      	if (Math.abs(angle) <= 2850000000000.0) {
      		tmp = (a + Math.abs(b)) * (t_0 * (Math.abs(angle) * (0.03490658503988659 + (-7.088769245610384e-6 * Math.pow(Math.abs(angle), 2.0)))));
      	} else {
      		tmp = 0.011111111111111112 * (Math.abs(angle) * Math.log(Math.exp(((Math.PI * t_0) * (Math.abs(b) + a)))));
      	}
      	return Math.copySign(1.0, angle) * tmp;
      }
      
      def code(a, b, angle):
      	t_0 = math.fabs(b) - a
      	tmp = 0
      	if math.fabs(angle) <= 2850000000000.0:
      		tmp = (a + math.fabs(b)) * (t_0 * (math.fabs(angle) * (0.03490658503988659 + (-7.088769245610384e-6 * math.pow(math.fabs(angle), 2.0)))))
      	else:
      		tmp = 0.011111111111111112 * (math.fabs(angle) * math.log(math.exp(((math.pi * t_0) * (math.fabs(b) + a)))))
      	return math.copysign(1.0, angle) * tmp
      
      function code(a, b, angle)
      	t_0 = Float64(abs(b) - a)
      	tmp = 0.0
      	if (abs(angle) <= 2850000000000.0)
      		tmp = Float64(Float64(a + abs(b)) * Float64(t_0 * Float64(abs(angle) * Float64(0.03490658503988659 + Float64(-7.088769245610384e-6 * (abs(angle) ^ 2.0))))));
      	else
      		tmp = Float64(0.011111111111111112 * Float64(abs(angle) * log(exp(Float64(Float64(pi * t_0) * Float64(abs(b) + a))))));
      	end
      	return Float64(copysign(1.0, angle) * tmp)
      end
      
      function tmp_2 = code(a, b, angle)
      	t_0 = abs(b) - a;
      	tmp = 0.0;
      	if (abs(angle) <= 2850000000000.0)
      		tmp = (a + abs(b)) * (t_0 * (abs(angle) * (0.03490658503988659 + (-7.088769245610384e-6 * (abs(angle) ^ 2.0)))));
      	else
      		tmp = 0.011111111111111112 * (abs(angle) * log(exp(((pi * t_0) * (abs(b) + a)))));
      	end
      	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
      end
      
      code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 2850000000000.0], N[(N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision] * N[(t$95$0 * N[(N[Abs[angle], $MachinePrecision] * N[(0.03490658503988659 + N[(-7.088769245610384e-6 * N[Power[N[Abs[angle], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[Log[N[Exp[N[(N[(Pi * t$95$0), $MachinePrecision] * N[(N[Abs[b], $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
      
      \begin{array}{l}
      t_0 := \left|b\right| - a\\
      \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
      \mathbf{if}\;\left|angle\right| \leq 2850000000000:\\
      \;\;\;\;\left(a + \left|b\right|\right) \cdot \left(t\_0 \cdot \left(\left|angle\right| \cdot \left(0.03490658503988659 + -7.088769245610384 \cdot 10^{-6} \cdot {\left(\left|angle\right|\right)}^{2}\right)\right)\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;0.011111111111111112 \cdot \left(\left|angle\right| \cdot \log \left(e^{\left(\pi \cdot t\_0\right) \cdot \left(\left|b\right| + a\right)}\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if angle < 2.85e12

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(\frac{5030569068109113}{144115188075855872} + \frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot {angle}^{2}\right)\right)}\right) \]
        8. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \color{blue}{\left(\frac{5030569068109113}{144115188075855872} + \frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot {angle}^{2}\right)}\right)\right) \]
          2. lower-+.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{5030569068109113}{144115188075855872} + \color{blue}{\frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot {angle}^{2}}\right)\right)\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(\frac{5030569068109113}{144115188075855872} + \frac{-42435575230957671923257205460301610561570635299}{5986310706507378352962293074805895248510699696029696} \cdot \color{blue}{{angle}^{2}}\right)\right)\right) \]
          4. lower-pow.f6463.3%

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \left(0.03490658503988659 + -7.088769245610384 \cdot 10^{-6} \cdot {angle}^{\color{blue}{2}}\right)\right)\right) \]
        9. Applied rewrites63.3%

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \left(0.03490658503988659 + -7.088769245610384 \cdot 10^{-6} \cdot {angle}^{2}\right)\right)}\right) \]

        if 2.85e12 < angle

        1. Initial program 53.9%

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

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

          \[\leadsto \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.6%

            \[\leadsto 0.011111111111111112 \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.6%

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \log \left(e^{\mathsf{PI}\left(\right)}\right)\right)\right) \]
          5. log-pow-revN/A

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          8. pow-expN/A

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          10. lower-exp.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          11. lift-*.f64N/A

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)}\right)\right) \]
          16. lower-*.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)}\right)\right) \]
          17. lift-+.f64N/A

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right) \]
          19. lower-+.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right) \]
        8. Applied rewrites35.2%

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

      Alternative 10: 65.3% accurate, 2.6× speedup?

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

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

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

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

            \[\leadsto \left(a + b\right) \cdot \left(\frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          3. lower--.f6463.3%

            \[\leadsto \left(a + b\right) \cdot \left(0.03490658503988659 \cdot \left(angle \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        9. Applied rewrites63.3%

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

        if 1.9e5 < angle

        1. Initial program 53.9%

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

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

          \[\leadsto \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.6%

            \[\leadsto 0.011111111111111112 \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.6%

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\left(\left(a + b\right) \cdot \left(b - a\right)\right) \cdot \log \left(e^{\mathsf{PI}\left(\right)}\right)\right)\right) \]
          5. log-pow-revN/A

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          8. pow-expN/A

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          10. lower-exp.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)}\right)\right) \]
          11. lift-*.f64N/A

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

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

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

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)}\right)\right) \]
          16. lower-*.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(a + b\right)}\right)\right) \]
          17. lift-+.f64N/A

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

            \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right) \]
          19. lower-+.f6435.2%

            \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \log \left(e^{\left(\pi \cdot \left(b - a\right)\right) \cdot \left(b + a\right)}\right)\right) \]
        8. Applied rewrites35.2%

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

      Alternative 11: 65.0% accurate, 3.0× speedup?

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

        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

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

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

            \[\leadsto \left(a + b\right) \cdot \left(\frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          3. lower--.f6463.3%

            \[\leadsto \left(a + b\right) \cdot \left(0.03490658503988659 \cdot \left(angle \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        9. Applied rewrites63.3%

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

        if 0.0055999999999999999 < angle

        1. Initial program 53.9%

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

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

          \[\leadsto \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.6%

            \[\leadsto 0.011111111111111112 \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.6%

          \[\leadsto \color{blue}{0.011111111111111112 \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 0.011111111111111112 \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 0.011111111111111112 \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 \left(\pi \cdot \left(b \cdot \left(b - \color{blue}{a}\right)\right)\right)\right) \]
            2. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \frac{\left(b - a\right) \cdot \left(b + a\right)}{a + b}\right)\right)\right) \]
            22. lift-+.f6441.6%

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

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

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

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

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

        Alternative 12: 65.0% accurate, 4.0× speedup?

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

          1. Initial program 53.9%

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

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

              \[\leadsto \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.0%

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

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
          6. Evaluated real constant68.0%

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

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

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

              \[\leadsto \left(a + b\right) \cdot \left(\frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
            3. lower--.f6463.3%

              \[\leadsto \left(a + b\right) \cdot \left(0.03490658503988659 \cdot \left(angle \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
          9. Applied rewrites63.3%

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

          if 5.0000000000000004e-44 < angle

          1. Initial program 53.9%

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

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

            \[\leadsto \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.6%

              \[\leadsto 0.011111111111111112 \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.6%

            \[\leadsto \color{blue}{0.011111111111111112 \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. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

        Alternative 13: 64.8% accurate, 4.0× speedup?

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

          1. Initial program 53.9%

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

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

              \[\leadsto \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.0%

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

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
          6. Evaluated real constant68.0%

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

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

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

              \[\leadsto \left(a + b\right) \cdot \left(\frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
            3. lower--.f6463.3%

              \[\leadsto \left(a + b\right) \cdot \left(0.03490658503988659 \cdot \left(angle \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
          9. Applied rewrites63.3%

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

          if 5.0000000000000002e-57 < angle

          1. Initial program 53.9%

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

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

            \[\leadsto \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.6%

              \[\leadsto 0.011111111111111112 \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.6%

            \[\leadsto \color{blue}{0.011111111111111112 \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: 64.6% accurate, 4.5× speedup?

        \[\begin{array}{l} t_0 := \left|b\right| - a\\ t_1 := a + \left|b\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{+36}:\\ \;\;\;\;t\_1 \cdot \left(0.03490658503988659 \cdot \left(\left|angle\right| \cdot t\_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.03490658503988659 \cdot \left(\left|angle\right| \cdot \left(t\_1 \cdot t\_0\right)\right)\\ \end{array} \end{array} \]
        (FPCore (a b angle)
          :precision binary64
          (let* ((t_0 (- (fabs b) a)) (t_1 (+ a (fabs b))))
          (*
           (copysign 1.0 angle)
           (if (<= (fabs angle) 5e+36)
             (* t_1 (* 0.03490658503988659 (* (fabs angle) t_0)))
             (* 0.03490658503988659 (* (fabs angle) (* t_1 t_0)))))))
        double code(double a, double b, double angle) {
        	double t_0 = fabs(b) - a;
        	double t_1 = a + fabs(b);
        	double tmp;
        	if (fabs(angle) <= 5e+36) {
        		tmp = t_1 * (0.03490658503988659 * (fabs(angle) * t_0));
        	} else {
        		tmp = 0.03490658503988659 * (fabs(angle) * (t_1 * t_0));
        	}
        	return copysign(1.0, angle) * tmp;
        }
        
        public static double code(double a, double b, double angle) {
        	double t_0 = Math.abs(b) - a;
        	double t_1 = a + Math.abs(b);
        	double tmp;
        	if (Math.abs(angle) <= 5e+36) {
        		tmp = t_1 * (0.03490658503988659 * (Math.abs(angle) * t_0));
        	} else {
        		tmp = 0.03490658503988659 * (Math.abs(angle) * (t_1 * t_0));
        	}
        	return Math.copySign(1.0, angle) * tmp;
        }
        
        def code(a, b, angle):
        	t_0 = math.fabs(b) - a
        	t_1 = a + math.fabs(b)
        	tmp = 0
        	if math.fabs(angle) <= 5e+36:
        		tmp = t_1 * (0.03490658503988659 * (math.fabs(angle) * t_0))
        	else:
        		tmp = 0.03490658503988659 * (math.fabs(angle) * (t_1 * t_0))
        	return math.copysign(1.0, angle) * tmp
        
        function code(a, b, angle)
        	t_0 = Float64(abs(b) - a)
        	t_1 = Float64(a + abs(b))
        	tmp = 0.0
        	if (abs(angle) <= 5e+36)
        		tmp = Float64(t_1 * Float64(0.03490658503988659 * Float64(abs(angle) * t_0)));
        	else
        		tmp = Float64(0.03490658503988659 * Float64(abs(angle) * Float64(t_1 * t_0)));
        	end
        	return Float64(copysign(1.0, angle) * tmp)
        end
        
        function tmp_2 = code(a, b, angle)
        	t_0 = abs(b) - a;
        	t_1 = a + abs(b);
        	tmp = 0.0;
        	if (abs(angle) <= 5e+36)
        		tmp = t_1 * (0.03490658503988659 * (abs(angle) * t_0));
        	else
        		tmp = 0.03490658503988659 * (abs(angle) * (t_1 * t_0));
        	end
        	tmp_2 = (sign(angle) * abs(1.0)) * tmp;
        end
        
        code[a_, b_, angle_] := Block[{t$95$0 = N[(N[Abs[b], $MachinePrecision] - a), $MachinePrecision]}, Block[{t$95$1 = N[(a + N[Abs[b], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[angle], $MachinePrecision], 5e+36], N[(t$95$1 * N[(0.03490658503988659 * N[(N[Abs[angle], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.03490658503988659 * N[(N[Abs[angle], $MachinePrecision] * N[(t$95$1 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
        
        \begin{array}{l}
        t_0 := \left|b\right| - a\\
        t_1 := a + \left|b\right|\\
        \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
        \mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{+36}:\\
        \;\;\;\;t\_1 \cdot \left(0.03490658503988659 \cdot \left(\left|angle\right| \cdot t\_0\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;0.03490658503988659 \cdot \left(\left|angle\right| \cdot \left(t\_1 \cdot t\_0\right)\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if angle < 4.9999999999999998e36

          1. Initial program 53.9%

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

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

              \[\leadsto \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.0%

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

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
          6. Evaluated real constant68.0%

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

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

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

              \[\leadsto \left(a + b\right) \cdot \left(\frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
            3. lower--.f6463.3%

              \[\leadsto \left(a + b\right) \cdot \left(0.03490658503988659 \cdot \left(angle \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
          9. Applied rewrites63.3%

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

          if 4.9999999999999998e36 < angle

          1. Initial program 53.9%

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

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

              \[\leadsto \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.0%

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

            \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
          6. Evaluated real constant68.0%

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

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

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

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

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

              \[\leadsto \frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
            5. lower--.f6454.7%

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

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

        Alternative 15: 54.7% accurate, 8.4× speedup?

        \[0.03490658503988659 \cdot \left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right) \]
        (FPCore (a b angle)
          :precision binary64
          (* 0.03490658503988659 (* angle (* (+ a b) (- b a)))))
        double code(double a, double b, double angle) {
        	return 0.03490658503988659 * (angle * ((a + b) * (b - a)));
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(a, b, angle)
        use fmin_fmax_functions
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8), intent (in) :: angle
            code = 0.03490658503988659d0 * (angle * ((a + b) * (b - a)))
        end function
        
        public static double code(double a, double b, double angle) {
        	return 0.03490658503988659 * (angle * ((a + b) * (b - a)));
        }
        
        def code(a, b, angle):
        	return 0.03490658503988659 * (angle * ((a + b) * (b - a)))
        
        function code(a, b, angle)
        	return Float64(0.03490658503988659 * Float64(angle * Float64(Float64(a + b) * Float64(b - a))))
        end
        
        function tmp = code(a, b, angle)
        	tmp = 0.03490658503988659 * (angle * ((a + b) * (b - a)));
        end
        
        code[a_, b_, angle_] := N[(0.03490658503988659 * N[(angle * N[(N[(a + b), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        0.03490658503988659 \cdot \left(angle \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)
        
        Derivation
        1. Initial program 53.9%

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

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

            \[\leadsto \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.0%

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

          \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\left(0.011111111111111112 \cdot \pi\right) \cdot angle\right)}\right) \]
        6. Evaluated real constant68.0%

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

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

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

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

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

            \[\leadsto \frac{5030569068109113}{144115188075855872} \cdot \left(angle \cdot \left(\left(a + b\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          5. lower--.f6454.7%

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

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

        Reproduce

        ?
        herbie shell --seed 2025212 
        (FPCore (a b angle)
          :name "ab-angle->ABCF B"
          :precision binary64
          (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin (* PI (/ angle 180.0)))) (cos (* PI (/ angle 180.0)))))