ab-angle->ABCF B

Percentage Accurate: 54.1% → 67.5%
Time: 7.3s
Alternatives: 15
Speedup: 3.7×

Specification

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

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

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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 67.5% accurate, 1.1× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\\ t_1 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 1.15 \cdot 10^{-115}:\\ \;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right| + 0.5 \cdot \pi\right)\\ \mathbf{elif}\;b\_m \leq 9 \cdot 10^{+185}:\\ \;\;\;\;t\_0 \cdot \sin \left(\left(-\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right) + \frac{\pi}{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sin t\_1 \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0
         (*
          (*
           (* (sin (* PI (* angle_m 0.005555555555555556))) (+ a b_m))
           (- b_m a))
          2.0))
        (t_1 (* (* PI angle_m) 0.005555555555555556)))
   (*
    angle_s
    (if (<= b_m 1.15e-115)
      (* t_0 (sin (+ (fabs t_1) (* 0.5 PI))))
      (if (<= b_m 9e+185)
        (*
         t_0
         (sin (+ (- (* (* PI 0.005555555555555556) angle_m)) (/ PI 2.0))))
        (*
         (* (* (* (sin t_1) (+ a b_m)) (- b_m a)) 2.0)
         (cos (* PI (* 0.005555555555555556 angle_m)))))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0;
	double t_1 = (((double) M_PI) * angle_m) * 0.005555555555555556;
	double tmp;
	if (b_m <= 1.15e-115) {
		tmp = t_0 * sin((fabs(t_1) + (0.5 * ((double) M_PI))));
	} else if (b_m <= 9e+185) {
		tmp = t_0 * sin((-((((double) M_PI) * 0.005555555555555556) * angle_m) + (((double) M_PI) / 2.0)));
	} else {
		tmp = (((sin(t_1) * (a + b_m)) * (b_m - a)) * 2.0) * cos((((double) M_PI) * (0.005555555555555556 * angle_m)));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0;
	double t_1 = (Math.PI * angle_m) * 0.005555555555555556;
	double tmp;
	if (b_m <= 1.15e-115) {
		tmp = t_0 * Math.sin((Math.abs(t_1) + (0.5 * Math.PI)));
	} else if (b_m <= 9e+185) {
		tmp = t_0 * Math.sin((-((Math.PI * 0.005555555555555556) * angle_m) + (Math.PI / 2.0)));
	} else {
		tmp = (((Math.sin(t_1) * (a + b_m)) * (b_m - a)) * 2.0) * Math.cos((Math.PI * (0.005555555555555556 * angle_m)));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = ((math.sin((math.pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0
	t_1 = (math.pi * angle_m) * 0.005555555555555556
	tmp = 0
	if b_m <= 1.15e-115:
		tmp = t_0 * math.sin((math.fabs(t_1) + (0.5 * math.pi)))
	elif b_m <= 9e+185:
		tmp = t_0 * math.sin((-((math.pi * 0.005555555555555556) * angle_m) + (math.pi / 2.0)))
	else:
		tmp = (((math.sin(t_1) * (a + b_m)) * (b_m - a)) * 2.0) * math.cos((math.pi * (0.005555555555555556 * angle_m)))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0)
	t_1 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
	tmp = 0.0
	if (b_m <= 1.15e-115)
		tmp = Float64(t_0 * sin(Float64(abs(t_1) + Float64(0.5 * pi))));
	elseif (b_m <= 9e+185)
		tmp = Float64(t_0 * sin(Float64(Float64(-Float64(Float64(pi * 0.005555555555555556) * angle_m)) + Float64(pi / 2.0))));
	else
		tmp = Float64(Float64(Float64(Float64(sin(t_1) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0) * cos(Float64(pi * Float64(0.005555555555555556 * angle_m))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = ((sin((pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0;
	t_1 = (pi * angle_m) * 0.005555555555555556;
	tmp = 0.0;
	if (b_m <= 1.15e-115)
		tmp = t_0 * sin((abs(t_1) + (0.5 * pi)));
	elseif (b_m <= 9e+185)
		tmp = t_0 * sin((-((pi * 0.005555555555555556) * angle_m) + (pi / 2.0)));
	else
		tmp = (((sin(t_1) * (a + b_m)) * (b_m - a)) * 2.0) * cos((pi * (0.005555555555555556 * angle_m)));
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 1.15e-115], N[(t$95$0 * N[Sin[N[(N[Abs[t$95$1], $MachinePrecision] + N[(0.5 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 9e+185], N[(t$95$0 * N[Sin[N[((-N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Sin[t$95$1], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\\
t_1 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 1.15 \cdot 10^{-115}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left|t\_1\right| + 0.5 \cdot \pi\right)\\

\mathbf{elif}\;b\_m \leq 9 \cdot 10^{+185}:\\
\;\;\;\;t\_0 \cdot \sin \left(\left(-\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right) + \frac{\pi}{2}\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < 1.14999999999999992e-115

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.14999999999999992e-115 < b < 9.0000000000000004e185

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000004e185 < b

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.9% accurate, 1.2× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 2.4 \cdot 10^{-132}:\\ \;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\sin t\_0 \cdot \left(\left(\frac{a}{b\_m} - -1\right) \cdot b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \cos t\_0\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (* PI 0.005555555555555556) angle_m)))
   (*
    angle_s
    (if (<= b_m 2.4e-132)
      (*
       (*
        (*
         (* (sin (* PI (* angle_m 0.005555555555555556))) (+ a b_m))
         (- b_m a))
        2.0)
       1.0)
      (*
       (* (* (* (sin t_0) (* (- (/ a b_m) -1.0) b_m)) (- b_m a)) 2.0)
       (cos t_0))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (((double) M_PI) * 0.005555555555555556) * angle_m;
	double tmp;
	if (b_m <= 2.4e-132) {
		tmp = (((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	} else {
		tmp = (((sin(t_0) * (((a / b_m) - -1.0) * b_m)) * (b_m - a)) * 2.0) * cos(t_0);
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (Math.PI * 0.005555555555555556) * angle_m;
	double tmp;
	if (b_m <= 2.4e-132) {
		tmp = (((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	} else {
		tmp = (((Math.sin(t_0) * (((a / b_m) - -1.0) * b_m)) * (b_m - a)) * 2.0) * Math.cos(t_0);
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = (math.pi * 0.005555555555555556) * angle_m
	tmp = 0
	if b_m <= 2.4e-132:
		tmp = (((math.sin((math.pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0
	else:
		tmp = (((math.sin(t_0) * (((a / b_m) - -1.0) * b_m)) * (b_m - a)) * 2.0) * math.cos(t_0)
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(pi * 0.005555555555555556) * angle_m)
	tmp = 0.0
	if (b_m <= 2.4e-132)
		tmp = Float64(Float64(Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0) * 1.0);
	else
		tmp = Float64(Float64(Float64(Float64(sin(t_0) * Float64(Float64(Float64(a / b_m) - -1.0) * b_m)) * Float64(b_m - a)) * 2.0) * cos(t_0));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (pi * 0.005555555555555556) * angle_m;
	tmp = 0.0;
	if (b_m <= 2.4e-132)
		tmp = (((sin((pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	else
		tmp = (((sin(t_0) * (((a / b_m) - -1.0) * b_m)) * (b_m - a)) * 2.0) * cos(t_0);
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 2.4e-132], N[(N[(N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(N[(a / b$95$m), $MachinePrecision] - -1.0), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 2.4 \cdot 10^{-132}:\\
\;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\sin t\_0 \cdot \left(\left(\frac{a}{b\_m} - -1\right) \cdot b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \cos t\_0\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.40000000000000015e-132

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot 1 \]
    9. Applied rewrites65.9%

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

    if 2.40000000000000015e-132 < b

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 66.9% accurate, 1.2× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 1.45 \cdot 10^{-132}:\\ \;\;\;\;t\_0 \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \cos \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0
         (*
          (*
           (* (sin (* PI (* angle_m 0.005555555555555556))) (+ a b_m))
           (- b_m a))
          2.0)))
   (*
    angle_s
    (if (<= b_m 1.45e-132)
      (* t_0 1.0)
      (* t_0 (cos (* (* PI 0.005555555555555556) angle_m)))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0;
	double tmp;
	if (b_m <= 1.45e-132) {
		tmp = t_0 * 1.0;
	} else {
		tmp = t_0 * cos(((((double) M_PI) * 0.005555555555555556) * angle_m));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = ((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0;
	double tmp;
	if (b_m <= 1.45e-132) {
		tmp = t_0 * 1.0;
	} else {
		tmp = t_0 * Math.cos(((Math.PI * 0.005555555555555556) * angle_m));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = ((math.sin((math.pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0
	tmp = 0
	if b_m <= 1.45e-132:
		tmp = t_0 * 1.0
	else:
		tmp = t_0 * math.cos(((math.pi * 0.005555555555555556) * angle_m))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0)
	tmp = 0.0
	if (b_m <= 1.45e-132)
		tmp = Float64(t_0 * 1.0);
	else
		tmp = Float64(t_0 * cos(Float64(Float64(pi * 0.005555555555555556) * angle_m)));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = ((sin((pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0;
	tmp = 0.0;
	if (b_m <= 1.45e-132)
		tmp = t_0 * 1.0;
	else
		tmp = t_0 * cos(((pi * 0.005555555555555556) * angle_m));
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b$95$m, 1.45e-132], N[(t$95$0 * 1.0), $MachinePrecision], N[(t$95$0 * N[Cos[N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 1.45 \cdot 10^{-132}:\\
\;\;\;\;t\_0 \cdot 1\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.44999999999999992e-132

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot 1 \]
    9. Applied rewrites65.9%

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

    if 1.44999999999999992e-132 < b

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 66.9% accurate, 1.2× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 10^{+122}:\\ \;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sin t\_0 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot 2\right) \cdot \cos t\_0\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (* PI angle_m) 0.005555555555555556)))
   (*
    angle_s
    (if (<= angle_m 1e+122)
      (*
       (*
        (*
         (* (sin (* PI (* angle_m 0.005555555555555556))) (+ a b_m))
         (- b_m a))
        2.0)
       (cos (* PI (* 0.005555555555555556 angle_m))))
      (* (* (* (sin t_0) (* (+ b_m a) (- b_m a))) 2.0) (cos t_0))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
	double tmp;
	if (angle_m <= 1e+122) {
		tmp = (((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * cos((((double) M_PI) * (0.005555555555555556 * angle_m)));
	} else {
		tmp = ((sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * cos(t_0);
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (Math.PI * angle_m) * 0.005555555555555556;
	double tmp;
	if (angle_m <= 1e+122) {
		tmp = (((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * Math.cos((Math.PI * (0.005555555555555556 * angle_m)));
	} else {
		tmp = ((Math.sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * Math.cos(t_0);
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = (math.pi * angle_m) * 0.005555555555555556
	tmp = 0
	if angle_m <= 1e+122:
		tmp = (((math.sin((math.pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * math.cos((math.pi * (0.005555555555555556 * angle_m)))
	else:
		tmp = ((math.sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * math.cos(t_0)
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
	tmp = 0.0
	if (angle_m <= 1e+122)
		tmp = Float64(Float64(Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0) * cos(Float64(pi * Float64(0.005555555555555556 * angle_m))));
	else
		tmp = Float64(Float64(Float64(sin(t_0) * Float64(Float64(b_m + a) * Float64(b_m - a))) * 2.0) * cos(t_0));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (pi * angle_m) * 0.005555555555555556;
	tmp = 0.0;
	if (angle_m <= 1e+122)
		tmp = (((sin((pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * cos((pi * (0.005555555555555556 * angle_m)));
	else
		tmp = ((sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * cos(t_0);
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 1e+122], N[(N[(N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[Cos[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 10^{+122}:\\
\;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\sin t\_0 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot 2\right) \cdot \cos t\_0\\


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000001e122 < angle

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 66.2% accurate, 1.2× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 8.5 \cdot 10^{+141}:\\ \;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sin t\_0 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot 2\right) \cdot \cos t\_0\\ \end{array} \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (let* ((t_0 (* (* PI angle_m) 0.005555555555555556)))
   (*
    angle_s
    (if (<= angle_m 8.5e+141)
      (*
       (*
        (*
         (* (sin (* PI (* angle_m 0.005555555555555556))) (+ a b_m))
         (- b_m a))
        2.0)
       1.0)
      (* (* (* (sin t_0) (* (+ b_m a) (- b_m a))) 2.0) (cos t_0))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (((double) M_PI) * angle_m) * 0.005555555555555556;
	double tmp;
	if (angle_m <= 8.5e+141) {
		tmp = (((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	} else {
		tmp = ((sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * cos(t_0);
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
	double t_0 = (Math.PI * angle_m) * 0.005555555555555556;
	double tmp;
	if (angle_m <= 8.5e+141) {
		tmp = (((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	} else {
		tmp = ((Math.sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * Math.cos(t_0);
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	t_0 = (math.pi * angle_m) * 0.005555555555555556
	tmp = 0
	if angle_m <= 8.5e+141:
		tmp = (((math.sin((math.pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0
	else:
		tmp = ((math.sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * math.cos(t_0)
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	t_0 = Float64(Float64(pi * angle_m) * 0.005555555555555556)
	tmp = 0.0
	if (angle_m <= 8.5e+141)
		tmp = Float64(Float64(Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0) * 1.0);
	else
		tmp = Float64(Float64(Float64(sin(t_0) * Float64(Float64(b_m + a) * Float64(b_m - a))) * 2.0) * cos(t_0));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	t_0 = (pi * angle_m) * 0.005555555555555556;
	tmp = 0.0;
	if (angle_m <= 8.5e+141)
		tmp = (((sin((pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	else
		tmp = ((sin(t_0) * ((b_m + a) * (b_m - a))) * 2.0) * cos(t_0);
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 8.5e+141], N[(N[(N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 8.5 \cdot 10^{+141}:\\
\;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\\

\mathbf{else}:\\
\;\;\;\;\left(\left(\sin t\_0 \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot 2\right) \cdot \cos t\_0\\


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot 1 \]
    9. Applied rewrites65.9%

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

    if 8.4999999999999996e141 < angle

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.9% accurate, 1.7× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b\_m \leq 3.5 \cdot 10^{-132}:\\ \;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(\left(\pi \cdot angle\_m\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot \sin \left(\left(-\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right) + \frac{\pi}{2}\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b_m 3.5e-132)
    (*
     (*
      (* (* (sin (* PI (* angle_m 0.005555555555555556))) (+ a b_m)) (- b_m a))
      2.0)
     1.0)
    (*
     (*
      (* (* (* (* PI angle_m) 0.005555555555555556) (+ a b_m)) (- b_m a))
      2.0)
     (sin (+ (- (* (* PI 0.005555555555555556) angle_m)) (/ PI 2.0)))))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 3.5e-132) {
		tmp = (((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	} else {
		tmp = (((((((double) M_PI) * angle_m) * 0.005555555555555556) * (a + b_m)) * (b_m - a)) * 2.0) * sin((-((((double) M_PI) * 0.005555555555555556) * angle_m) + (((double) M_PI) / 2.0)));
	}
	return angle_s * tmp;
}
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b_m, double angle_m) {
	double tmp;
	if (b_m <= 3.5e-132) {
		tmp = (((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	} else {
		tmp = (((((Math.PI * angle_m) * 0.005555555555555556) * (a + b_m)) * (b_m - a)) * 2.0) * Math.sin((-((Math.PI * 0.005555555555555556) * angle_m) + (Math.PI / 2.0)));
	}
	return angle_s * tmp;
}
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b_m, angle_m):
	tmp = 0
	if b_m <= 3.5e-132:
		tmp = (((math.sin((math.pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0
	else:
		tmp = (((((math.pi * angle_m) * 0.005555555555555556) * (a + b_m)) * (b_m - a)) * 2.0) * math.sin((-((math.pi * 0.005555555555555556) * angle_m) + (math.pi / 2.0)))
	return angle_s * tmp
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	tmp = 0.0
	if (b_m <= 3.5e-132)
		tmp = Float64(Float64(Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0) * 1.0);
	else
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(pi * angle_m) * 0.005555555555555556) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0) * sin(Float64(Float64(-Float64(Float64(pi * 0.005555555555555556) * angle_m)) + Float64(pi / 2.0))));
	end
	return Float64(angle_s * tmp)
end
b_m = abs(b);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b_m, angle_m)
	tmp = 0.0;
	if (b_m <= 3.5e-132)
		tmp = (((sin((pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0;
	else
		tmp = (((((pi * angle_m) * 0.005555555555555556) * (a + b_m)) * (b_m - a)) * 2.0) * sin((-((pi * 0.005555555555555556) * angle_m) + (pi / 2.0)));
	end
	tmp_2 = angle_s * tmp;
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b$95$m, 3.5e-132], N[(N[(N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * 1.0), $MachinePrecision], N[(N[(N[(N[(N[(N[(Pi * angle$95$m), $MachinePrecision] * 0.005555555555555556), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * N[Sin[N[((-N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]) + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b\_m \leq 3.5 \cdot 10^{-132}:\\
\;\;\;\;\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 3.5e-132

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot 1 \]
    9. Applied rewrites65.9%

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

    if 3.5e-132 < b

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot \sin \left(\left(-\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right) + \frac{\pi}{2}\right) \]
    9. Applied rewrites62.5%

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

Alternative 7: 65.5% accurate, 2.0× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2 \cdot 10^{-10}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right) \cdot \left(\left(b\_m + a\right) \cdot \left(b\_m - a\right)\right)\right) \cdot 2\right) \cdot 1\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b_m angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= angle_m 2e-10)
    (fma
     (* -0.011111111111111112 a)
     (* (* PI angle_m) a)
     (* (* (* angle_m (fma PI b_m 0.0)) 0.011111111111111112) b_m))
    (*
     (*
      (* (sin (* PI (* 0.005555555555555556 angle_m))) (* (+ b_m a) (- b_m a)))
      2.0)
     1.0))))
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b_m, double angle_m) {
	double tmp;
	if (angle_m <= 2e-10) {
		tmp = fma((-0.011111111111111112 * a), ((((double) M_PI) * angle_m) * a), (((angle_m * fma(((double) M_PI), b_m, 0.0)) * 0.011111111111111112) * b_m));
	} else {
		tmp = ((sin((((double) M_PI) * (0.005555555555555556 * angle_m))) * ((b_m + a) * (b_m - a))) * 2.0) * 1.0;
	}
	return angle_s * tmp;
}
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b_m, angle_m)
	tmp = 0.0
	if (angle_m <= 2e-10)
		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(pi * angle_m) * a), Float64(Float64(Float64(angle_m * fma(pi, b_m, 0.0)) * 0.011111111111111112) * b_m));
	else
		tmp = Float64(Float64(Float64(sin(Float64(pi * Float64(0.005555555555555556 * angle_m))) * Float64(Float64(b_m + a) * Float64(b_m - a))) * 2.0) * 1.0);
	end
	return Float64(angle_s * tmp)
end
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2e-10], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(angle$95$m * N[(Pi * b$95$m + 0.0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[Sin[N[(Pi * N[(0.005555555555555556 * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(b$95$m + a), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * 1.0), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 2 \cdot 10^{-10}:\\
\;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 2.00000000000000007e-10

    1. Initial program 54.1%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112, \color{blue}{angle}, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\right) \]
    11. Applied rewrites60.0%

      \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\right) \cdot \color{blue}{a}, \left(\left(angle \cdot \mathsf{fma}\left(\pi, b, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\right) \]

    if 2.00000000000000007e-10 < angle

    1. Initial program 54.1%

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

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

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

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

    Alternative 8: 64.9% accurate, 2.2× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\right) \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (*
      angle_s
      (*
       (*
        (* (* (sin (* PI (* angle_m 0.005555555555555556))) (+ a b_m)) (- b_m a))
        2.0)
       1.0)))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	return angle_s * ((((sin((((double) M_PI) * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0);
    }
    
    b_m = Math.abs(b);
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b_m, double angle_m) {
    	return angle_s * ((((Math.sin((Math.PI * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0);
    }
    
    b_m = math.fabs(b)
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b_m, angle_m):
    	return angle_s * ((((math.sin((math.pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0)
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	return Float64(angle_s * Float64(Float64(Float64(Float64(sin(Float64(pi * Float64(angle_m * 0.005555555555555556))) * Float64(a + b_m)) * Float64(b_m - a)) * 2.0) * 1.0))
    end
    
    b_m = abs(b);
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp = code(angle_s, a, b_m, angle_m)
    	tmp = angle_s * ((((sin((pi * (angle_m * 0.005555555555555556))) * (a + b_m)) * (b_m - a)) * 2.0) * 1.0);
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(N[(N[(N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \left(\left(\left(\left(\sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\_m\right)\right) \cdot \left(b\_m - a\right)\right) \cdot 2\right) \cdot 1\right)
    \end{array}
    
    Derivation
    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(a + b\right)\right) \cdot \left(b - a\right)\right) \cdot 2\right) \cdot 1 \]
    9. Applied rewrites65.9%

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

    Alternative 9: 64.3% accurate, 2.2× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.6 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\ \mathbf{elif}\;angle\_m \leq 2.1 \cdot 10^{+214}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \sin \left(2 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right)\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (*
      angle_s
      (if (<= angle_m 5.6e+54)
        (fma
         (* -0.011111111111111112 a)
         (* (* PI angle_m) a)
         (* (* (* angle_m (fma PI b_m 0.0)) 0.011111111111111112) b_m))
        (if (<= angle_m 2.1e+214)
          (*
           (* 0.011111111111111112 angle_m)
           (log (pow (exp PI) (* (- b_m a) (+ a b_m)))))
          (* (* b_m b_m) (sin (* 2.0 (* (* PI 0.005555555555555556) angle_m))))))))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	double tmp;
    	if (angle_m <= 5.6e+54) {
    		tmp = fma((-0.011111111111111112 * a), ((((double) M_PI) * angle_m) * a), (((angle_m * fma(((double) M_PI), b_m, 0.0)) * 0.011111111111111112) * b_m));
    	} else if (angle_m <= 2.1e+214) {
    		tmp = (0.011111111111111112 * angle_m) * log(pow(exp(((double) M_PI)), ((b_m - a) * (a + b_m))));
    	} else {
    		tmp = (b_m * b_m) * sin((2.0 * ((((double) M_PI) * 0.005555555555555556) * angle_m)));
    	}
    	return angle_s * tmp;
    }
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	tmp = 0.0
    	if (angle_m <= 5.6e+54)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(pi * angle_m) * a), Float64(Float64(Float64(angle_m * fma(pi, b_m, 0.0)) * 0.011111111111111112) * b_m));
    	elseif (angle_m <= 2.1e+214)
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * log((exp(pi) ^ Float64(Float64(b_m - a) * Float64(a + b_m)))));
    	else
    		tmp = Float64(Float64(b_m * b_m) * sin(Float64(2.0 * Float64(Float64(pi * 0.005555555555555556) * angle_m))));
    	end
    	return Float64(angle_s * tmp)
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5.6e+54], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(angle$95$m * N[(Pi * b$95$m + 0.0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[angle$95$m, 2.1e+214], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(Pi * 0.005555555555555556), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 5.6 \cdot 10^{+54}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\
    
    \mathbf{elif}\;angle\_m \leq 2.1 \cdot 10^{+214}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \sin \left(2 \cdot \left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\_m\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if angle < 5.6000000000000003e54

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112, \color{blue}{angle}, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Applied rewrites60.0%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\right) \cdot \color{blue}{a}, \left(\left(angle \cdot \mathsf{fma}\left(\pi, b, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\right) \]

      if 5.6000000000000003e54 < angle < 2.1000000000000001e214

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b - a\right) \cdot \left(a + b\right)\right)}\right) \]

      if 2.1000000000000001e214 < angle

      1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{2 \cdot \left({b}^{2} \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)\right)} \]
      6. Applied rewrites36.4%

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

    Alternative 10: 63.2% accurate, 2.4× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 5.6 \cdot 10^{+54}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)}\right)\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (*
      angle_s
      (if (<= angle_m 5.6e+54)
        (fma
         (* -0.011111111111111112 a)
         (* (* PI angle_m) a)
         (* (* (* angle_m (fma PI b_m 0.0)) 0.011111111111111112) b_m))
        (*
         (* 0.011111111111111112 angle_m)
         (log (pow (exp PI) (* (- b_m a) (+ a b_m))))))))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	double tmp;
    	if (angle_m <= 5.6e+54) {
    		tmp = fma((-0.011111111111111112 * a), ((((double) M_PI) * angle_m) * a), (((angle_m * fma(((double) M_PI), b_m, 0.0)) * 0.011111111111111112) * b_m));
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * log(pow(exp(((double) M_PI)), ((b_m - a) * (a + b_m))));
    	}
    	return angle_s * tmp;
    }
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	tmp = 0.0
    	if (angle_m <= 5.6e+54)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(pi * angle_m) * a), Float64(Float64(Float64(angle_m * fma(pi, b_m, 0.0)) * 0.011111111111111112) * b_m));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * log((exp(pi) ^ Float64(Float64(b_m - a) * Float64(a + b_m)))));
    	end
    	return Float64(angle_s * tmp)
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 5.6e+54], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(angle$95$m * N[(Pi * b$95$m + 0.0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[Log[N[Power[N[Exp[Pi], $MachinePrecision], N[(N[(b$95$m - a), $MachinePrecision] * N[(a + b$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 5.6 \cdot 10^{+54}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \log \left({\left(e^{\pi}\right)}^{\left(\left(b\_m - a\right) \cdot \left(a + b\_m\right)\right)}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 5.6000000000000003e54

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112, \color{blue}{angle}, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Applied rewrites60.0%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\right) \cdot \color{blue}{a}, \left(\left(angle \cdot \mathsf{fma}\left(\pi, b, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\right) \]

      if 5.6000000000000003e54 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 62.3% accurate, 3.7× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;angle\_m \leq 2.9 \cdot 10^{+22}:\\ \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\right)\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (*
      angle_s
      (if (<= angle_m 2.9e+22)
        (fma
         (* -0.011111111111111112 a)
         (* (* PI angle_m) a)
         (* (* (* angle_m (fma PI b_m 0.0)) 0.011111111111111112) b_m))
        (* (* 0.011111111111111112 angle_m) (* PI (* (+ b_m a) (- a)))))))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	double tmp;
    	if (angle_m <= 2.9e+22) {
    		tmp = fma((-0.011111111111111112 * a), ((((double) M_PI) * angle_m) * a), (((angle_m * fma(((double) M_PI), b_m, 0.0)) * 0.011111111111111112) * b_m));
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * ((b_m + a) * -a));
    	}
    	return angle_s * tmp;
    }
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	tmp = 0.0
    	if (angle_m <= 2.9e+22)
    		tmp = fma(Float64(-0.011111111111111112 * a), Float64(Float64(pi * angle_m) * a), Float64(Float64(Float64(angle_m * fma(pi, b_m, 0.0)) * 0.011111111111111112) * b_m));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(Float64(b_m + a) * Float64(-a))));
    	end
    	return Float64(angle_s * tmp)
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[angle$95$m, 2.9e+22], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(angle$95$m * N[(Pi * b$95$m + 0.0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;angle\_m \leq 2.9 \cdot 10^{+22}:\\
    \;\;\;\;\mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\_m\right) \cdot a, \left(\left(angle\_m \cdot \mathsf{fma}\left(\pi, b\_m, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\_m\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(-a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if angle < 2.9e22

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112, \color{blue}{angle}, \left(0.011111111111111112 \cdot \mathsf{fma}\left(\pi \cdot b, angle, \left(\left(0 \cdot a\right) \cdot \pi\right) \cdot angle\right)\right) \cdot b\right) \]
      11. Applied rewrites60.0%

        \[\leadsto \mathsf{fma}\left(-0.011111111111111112 \cdot a, \left(\pi \cdot angle\right) \cdot \color{blue}{a}, \left(\left(angle \cdot \mathsf{fma}\left(\pi, b, 0\right)\right) \cdot 0.011111111111111112\right) \cdot b\right) \]

      if 2.9e22 < angle

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right)\right) \]
        2. lower-neg.f6436.9

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

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

    Alternative 12: 62.0% accurate, 1.1× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+220}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112, angle\_m, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\_m\right) \cdot angle\_m\right)\right) \cdot b\_m\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(\left(\frac{b\_m}{a} - 1\right) \cdot a\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (let* ((t_0 (* 2.0 (- (pow b_m 2.0) (pow a 2.0)))))
       (*
        angle_s
        (if (<= t_0 -2e+220)
          (* (* -0.011111111111111112 a) (* (* PI angle_m) a))
          (if (<= t_0 INFINITY)
            (fma
             (* (* PI (* a a)) -0.011111111111111112)
             angle_m
             (* (* 0.011111111111111112 (* (* PI b_m) angle_m)) b_m))
            (*
             (* 0.011111111111111112 angle_m)
             (* PI (* (+ b_m a) (* (- (/ b_m a) 1.0) a)))))))))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	double t_0 = 2.0 * (pow(b_m, 2.0) - pow(a, 2.0));
    	double tmp;
    	if (t_0 <= -2e+220) {
    		tmp = (-0.011111111111111112 * a) * ((((double) M_PI) * angle_m) * a);
    	} else if (t_0 <= ((double) INFINITY)) {
    		tmp = fma(((((double) M_PI) * (a * a)) * -0.011111111111111112), angle_m, ((0.011111111111111112 * ((((double) M_PI) * b_m) * angle_m)) * b_m));
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * ((b_m + a) * (((b_m / a) - 1.0) * a)));
    	}
    	return angle_s * tmp;
    }
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	t_0 = Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0)))
    	tmp = 0.0
    	if (t_0 <= -2e+220)
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(pi * angle_m) * a));
    	elseif (t_0 <= Inf)
    		tmp = fma(Float64(Float64(pi * Float64(a * a)) * -0.011111111111111112), angle_m, Float64(Float64(0.011111111111111112 * Float64(Float64(pi * b_m) * angle_m)) * b_m));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(Float64(b_m + a) * Float64(Float64(Float64(b_m / a) - 1.0) * a))));
    	end
    	return Float64(angle_s * tmp)
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, -2e+220], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(N[(N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision] * -0.011111111111111112), $MachinePrecision] * angle$95$m + N[(N[(0.011111111111111112 * N[(N[(Pi * b$95$m), $MachinePrecision] * angle$95$m), $MachinePrecision]), $MachinePrecision] * b$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(N[(b$95$m + a), $MachinePrecision] * N[(N[(N[(b$95$m / a), $MachinePrecision] - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    \begin{array}{l}
    t_0 := 2 \cdot \left({b\_m}^{2} - {a}^{2}\right)\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;t\_0 \leq -2 \cdot 10^{+220}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\\
    
    \mathbf{elif}\;t\_0 \leq \infty:\\
    \;\;\;\;\mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112, angle\_m, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\_m\right) \cdot angle\_m\right)\right) \cdot b\_m\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\left(b\_m + a\right) \cdot \left(\left(\frac{b\_m}{a} - 1\right) \cdot a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -2e220

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \]
        14. lift-PI.f6437.8

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

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

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

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot \frac{-1}{90}, angle, \left(\frac{1}{90} \cdot \left(angle \cdot \left(b \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot b\right) \]
      12. Step-by-step derivation
        1. *-commutativeN/A

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

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

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

          \[\leadsto \mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot \frac{-1}{90}, angle, \left(\frac{1}{90} \cdot \left(\left(\mathsf{PI}\left(\right) \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]
        5. lift-PI.f6453.8

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

        \[\leadsto \mathsf{fma}\left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112, angle, \left(0.011111111111111112 \cdot \left(\left(\pi \cdot b\right) \cdot angle\right)\right) \cdot b\right) \]

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

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\left(\frac{b}{a} - 1\right) \cdot a\right)\right)\right) \]
      7. Applied rewrites53.1%

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

    Alternative 13: 57.9% accurate, 2.1× speedup?

    \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-130}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right)\\ \end{array} \end{array} \]
    b_m = (fabs.f64 b)
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b_m angle_m)
     :precision binary64
     (*
      angle_s
      (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -5e-130)
        (* (* -0.011111111111111112 a) (* (* PI angle_m) a))
        (* (* 0.011111111111111112 angle_m) (* PI (* b_m (- b_m a)))))))
    b_m = fabs(b);
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b_m, double angle_m) {
    	double tmp;
    	if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -5e-130) {
    		tmp = (-0.011111111111111112 * a) * ((((double) M_PI) * angle_m) * a);
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * (((double) M_PI) * (b_m * (b_m - a)));
    	}
    	return angle_s * tmp;
    }
    
    b_m = Math.abs(b);
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b_m, double angle_m) {
    	double tmp;
    	if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -5e-130) {
    		tmp = (-0.011111111111111112 * a) * ((Math.PI * angle_m) * a);
    	} else {
    		tmp = (0.011111111111111112 * angle_m) * (Math.PI * (b_m * (b_m - a)));
    	}
    	return angle_s * tmp;
    }
    
    b_m = math.fabs(b)
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b_m, angle_m):
    	tmp = 0
    	if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -5e-130:
    		tmp = (-0.011111111111111112 * a) * ((math.pi * angle_m) * a)
    	else:
    		tmp = (0.011111111111111112 * angle_m) * (math.pi * (b_m * (b_m - a)))
    	return angle_s * tmp
    
    b_m = abs(b)
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b_m, angle_m)
    	tmp = 0.0
    	if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -5e-130)
    		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(pi * angle_m) * a));
    	else
    		tmp = Float64(Float64(0.011111111111111112 * angle_m) * Float64(pi * Float64(b_m * Float64(b_m - a))));
    	end
    	return Float64(angle_s * tmp)
    end
    
    b_m = abs(b);
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp_2 = code(angle_s, a, b_m, angle_m)
    	tmp = 0.0;
    	if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -5e-130)
    		tmp = (-0.011111111111111112 * a) * ((pi * angle_m) * a);
    	else
    		tmp = (0.011111111111111112 * angle_m) * (pi * (b_m * (b_m - a)));
    	end
    	tmp_2 = angle_s * tmp;
    end
    
    b_m = N[Abs[b], $MachinePrecision]
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -5e-130], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(0.011111111111111112 * angle$95$m), $MachinePrecision] * N[(Pi * N[(b$95$m * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
    
    \begin{array}{l}
    b_m = \left|b\right|
    \\
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -5 \cdot 10^{-130}:\\
    \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(0.011111111111111112 \cdot angle\_m\right) \cdot \left(\pi \cdot \left(b\_m \cdot \left(b\_m - a\right)\right)\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -4.9999999999999996e-130

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. Taylor expanded in 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. associate-*r*N/A

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

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.8

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.8%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        4. unpow2N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        7. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        8. lift-PI.f6434.3

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
      7. Applied rewrites34.3%

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
      8. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        5. lower-*.f6434.3

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      9. Applied rewrites34.3%

        \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
        9. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        11. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        12. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \]
        13. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \]
        14. lift-PI.f6437.8

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot a\right) \]
      11. Applied rewrites37.8%

        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot \color{blue}{a}\right) \]

      if -4.9999999999999996e-130 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
        8. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.8

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.8%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Taylor expanded in a around 0

        \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      6. Step-by-step derivation
        1. Applied rewrites38.5%

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
      7. Recombined 2 regimes into one program.
      8. Add Preprocessing

      Alternative 14: 56.7% accurate, 2.2× speedup?

      \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-55}:\\ \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\ \end{array} \end{array} \]
      b_m = (fabs.f64 b)
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b_m angle_m)
       :precision binary64
       (*
        angle_s
        (if (<= (* 2.0 (- (pow b_m 2.0) (pow a 2.0))) -4e-55)
          (* (* -0.011111111111111112 a) (* (* PI angle_m) a))
          (* (* (* PI (* b_m b_m)) angle_m) 0.011111111111111112))))
      b_m = fabs(b);
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b_m, double angle_m) {
      	double tmp;
      	if ((2.0 * (pow(b_m, 2.0) - pow(a, 2.0))) <= -4e-55) {
      		tmp = (-0.011111111111111112 * a) * ((((double) M_PI) * angle_m) * a);
      	} else {
      		tmp = ((((double) M_PI) * (b_m * b_m)) * angle_m) * 0.011111111111111112;
      	}
      	return angle_s * tmp;
      }
      
      b_m = Math.abs(b);
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b_m, double angle_m) {
      	double tmp;
      	if ((2.0 * (Math.pow(b_m, 2.0) - Math.pow(a, 2.0))) <= -4e-55) {
      		tmp = (-0.011111111111111112 * a) * ((Math.PI * angle_m) * a);
      	} else {
      		tmp = ((Math.PI * (b_m * b_m)) * angle_m) * 0.011111111111111112;
      	}
      	return angle_s * tmp;
      }
      
      b_m = math.fabs(b)
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b_m, angle_m):
      	tmp = 0
      	if (2.0 * (math.pow(b_m, 2.0) - math.pow(a, 2.0))) <= -4e-55:
      		tmp = (-0.011111111111111112 * a) * ((math.pi * angle_m) * a)
      	else:
      		tmp = ((math.pi * (b_m * b_m)) * angle_m) * 0.011111111111111112
      	return angle_s * tmp
      
      b_m = abs(b)
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b_m, angle_m)
      	tmp = 0.0
      	if (Float64(2.0 * Float64((b_m ^ 2.0) - (a ^ 2.0))) <= -4e-55)
      		tmp = Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(pi * angle_m) * a));
      	else
      		tmp = Float64(Float64(Float64(pi * Float64(b_m * b_m)) * angle_m) * 0.011111111111111112);
      	end
      	return Float64(angle_s * tmp)
      end
      
      b_m = abs(b);
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp_2 = code(angle_s, a, b_m, angle_m)
      	tmp = 0.0;
      	if ((2.0 * ((b_m ^ 2.0) - (a ^ 2.0))) <= -4e-55)
      		tmp = (-0.011111111111111112 * a) * ((pi * angle_m) * a);
      	else
      		tmp = ((pi * (b_m * b_m)) * angle_m) * 0.011111111111111112;
      	end
      	tmp_2 = angle_s * tmp;
      end
      
      b_m = N[Abs[b], $MachinePrecision]
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(2.0 * N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e-55], N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision] * angle$95$m), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      b_m = \left|b\right|
      \\
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \begin{array}{l}
      \mathbf{if}\;2 \cdot \left({b\_m}^{2} - {a}^{2}\right) \leq -4 \cdot 10^{-55}:\\
      \;\;\;\;\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\left(\pi \cdot \left(b\_m \cdot b\_m\right)\right) \cdot angle\_m\right) \cdot 0.011111111111111112\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) < -3.99999999999999998e-55

        1. Initial program 54.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. Taylor expanded in 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. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          6. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
          7. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
          8. difference-of-squaresN/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          10. lower-+.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          11. lower--.f6454.8

            \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        4. Applied rewrites54.8%

          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        5. Taylor expanded in a around inf

          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        6. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          4. unpow2N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          5. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          7. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
          8. lift-PI.f6434.3

            \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        7. Applied rewrites34.3%

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          5. lower-*.f6434.3

            \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        9. Applied rewrites34.3%

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        10. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
          2. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          3. lift-*.f64N/A

            \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
          4. associate-*l*N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          6. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
          8. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
          9. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
          10. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          11. lower-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
          12. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \]
          13. lift-*.f64N/A

            \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \]
          14. lift-PI.f6437.8

            \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot a\right) \]
        11. Applied rewrites37.8%

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot \color{blue}{a}\right) \]

        if -3.99999999999999998e-55 < (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))))

        1. Initial program 54.1%

          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
        2. 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. associate-*r*N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
          3. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
          5. lift-PI.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
          6. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
          7. unpow2N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
          8. difference-of-squaresN/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          9. lower-*.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
          10. lower-+.f64N/A

            \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
          11. lower--.f6454.8

            \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
        4. Applied rewrites54.8%

          \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
        5. Taylor expanded in a around 0

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
          2. lower-*.f64N/A

            \[\leadsto \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \frac{1}{90} \]
          3. *-commutativeN/A

            \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
          4. lower-*.f64N/A

            \[\leadsto \left(\left({b}^{2} \cdot \mathsf{PI}\left(\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
          5. *-commutativeN/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
          6. lower-*.f64N/A

            \[\leadsto \left(\left(\mathsf{PI}\left(\right) \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
          7. lift-PI.f64N/A

            \[\leadsto \left(\left(\pi \cdot {b}^{2}\right) \cdot angle\right) \cdot \frac{1}{90} \]
          8. pow2N/A

            \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \frac{1}{90} \]
          9. lift-*.f6435.8

            \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot 0.011111111111111112 \]
        7. Applied rewrites35.8%

          \[\leadsto \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot angle\right) \cdot \color{blue}{0.011111111111111112} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 15: 37.8% accurate, 9.4× speedup?

      \[\begin{array}{l} b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\right) \end{array} \]
      b_m = (fabs.f64 b)
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b_m angle_m)
       :precision binary64
       (* angle_s (* (* -0.011111111111111112 a) (* (* PI angle_m) a))))
      b_m = fabs(b);
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b_m, double angle_m) {
      	return angle_s * ((-0.011111111111111112 * a) * ((((double) M_PI) * angle_m) * a));
      }
      
      b_m = Math.abs(b);
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b_m, double angle_m) {
      	return angle_s * ((-0.011111111111111112 * a) * ((Math.PI * angle_m) * a));
      }
      
      b_m = math.fabs(b)
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b_m, angle_m):
      	return angle_s * ((-0.011111111111111112 * a) * ((math.pi * angle_m) * a))
      
      b_m = abs(b)
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b_m, angle_m)
      	return Float64(angle_s * Float64(Float64(-0.011111111111111112 * a) * Float64(Float64(pi * angle_m) * a)))
      end
      
      b_m = abs(b);
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b_m, angle_m)
      	tmp = angle_s * ((-0.011111111111111112 * a) * ((pi * angle_m) * a));
      end
      
      b_m = N[Abs[b], $MachinePrecision]
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b$95$m_, angle$95$m_] := N[(angle$95$s * N[(N[(-0.011111111111111112 * a), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      b_m = \left|b\right|
      \\
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(\left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot a\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 54.1%

        \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. 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. associate-*r*N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left({b}^{2} - {a}^{2}\right)\right)} \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\color{blue}{\mathsf{PI}\left(\right)} \cdot \left({b}^{2} - {a}^{2}\right)\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left({b}^{2} - {a}^{2}\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\color{blue}{{b}^{2}} - {a}^{2}\right)\right) \]
        6. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - {\color{blue}{a}}^{2}\right)\right) \]
        7. unpow2N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(b \cdot b - a \cdot \color{blue}{a}\right)\right) \]
        8. difference-of-squaresN/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        9. lower-*.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \]
        10. lower-+.f64N/A

          \[\leadsto \left(\frac{1}{90} \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(\color{blue}{b} - a\right)\right)\right) \]
        11. lower--.f6454.8

          \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - \color{blue}{a}\right)\right)\right) \]
      4. Applied rewrites54.8%

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
      5. Taylor expanded in a around inf

        \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      6. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        2. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \color{blue}{\mathsf{PI}\left(\right)}\right) \]
        3. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot {a}^{2}\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        4. unpow2N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        5. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        7. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right) \]
        8. lift-PI.f6434.3

          \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
      7. Applied rewrites34.3%

        \[\leadsto \left(-0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(\pi \cdot angle\right)} \]
      8. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot \left(a \cdot a\right)\right) \cdot \left(\pi \cdot angle\right) \]
        3. associate-*r*N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. lower-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        5. lower-*.f6434.3

          \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      9. Applied rewrites34.3%

        \[\leadsto \left(\left(-0.011111111111111112 \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
      10. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot \color{blue}{angle}\right) \]
        2. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        3. lift-*.f64N/A

          \[\leadsto \left(\left(\frac{-1}{90} \cdot a\right) \cdot a\right) \cdot \left(\pi \cdot angle\right) \]
        4. associate-*l*N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(\pi \cdot angle\right)}\right) \]
        5. lift-PI.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        6. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \]
        8. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \color{blue}{\left(angle \cdot \mathsf{PI}\left(\right)\right)}\right) \]
        9. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(a \cdot \left(\color{blue}{angle} \cdot \mathsf{PI}\left(\right)\right)\right) \]
        10. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        11. lower-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot a\right) \]
        12. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \]
        13. lift-*.f64N/A

          \[\leadsto \left(\frac{-1}{90} \cdot a\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot a\right) \]
        14. lift-PI.f6437.8

          \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot a\right) \]
      11. Applied rewrites37.8%

        \[\leadsto \left(-0.011111111111111112 \cdot a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot \color{blue}{a}\right) \]
      12. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025134 
      (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)))))