ab-angle->ABCF B

Percentage Accurate: 54.5% → 67.7%
Time: 6.7s
Alternatives: 15
Speedup: 6.6×

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: 54.5% accurate, 1.0× speedup?

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

Alternative 1: 67.7% accurate, 0.9× speedup?

\[\begin{array}{l} t_0 := \left|b\right| - a\\ t_1 := \frac{180}{\left|angle\right|}\\ t_2 := a + \left|b\right|\\ \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|b\right| \leq 3.1 \cdot 10^{+51}:\\ \;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{1}{\frac{t\_1}{\pi}}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot e^{\log t\_1 \cdot -1}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{0.005555555555555556 \cdot \left|angle\right|}{0.3183098861837907}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{\left|angle\right|}{180}\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (- (fabs b) a)) (t_1 (/ 180.0 (fabs angle))) (t_2 (+ a (fabs b))))
   (*
    (copysign 1.0 angle)
    (if (<= (fabs b) 3.1e+51)
      (*
       (* t_2 (* t_0 (* (sin (/ 1.0 (/ t_1 PI))) 2.0)))
       (cos (* PI (exp (* (log t_1) -1.0)))))
      (*
       (*
        t_2
        (*
         t_0
         (*
          (sin (/ (* 0.005555555555555556 (fabs angle)) 0.3183098861837907))
          2.0)))
       (cos (* PI (/ (fabs angle) 180.0))))))))
double code(double a, double b, double angle) {
	double t_0 = fabs(b) - a;
	double t_1 = 180.0 / fabs(angle);
	double t_2 = a + fabs(b);
	double tmp;
	if (fabs(b) <= 3.1e+51) {
		tmp = (t_2 * (t_0 * (sin((1.0 / (t_1 / ((double) M_PI)))) * 2.0))) * cos((((double) M_PI) * exp((log(t_1) * -1.0))));
	} else {
		tmp = (t_2 * (t_0 * (sin(((0.005555555555555556 * fabs(angle)) / 0.3183098861837907)) * 2.0))) * cos((((double) M_PI) * (fabs(angle) / 180.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 = 180.0 / Math.abs(angle);
	double t_2 = a + Math.abs(b);
	double tmp;
	if (Math.abs(b) <= 3.1e+51) {
		tmp = (t_2 * (t_0 * (Math.sin((1.0 / (t_1 / Math.PI))) * 2.0))) * Math.cos((Math.PI * Math.exp((Math.log(t_1) * -1.0))));
	} else {
		tmp = (t_2 * (t_0 * (Math.sin(((0.005555555555555556 * Math.abs(angle)) / 0.3183098861837907)) * 2.0))) * Math.cos((Math.PI * (Math.abs(angle) / 180.0)));
	}
	return Math.copySign(1.0, angle) * tmp;
}
def code(a, b, angle):
	t_0 = math.fabs(b) - a
	t_1 = 180.0 / math.fabs(angle)
	t_2 = a + math.fabs(b)
	tmp = 0
	if math.fabs(b) <= 3.1e+51:
		tmp = (t_2 * (t_0 * (math.sin((1.0 / (t_1 / math.pi))) * 2.0))) * math.cos((math.pi * math.exp((math.log(t_1) * -1.0))))
	else:
		tmp = (t_2 * (t_0 * (math.sin(((0.005555555555555556 * math.fabs(angle)) / 0.3183098861837907)) * 2.0))) * math.cos((math.pi * (math.fabs(angle) / 180.0)))
	return math.copysign(1.0, angle) * tmp
function code(a, b, angle)
	t_0 = Float64(abs(b) - a)
	t_1 = Float64(180.0 / abs(angle))
	t_2 = Float64(a + abs(b))
	tmp = 0.0
	if (abs(b) <= 3.1e+51)
		tmp = Float64(Float64(t_2 * Float64(t_0 * Float64(sin(Float64(1.0 / Float64(t_1 / pi))) * 2.0))) * cos(Float64(pi * exp(Float64(log(t_1) * -1.0)))));
	else
		tmp = Float64(Float64(t_2 * Float64(t_0 * Float64(sin(Float64(Float64(0.005555555555555556 * abs(angle)) / 0.3183098861837907)) * 2.0))) * cos(Float64(pi * Float64(abs(angle) / 180.0))));
	end
	return Float64(copysign(1.0, angle) * tmp)
end
function tmp_2 = code(a, b, angle)
	t_0 = abs(b) - a;
	t_1 = 180.0 / abs(angle);
	t_2 = a + abs(b);
	tmp = 0.0;
	if (abs(b) <= 3.1e+51)
		tmp = (t_2 * (t_0 * (sin((1.0 / (t_1 / pi))) * 2.0))) * cos((pi * exp((log(t_1) * -1.0))));
	else
		tmp = (t_2 * (t_0 * (sin(((0.005555555555555556 * abs(angle)) / 0.3183098861837907)) * 2.0))) * cos((pi * (abs(angle) / 180.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[(180.0 / N[Abs[angle], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[b], $MachinePrecision], 3.1e+51], N[(N[(t$95$2 * N[(t$95$0 * N[(N[Sin[N[(1.0 / N[(t$95$1 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[Exp[N[(N[Log[t$95$1], $MachinePrecision] * -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 * N[(t$95$0 * N[(N[Sin[N[(N[(0.005555555555555556 * N[Abs[angle], $MachinePrecision]), $MachinePrecision] / 0.3183098861837907), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(N[Abs[angle], $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left|b\right| - a\\
t_1 := \frac{180}{\left|angle\right|}\\
t_2 := a + \left|b\right|\\
\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|b\right| \leq 3.1 \cdot 10^{+51}:\\
\;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{1}{\frac{t\_1}{\pi}}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot e^{\log t\_1 \cdot -1}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(t\_2 \cdot \left(t\_0 \cdot \left(\sin \left(\frac{0.005555555555555556 \cdot \left|angle\right|}{0.3183098861837907}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{\left|angle\right|}{180}\right)\\


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

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
      3. *-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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right) \cdot 2\right)\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(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right) \cdot 2\right)\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(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot e^{\color{blue}{\log \left(\frac{180}{angle}\right) \cdot -1}}\right) \]
      8. lower-unsound-log.f6433.6

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

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

    if 3.10000000000000011e51 < b

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
      3. *-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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.5% accurate, 1.8× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(t\_0 \cdot \left(t\_1 \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8000000000000002e174 < a

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
      3. *-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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. lower-PI.f6463.0

        \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied rewrites63.0%

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

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

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

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

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

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

Alternative 3: 67.5% accurate, 1.3× speedup?

\[\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{0.005555555555555556 \cdot angle}{0.3183098861837907}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
(FPCore (a b angle)
 :precision binary64
 (*
  (*
   (+ a b)
   (*
    (- b a)
    (* (sin (/ (* 0.005555555555555556 angle) 0.3183098861837907)) 2.0)))
  (cos (* PI (/ angle 180.0)))))
double code(double a, double b, double angle) {
	return ((a + b) * ((b - a) * (sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * cos((((double) M_PI) * (angle / 180.0)));
}
public static double code(double a, double b, double angle) {
	return ((a + b) * ((b - a) * (Math.sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * Math.cos((Math.PI * (angle / 180.0)));
}
def code(a, b, angle):
	return ((a + b) * ((b - a) * (math.sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * math.cos((math.pi * (angle / 180.0)))
function code(a, b, angle)
	return Float64(Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(sin(Float64(Float64(0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * cos(Float64(pi * Float64(angle / 180.0))))
end
function tmp = code(a, b, angle)
	tmp = ((a + b) * ((b - a) * (sin(((0.005555555555555556 * angle) / 0.3183098861837907)) * 2.0))) * cos((pi * (angle / 180.0)));
end
code[a_, b_, angle_] := N[(N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(N[(0.005555555555555556 * angle), $MachinePrecision] / 0.3183098861837907), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{0.005555555555555556 \cdot angle}{0.3183098861837907}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
Derivation
  1. Initial program 54.5%

    \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
    3. *-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) \]
    4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{\frac{1}{180} \cdot angle}{\color{blue}{\frac{5734161139222659}{18014398509481984}}}\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  9. Add Preprocessing

Alternative 4: 67.5% accurate, 1.8× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(b + \left|a\right|\right) \cdot \left(\left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(t\_0 \cdot \cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\\


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000002e166 < a

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
      3. *-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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\frac{1}{90} \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. lower-PI.f6463.0

        \[\leadsto \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Applied rewrites63.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.2% accurate, 1.9× speedup?

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

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


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.50000000000000003e176 < a

    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
      3. *-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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 67.1% accurate, 1.3× speedup?

    \[\left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (* (+ a b) (* (- b a) (* (sin (* (/ angle 180.0) PI)) 2.0)))
      (cos (* PI (/ angle 180.0)))))
    double code(double a, double b, double angle) {
    	return ((a + b) * ((b - a) * (sin(((angle / 180.0) * ((double) M_PI))) * 2.0))) * cos((((double) M_PI) * (angle / 180.0)));
    }
    
    public static double code(double a, double b, double angle) {
    	return ((a + b) * ((b - a) * (Math.sin(((angle / 180.0) * Math.PI)) * 2.0))) * Math.cos((Math.PI * (angle / 180.0)));
    }
    
    def code(a, b, angle):
    	return ((a + b) * ((b - a) * (math.sin(((angle / 180.0) * math.pi)) * 2.0))) * math.cos((math.pi * (angle / 180.0)))
    
    function code(a, b, angle)
    	return Float64(Float64(Float64(a + b) * Float64(Float64(b - a) * Float64(sin(Float64(Float64(angle / 180.0) * pi)) * 2.0))) * cos(Float64(pi * Float64(angle / 180.0))))
    end
    
    function tmp = code(a, b, angle)
    	tmp = ((a + b) * ((b - a) * (sin(((angle / 180.0) * pi)) * 2.0))) * cos((pi * (angle / 180.0)));
    end
    
    code[a_, b_, angle_] := N[(N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
    
    \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot 2\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)
    
    Derivation
    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
      3. *-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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 67.0% accurate, 1.3× speedup?

    \[\left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot 2\right)\right) \cdot \left(b + a\right) \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (*
       (cos (* -0.005555555555555556 (* PI angle)))
       (* (* (sin (* (* angle 0.005555555555555556) PI)) (- b a)) 2.0))
      (+ b a)))
    double code(double a, double b, double angle) {
    	return (cos((-0.005555555555555556 * (((double) M_PI) * angle))) * ((sin(((angle * 0.005555555555555556) * ((double) M_PI))) * (b - a)) * 2.0)) * (b + a);
    }
    
    public static double code(double a, double b, double angle) {
    	return (Math.cos((-0.005555555555555556 * (Math.PI * angle))) * ((Math.sin(((angle * 0.005555555555555556) * Math.PI)) * (b - a)) * 2.0)) * (b + a);
    }
    
    def code(a, b, angle):
    	return (math.cos((-0.005555555555555556 * (math.pi * angle))) * ((math.sin(((angle * 0.005555555555555556) * math.pi)) * (b - a)) * 2.0)) * (b + a)
    
    function code(a, b, angle)
    	return Float64(Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle))) * Float64(Float64(sin(Float64(Float64(angle * 0.005555555555555556) * pi)) * Float64(b - a)) * 2.0)) * Float64(b + a))
    end
    
    function tmp = code(a, b, angle)
    	tmp = (cos((-0.005555555555555556 * (pi * angle))) * ((sin(((angle * 0.005555555555555556) * pi)) * (b - a)) * 2.0)) * (b + a);
    end
    
    code[a_, b_, angle_] := N[(N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]
    
    \left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\left(\sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot 2\right)\right) \cdot \left(b + a\right)
    
    Derivation
    1. Initial program 54.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {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 \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) \]
      3. *-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) \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 67.0% accurate, 1.9× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 7.5 \cdot 10^{-70}:\\ \;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 7.5e-70)
        (* (* (* (fabs angle) (+ b a)) (- b a)) (* PI 0.011111111111111112))
        (*
         (* (- b a) (+ a b))
         (sin (* (* (fabs angle) PI) 0.011111111111111112))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 7.5e-70) {
    		tmp = ((fabs(angle) * (b + a)) * (b - a)) * (((double) M_PI) * 0.011111111111111112);
    	} else {
    		tmp = ((b - a) * (a + b)) * sin(((fabs(angle) * ((double) M_PI)) * 0.011111111111111112));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (Math.abs(angle) <= 7.5e-70) {
    		tmp = ((Math.abs(angle) * (b + a)) * (b - a)) * (Math.PI * 0.011111111111111112);
    	} else {
    		tmp = ((b - a) * (a + b)) * Math.sin(((Math.abs(angle) * Math.PI) * 0.011111111111111112));
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if math.fabs(angle) <= 7.5e-70:
    		tmp = ((math.fabs(angle) * (b + a)) * (b - a)) * (math.pi * 0.011111111111111112)
    	else:
    		tmp = ((b - a) * (a + b)) * math.sin(((math.fabs(angle) * math.pi) * 0.011111111111111112))
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 7.5e-70)
    		tmp = Float64(Float64(Float64(abs(angle) * Float64(b + a)) * Float64(b - a)) * Float64(pi * 0.011111111111111112));
    	else
    		tmp = Float64(Float64(Float64(b - a) * Float64(a + b)) * sin(Float64(Float64(abs(angle) * pi) * 0.011111111111111112)));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (abs(angle) <= 7.5e-70)
    		tmp = ((abs(angle) * (b + a)) * (b - a)) * (pi * 0.011111111111111112);
    	else
    		tmp = ((b - a) * (a + b)) * sin(((abs(angle) * pi) * 0.011111111111111112));
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * 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], 7.5e-70], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b - a), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(N[Abs[angle], $MachinePrecision] * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 7.5 \cdot 10^{-70}:\\
    \;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(\left(\left|angle\right| \cdot \pi\right) \cdot 0.011111111111111112\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 7.49999999999999973e-70

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.49999999999999973e-70 < angle

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 9: 67.0% accurate, 2.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 10: 64.9% accurate, 2.6× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 3 \cdot 10^{+41}:\\ \;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\log \left(e^{\left(\left(b - a\right) \cdot \pi\right) \cdot \left(b + a\right)}\right) \cdot \left|angle\right|\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 3e+41)
        (* (* (* (fabs angle) (+ b a)) (- b a)) (* PI 0.011111111111111112))
        (*
         0.011111111111111112
         (* (log (exp (* (* (- b a) PI) (+ b a)))) (fabs angle))))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 3e+41) {
    		tmp = ((fabs(angle) * (b + a)) * (b - a)) * (((double) M_PI) * 0.011111111111111112);
    	} else {
    		tmp = 0.011111111111111112 * (log(exp((((b - a) * ((double) M_PI)) * (b + a)))) * fabs(angle));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (Math.abs(angle) <= 3e+41) {
    		tmp = ((Math.abs(angle) * (b + a)) * (b - a)) * (Math.PI * 0.011111111111111112);
    	} else {
    		tmp = 0.011111111111111112 * (Math.log(Math.exp((((b - a) * Math.PI) * (b + a)))) * Math.abs(angle));
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if math.fabs(angle) <= 3e+41:
    		tmp = ((math.fabs(angle) * (b + a)) * (b - a)) * (math.pi * 0.011111111111111112)
    	else:
    		tmp = 0.011111111111111112 * (math.log(math.exp((((b - a) * math.pi) * (b + a)))) * math.fabs(angle))
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 3e+41)
    		tmp = Float64(Float64(Float64(abs(angle) * Float64(b + a)) * Float64(b - a)) * Float64(pi * 0.011111111111111112));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(log(exp(Float64(Float64(Float64(b - a) * pi) * Float64(b + a)))) * abs(angle)));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (abs(angle) <= 3e+41)
    		tmp = ((abs(angle) * (b + a)) * (b - a)) * (pi * 0.011111111111111112);
    	else
    		tmp = 0.011111111111111112 * (log(exp((((b - a) * pi) * (b + a)))) * abs(angle));
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * 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], 3e+41], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[Log[N[Exp[N[(N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[Abs[angle], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 3 \cdot 10^{+41}:\\
    \;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\log \left(e^{\left(\left(b - a\right) \cdot \pi\right) \cdot \left(b + a\right)}\right) \cdot \left|angle\right|\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 2.9999999999999998e41

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.9999999999999998e41 < angle

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(\log \left(e^{\left({b}^{2} - {a}^{2}\right) \cdot \pi}\right) \cdot angle\right) \]
      10. Applied rewrites36.6%

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

    Alternative 11: 64.2% accurate, 4.0× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{-70}:\\ \;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 5e-70)
        (* (* (* (fabs angle) (+ b a)) (- b a)) (* PI 0.011111111111111112))
        (* 0.011111111111111112 (* (* (fabs angle) (* (- b a) (+ b a))) PI)))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 5e-70) {
    		tmp = ((fabs(angle) * (b + a)) * (b - a)) * (((double) M_PI) * 0.011111111111111112);
    	} else {
    		tmp = 0.011111111111111112 * ((fabs(angle) * ((b - a) * (b + a))) * ((double) M_PI));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (Math.abs(angle) <= 5e-70) {
    		tmp = ((Math.abs(angle) * (b + a)) * (b - a)) * (Math.PI * 0.011111111111111112);
    	} else {
    		tmp = 0.011111111111111112 * ((Math.abs(angle) * ((b - a) * (b + a))) * Math.PI);
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if math.fabs(angle) <= 5e-70:
    		tmp = ((math.fabs(angle) * (b + a)) * (b - a)) * (math.pi * 0.011111111111111112)
    	else:
    		tmp = 0.011111111111111112 * ((math.fabs(angle) * ((b - a) * (b + a))) * math.pi)
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 5e-70)
    		tmp = Float64(Float64(Float64(abs(angle) * Float64(b + a)) * Float64(b - a)) * Float64(pi * 0.011111111111111112));
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * Float64(Float64(b - a) * Float64(b + a))) * pi));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (abs(angle) <= 5e-70)
    		tmp = ((abs(angle) * (b + a)) * (b - a)) * (pi * 0.011111111111111112);
    	else
    		tmp = 0.011111111111111112 * ((abs(angle) * ((b - a) * (b + a))) * pi);
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * 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], 5e-70], N[(N[(N[(N[Abs[angle], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 5 \cdot 10^{-70}:\\
    \;\;\;\;\left(\left(\left|angle\right| \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 4.9999999999999998e-70

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 4.9999999999999998e-70 < angle

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 64.1% accurate, 4.0× speedup?

    \[\mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l} \mathbf{if}\;\left|angle\right| \leq 1.1 \cdot 10^{-69}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)\\ \end{array} \]
    (FPCore (a b angle)
     :precision binary64
     (*
      (copysign 1.0 angle)
      (if (<= (fabs angle) 1.1e-69)
        (* (* (* 0.011111111111111112 (* (fabs angle) (- b a))) (+ b a)) PI)
        (* 0.011111111111111112 (* (* (fabs angle) (* (- b a) (+ b a))) PI)))))
    double code(double a, double b, double angle) {
    	double tmp;
    	if (fabs(angle) <= 1.1e-69) {
    		tmp = ((0.011111111111111112 * (fabs(angle) * (b - a))) * (b + a)) * ((double) M_PI);
    	} else {
    		tmp = 0.011111111111111112 * ((fabs(angle) * ((b - a) * (b + a))) * ((double) M_PI));
    	}
    	return copysign(1.0, angle) * tmp;
    }
    
    public static double code(double a, double b, double angle) {
    	double tmp;
    	if (Math.abs(angle) <= 1.1e-69) {
    		tmp = ((0.011111111111111112 * (Math.abs(angle) * (b - a))) * (b + a)) * Math.PI;
    	} else {
    		tmp = 0.011111111111111112 * ((Math.abs(angle) * ((b - a) * (b + a))) * Math.PI);
    	}
    	return Math.copySign(1.0, angle) * tmp;
    }
    
    def code(a, b, angle):
    	tmp = 0
    	if math.fabs(angle) <= 1.1e-69:
    		tmp = ((0.011111111111111112 * (math.fabs(angle) * (b - a))) * (b + a)) * math.pi
    	else:
    		tmp = 0.011111111111111112 * ((math.fabs(angle) * ((b - a) * (b + a))) * math.pi)
    	return math.copysign(1.0, angle) * tmp
    
    function code(a, b, angle)
    	tmp = 0.0
    	if (abs(angle) <= 1.1e-69)
    		tmp = Float64(Float64(Float64(0.011111111111111112 * Float64(abs(angle) * Float64(b - a))) * Float64(b + a)) * pi);
    	else
    		tmp = Float64(0.011111111111111112 * Float64(Float64(abs(angle) * Float64(Float64(b - a) * Float64(b + a))) * pi));
    	end
    	return Float64(copysign(1.0, angle) * tmp)
    end
    
    function tmp_2 = code(a, b, angle)
    	tmp = 0.0;
    	if (abs(angle) <= 1.1e-69)
    		tmp = ((0.011111111111111112 * (abs(angle) * (b - a))) * (b + a)) * pi;
    	else
    		tmp = 0.011111111111111112 * ((abs(angle) * ((b - a) * (b + a))) * pi);
    	end
    	tmp_2 = (sign(angle) * abs(1.0)) * 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], 1.1e-69], N[(N[(N[(0.011111111111111112 * N[(N[Abs[angle], $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision], N[(0.011111111111111112 * N[(N[(N[Abs[angle], $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, angle\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|angle\right| \leq 1.1 \cdot 10^{-69}:\\
    \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(\left|angle\right| \cdot \left(b - a\right)\right)\right) \cdot \left(b + a\right)\right) \cdot \pi\\
    
    \mathbf{else}:\\
    \;\;\;\;0.011111111111111112 \cdot \left(\left(\left|angle\right| \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right) \cdot \pi\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 1.1e-69

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.1e-69 < angle

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 55.2% accurate, 6.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 14: 54.3% accurate, 1.9× speedup?

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

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(b \cdot \pi\right)\right) \cdot angle\right) \]
      11. Applied rewrites38.2%

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

    Alternative 15: 39.5% accurate, 6.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right) \cdot angle\right) \]
    12. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025166 
    (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)))))