ab-angle->ABCF B

Percentage Accurate: 54.0% → 67.6%
Time: 15.6s
Alternatives: 16
Speedup: 10.3×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 54.0% 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.6% accurate, 3.4× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;a\_m \leq 1.08 \cdot 10^{+170}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;a\_m \leq 3.3 \cdot 10^{+205}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt{b\_m}, \sqrt{b\_m}, a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(b\_m - a\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
a_m = (fabs.f64 a)
(FPCore (a_m b_m angle)
 :precision binary64
 (if (<= a_m 1.08e+170)
   (* (+ b_m a_m) (* (- b_m a_m) (sin (* angle (* 0.011111111111111112 PI)))))
   (if (<= a_m 3.3e+205)
     (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* angle PI))))
     (*
      (fma (sqrt b_m) (sqrt b_m) a_m)
      (*
       angle
       (fma
        (* -2.2862368541380886e-7 (* angle angle))
        (* (- b_m a_m) (* PI (* PI PI)))
        (* 0.011111111111111112 (* (- b_m a_m) PI))))))))
b_m = fabs(b);
a_m = fabs(a);
double code(double a_m, double b_m, double angle) {
	double tmp;
	if (a_m <= 1.08e+170) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((angle * (0.011111111111111112 * ((double) M_PI)))));
	} else if (a_m <= 3.3e+205) {
		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * ((double) M_PI))));
	} else {
		tmp = fma(sqrt(b_m), sqrt(b_m), a_m) * (angle * fma((-2.2862368541380886e-7 * (angle * angle)), ((b_m - a_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (0.011111111111111112 * ((b_m - a_m) * ((double) M_PI)))));
	}
	return tmp;
}
b_m = abs(b)
a_m = abs(a)
function code(a_m, b_m, angle)
	tmp = 0.0
	if (a_m <= 1.08e+170)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(angle * Float64(0.011111111111111112 * pi)))));
	elseif (a_m <= 3.3e+205)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(angle * pi))));
	else
		tmp = Float64(fma(sqrt(b_m), sqrt(b_m), a_m) * Float64(angle * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(Float64(b_m - a_m) * Float64(pi * Float64(pi * pi))), Float64(0.011111111111111112 * Float64(Float64(b_m - a_m) * pi)))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b$95$m_, angle_] := If[LessEqual[a$95$m, 1.08e+170], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(angle * N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a$95$m, 3.3e+205], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Sqrt[b$95$m], $MachinePrecision] * N[Sqrt[b$95$m], $MachinePrecision] + a$95$m), $MachinePrecision] * N[(angle * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|
\\
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;a\_m \leq 1.08 \cdot 10^{+170}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right)\right)\\

\mathbf{elif}\;a\_m \leq 3.3 \cdot 10^{+205}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt{b\_m}, \sqrt{b\_m}, a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(b\_m - a\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\left(b\_m - a\_m\right) \cdot \pi\right)\right)\right)\\


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

    1. Initial program 50.6%

      \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.07999999999999996e170 < a < 3.3000000000000002e205

    1. Initial program 21.8%

      \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3000000000000002e205 < a

    1. Initial program 51.7%

      \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\sqrt{b} \cdot \color{blue}{\sqrt{b}} + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{90}\right)\right) \]
      5. lower-fma.f6427.7

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{b}, \sqrt{b}, a\right)} \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right) \]
    6. Applied rewrites27.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{b}, \sqrt{b}, a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\left(b - a\right)} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
      10. cube-multN/A

        \[\leadsto \mathsf{fma}\left(\sqrt{b}, \sqrt{b}, a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\right) \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right)}, \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
      11. unpow2N/A

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\sqrt{b}, \sqrt{b}, a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \left(b - a\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)\right), \color{blue}{\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    9. Applied rewrites16.6%

      \[\leadsto \mathsf{fma}\left(\sqrt{b}, \sqrt{b}, a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(b - a\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\pi \cdot \left(b - a\right)\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification59.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 1.08 \cdot 10^{+170}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;a \leq 3.3 \cdot 10^{+205}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\sqrt{b}, \sqrt{b}, a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \left(b - a\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 58.0% accurate, 2.0× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b\_m}^{2} - {a\_m}^{2} \leq -5 \cdot 10^{-182}:\\ \;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
a_m = (fabs.f64 a)
(FPCore (a_m b_m angle)
 :precision binary64
 (if (<= (- (pow b_m 2.0) (pow a_m 2.0)) -5e-182)
   (* a_m (* -0.011111111111111112 (* a_m (* angle PI))))
   (* 0.011111111111111112 (* angle (* PI (* b_m b_m))))))
b_m = fabs(b);
a_m = fabs(a);
double code(double a_m, double b_m, double angle) {
	double tmp;
	if ((pow(b_m, 2.0) - pow(a_m, 2.0)) <= -5e-182) {
		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * ((double) M_PI))));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b_m * b_m)));
	}
	return tmp;
}
b_m = Math.abs(b);
a_m = Math.abs(a);
public static double code(double a_m, double b_m, double angle) {
	double tmp;
	if ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) <= -5e-182) {
		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * Math.PI)));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * (b_m * b_m)));
	}
	return tmp;
}
b_m = math.fabs(b)
a_m = math.fabs(a)
def code(a_m, b_m, angle):
	tmp = 0
	if (math.pow(b_m, 2.0) - math.pow(a_m, 2.0)) <= -5e-182:
		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * math.pi)))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * (b_m * b_m)))
	return tmp
b_m = abs(b)
a_m = abs(a)
function code(a_m, b_m, angle)
	tmp = 0.0
	if (Float64((b_m ^ 2.0) - (a_m ^ 2.0)) <= -5e-182)
		tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(a_m * Float64(angle * pi))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b_m * b_m))));
	end
	return tmp
end
b_m = abs(b);
a_m = abs(a);
function tmp_2 = code(a_m, b_m, angle)
	tmp = 0.0;
	if (((b_m ^ 2.0) - (a_m ^ 2.0)) <= -5e-182)
		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * pi)));
	else
		tmp = 0.011111111111111112 * (angle * (pi * (b_m * b_m)));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
a_m = N[Abs[a], $MachinePrecision]
code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -5e-182], N[(a$95$m * N[(-0.011111111111111112 * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|
\\
a_m = \left|a\right|

\\
\begin{array}{l}
\mathbf{if}\;{b\_m}^{2} - {a\_m}^{2} \leq -5 \cdot 10^{-182}:\\
\;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < -5.00000000000000024e-182

    1. Initial program 42.0%

      \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
    3. 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)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
    7. Step-by-step derivation
      1. Applied rewrites40.8%

        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
      2. Step-by-step derivation
        1. Applied rewrites55.7%

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

        if -5.00000000000000024e-182 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

        1. Initial program 55.6%

          \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
        3. 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)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
          12. lower--.f6456.8

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

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

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

          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
        8. Step-by-step derivation
          1. Applied rewrites59.1%

            \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
        9. Recombined 2 regimes into one program.
        10. Final simplification57.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -5 \cdot 10^{-182}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]
        11. Add Preprocessing

        Alternative 3: 58.0% accurate, 2.0× speedup?

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

          1. Initial program 42.0%

            \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
          3. 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)} \]
          4. Step-by-step derivation
            1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
          7. Step-by-step derivation
            1. Applied rewrites40.8%

              \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
            2. Step-by-step derivation
              1. Applied rewrites55.7%

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

              if -5.00000000000000024e-182 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))

              1. Initial program 55.6%

                \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
              3. 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)} \]
              4. Step-by-step derivation
                1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                12. lower--.f6456.8

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

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

                \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
              7. Step-by-step derivation
                1. Applied rewrites59.0%

                  \[\leadsto \left(0.011111111111111112 \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot \left(b \cdot b\right)\right)} \]
              8. Recombined 2 regimes into one program.
              9. Final simplification57.5%

                \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -5 \cdot 10^{-182}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\\ \end{array} \]
              10. Add Preprocessing

              Alternative 4: 67.4% accurate, 2.7× speedup?

              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+134}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\\ \end{array} \end{array} \]
              b_m = (fabs.f64 b)
              a_m = (fabs.f64 a)
              (FPCore (a_m b_m angle)
               :precision binary64
               (if (<= (/ angle 180.0) 5e+134)
                 (* (+ b_m a_m) (* (- b_m a_m) (sin (* PI (* angle 0.011111111111111112)))))
                 (*
                  (* (* 0.011111111111111112 (* angle PI)) (* (+ b_m a_m) (- b_m a_m)))
                  (cos (* (/ angle 180.0) PI)))))
              b_m = fabs(b);
              a_m = fabs(a);
              double code(double a_m, double b_m, double angle) {
              	double tmp;
              	if ((angle / 180.0) <= 5e+134) {
              		tmp = (b_m + a_m) * ((b_m - a_m) * sin((((double) M_PI) * (angle * 0.011111111111111112))));
              	} else {
              		tmp = ((0.011111111111111112 * (angle * ((double) M_PI))) * ((b_m + a_m) * (b_m - a_m))) * cos(((angle / 180.0) * ((double) M_PI)));
              	}
              	return tmp;
              }
              
              b_m = Math.abs(b);
              a_m = Math.abs(a);
              public static double code(double a_m, double b_m, double angle) {
              	double tmp;
              	if ((angle / 180.0) <= 5e+134) {
              		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((Math.PI * (angle * 0.011111111111111112))));
              	} else {
              		tmp = ((0.011111111111111112 * (angle * Math.PI)) * ((b_m + a_m) * (b_m - a_m))) * Math.cos(((angle / 180.0) * Math.PI));
              	}
              	return tmp;
              }
              
              b_m = math.fabs(b)
              a_m = math.fabs(a)
              def code(a_m, b_m, angle):
              	tmp = 0
              	if (angle / 180.0) <= 5e+134:
              		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((math.pi * (angle * 0.011111111111111112))))
              	else:
              		tmp = ((0.011111111111111112 * (angle * math.pi)) * ((b_m + a_m) * (b_m - a_m))) * math.cos(((angle / 180.0) * math.pi))
              	return tmp
              
              b_m = abs(b)
              a_m = abs(a)
              function code(a_m, b_m, angle)
              	tmp = 0.0
              	if (Float64(angle / 180.0) <= 5e+134)
              		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(pi * Float64(angle * 0.011111111111111112)))));
              	else
              		tmp = Float64(Float64(Float64(0.011111111111111112 * Float64(angle * pi)) * Float64(Float64(b_m + a_m) * Float64(b_m - a_m))) * cos(Float64(Float64(angle / 180.0) * pi)));
              	end
              	return tmp
              end
              
              b_m = abs(b);
              a_m = abs(a);
              function tmp_2 = code(a_m, b_m, angle)
              	tmp = 0.0;
              	if ((angle / 180.0) <= 5e+134)
              		tmp = (b_m + a_m) * ((b_m - a_m) * sin((pi * (angle * 0.011111111111111112))));
              	else
              		tmp = ((0.011111111111111112 * (angle * pi)) * ((b_m + a_m) * (b_m - a_m))) * cos(((angle / 180.0) * pi));
              	end
              	tmp_2 = tmp;
              end
              
              b_m = N[Abs[b], $MachinePrecision]
              a_m = N[Abs[a], $MachinePrecision]
              code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+134], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision] * N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              b_m = \left|b\right|
              \\
              a_m = \left|a\right|
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+134}:\\
              \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 angle #s(literal 180 binary64)) < 4.99999999999999981e134

                1. Initial program 54.2%

                  \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \frac{1}{90}\right)} \cdot \mathsf{PI}\left(\right)\right)\right) \]
                  8. lower-*.f6469.9

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

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

                if 4.99999999999999981e134 < (/.f64 angle #s(literal 180 binary64))

                1. Initial program 23.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. Add Preprocessing
                3. Taylor expanded in angle around 0

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  9. difference-of-squaresN/A

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

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

                    \[\leadsto \left(\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot \cos \left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right) \]
                  12. lower--.f6438.8

                    \[\leadsto \left(\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                5. Applied rewrites38.8%

                  \[\leadsto \color{blue}{\left(\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
              3. Recombined 2 regimes into one program.
              4. Final simplification65.3%

                \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+134}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\\ \end{array} \]
              5. Add Preprocessing

              Alternative 5: 62.9% accurate, 2.8× speedup?

              \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-183}:\\ \;\;\;\;\left(a\_m \cdot \left(angle \cdot a\_m\right)\right) \cdot \left(\pi \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
              b_m = (fabs.f64 b)
              a_m = (fabs.f64 a)
              (FPCore (a_m b_m angle)
               :precision binary64
               (if (<= (pow b_m 2.0) 2e-183)
                 (* (* a_m (* angle a_m)) (* PI -0.011111111111111112))
                 (*
                  (+ b_m a_m)
                  (*
                   (- b_m a_m)
                   (*
                    angle
                    (fma
                     (* -2.2862368541380886e-7 (* angle angle))
                     (* PI (* PI PI))
                     (* 0.011111111111111112 PI)))))))
              b_m = fabs(b);
              a_m = fabs(a);
              double code(double a_m, double b_m, double angle) {
              	double tmp;
              	if (pow(b_m, 2.0) <= 2e-183) {
              		tmp = (a_m * (angle * a_m)) * (((double) M_PI) * -0.011111111111111112);
              	} else {
              		tmp = (b_m + a_m) * ((b_m - a_m) * (angle * fma((-2.2862368541380886e-7 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.011111111111111112 * ((double) M_PI)))));
              	}
              	return tmp;
              }
              
              b_m = abs(b)
              a_m = abs(a)
              function code(a_m, b_m, angle)
              	tmp = 0.0
              	if ((b_m ^ 2.0) <= 2e-183)
              		tmp = Float64(Float64(a_m * Float64(angle * a_m)) * Float64(pi * -0.011111111111111112));
              	else
              		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(angle * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.011111111111111112 * pi)))));
              	end
              	return tmp
              end
              
              b_m = N[Abs[b], $MachinePrecision]
              a_m = N[Abs[a], $MachinePrecision]
              code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[Power[b$95$m, 2.0], $MachinePrecision], 2e-183], N[(N[(a$95$m * N[(angle * a$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(angle * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              b_m = \left|b\right|
              \\
              a_m = \left|a\right|
              
              \\
              \begin{array}{l}
              \mathbf{if}\;{b\_m}^{2} \leq 2 \cdot 10^{-183}:\\
              \;\;\;\;\left(a\_m \cdot \left(angle \cdot a\_m\right)\right) \cdot \left(\pi \cdot -0.011111111111111112\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (pow.f64 b #s(literal 2 binary64)) < 2.00000000000000001e-183

                1. Initial program 50.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. Add Preprocessing
                3. 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)} \]
                4. Step-by-step derivation
                  1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                  12. lower--.f6451.9

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

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

                  \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                7. Step-by-step derivation
                  1. Applied rewrites51.1%

                    \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                  2. Step-by-step derivation
                    1. Applied rewrites58.1%

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

                    if 2.00000000000000001e-183 < (pow.f64 b #s(literal 2 binary64))

                    1. Initial program 49.2%

                      \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                      8. unpow2N/A

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

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

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

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

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

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

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

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                      16. lower-PI.f6463.9

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                    7. Applied rewrites63.9%

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{-183}:\\ \;\;\;\;\left(a \cdot \left(angle \cdot a\right)\right) \cdot \left(\pi \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 6: 65.0% accurate, 3.1× speedup?

                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-57}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\ \end{array} \end{array} \]
                  b_m = (fabs.f64 b)
                  a_m = (fabs.f64 a)
                  (FPCore (a_m b_m angle)
                   :precision binary64
                   (if (<= (/ angle 180.0) 1e-57)
                     (*
                      (+ b_m a_m)
                      (*
                       (- b_m a_m)
                       (*
                        angle
                        (fma
                         (* -2.2862368541380886e-7 (* angle angle))
                         (* PI (* PI PI))
                         (* 0.011111111111111112 PI)))))
                     (*
                      (* (+ b_m a_m) (- b_m a_m))
                      (sin (* 0.011111111111111112 (* angle PI))))))
                  b_m = fabs(b);
                  a_m = fabs(a);
                  double code(double a_m, double b_m, double angle) {
                  	double tmp;
                  	if ((angle / 180.0) <= 1e-57) {
                  		tmp = (b_m + a_m) * ((b_m - a_m) * (angle * fma((-2.2862368541380886e-7 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.011111111111111112 * ((double) M_PI)))));
                  	} else {
                  		tmp = ((b_m + a_m) * (b_m - a_m)) * sin((0.011111111111111112 * (angle * ((double) M_PI))));
                  	}
                  	return tmp;
                  }
                  
                  b_m = abs(b)
                  a_m = abs(a)
                  function code(a_m, b_m, angle)
                  	tmp = 0.0
                  	if (Float64(angle / 180.0) <= 1e-57)
                  		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(angle * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.011111111111111112 * pi)))));
                  	else
                  		tmp = Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * sin(Float64(0.011111111111111112 * Float64(angle * pi))));
                  	end
                  	return tmp
                  end
                  
                  b_m = N[Abs[b], $MachinePrecision]
                  a_m = N[Abs[a], $MachinePrecision]
                  code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-57], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(angle * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  b_m = \left|b\right|
                  \\
                  a_m = \left|a\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\frac{angle}{180} \leq 10^{-57}:\\
                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999955e-58

                    1. Initial program 55.7%

                      \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
                    3. Step-by-step derivation
                      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                      8. unpow2N/A

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

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

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

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

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

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

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

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                      16. lower-PI.f6470.7

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                    7. Applied rewrites70.7%

                      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]

                    if 9.99999999999999955e-58 < (/.f64 angle #s(literal 180 binary64))

                    1. Initial program 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-57}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 7: 64.9% accurate, 3.3× speedup?

                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} t_0 := \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\ \mathbf{if}\;b\_m \leq 2.25 \cdot 10^{-91}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(t\_0 \cdot \left(-a\_m\right)\right)\\ \mathbf{elif}\;b\_m \leq 7 \cdot 10^{+220}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot t\_0\right)\\ \end{array} \end{array} \]
                  b_m = (fabs.f64 b)
                  a_m = (fabs.f64 a)
                  (FPCore (a_m b_m angle)
                   :precision binary64
                   (let* ((t_0 (sin (* 0.011111111111111112 (* angle PI)))))
                     (if (<= b_m 2.25e-91)
                       (* (+ b_m a_m) (* t_0 (- a_m)))
                       (if (<= b_m 7e+220)
                         (*
                          (+ b_m a_m)
                          (*
                           (- b_m a_m)
                           (*
                            angle
                            (fma
                             (* -2.2862368541380886e-7 (* angle angle))
                             (* PI (* PI PI))
                             (* 0.011111111111111112 PI)))))
                         (* (+ b_m a_m) (* b_m t_0))))))
                  b_m = fabs(b);
                  a_m = fabs(a);
                  double code(double a_m, double b_m, double angle) {
                  	double t_0 = sin((0.011111111111111112 * (angle * ((double) M_PI))));
                  	double tmp;
                  	if (b_m <= 2.25e-91) {
                  		tmp = (b_m + a_m) * (t_0 * -a_m);
                  	} else if (b_m <= 7e+220) {
                  		tmp = (b_m + a_m) * ((b_m - a_m) * (angle * fma((-2.2862368541380886e-7 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.011111111111111112 * ((double) M_PI)))));
                  	} else {
                  		tmp = (b_m + a_m) * (b_m * t_0);
                  	}
                  	return tmp;
                  }
                  
                  b_m = abs(b)
                  a_m = abs(a)
                  function code(a_m, b_m, angle)
                  	t_0 = sin(Float64(0.011111111111111112 * Float64(angle * pi)))
                  	tmp = 0.0
                  	if (b_m <= 2.25e-91)
                  		tmp = Float64(Float64(b_m + a_m) * Float64(t_0 * Float64(-a_m)));
                  	elseif (b_m <= 7e+220)
                  		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(angle * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.011111111111111112 * pi)))));
                  	else
                  		tmp = Float64(Float64(b_m + a_m) * Float64(b_m * t_0));
                  	end
                  	return tmp
                  end
                  
                  b_m = N[Abs[b], $MachinePrecision]
                  a_m = N[Abs[a], $MachinePrecision]
                  code[a$95$m_, b$95$m_, angle_] := Block[{t$95$0 = N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$m, 2.25e-91], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(t$95$0 * (-a$95$m)), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7e+220], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(angle * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  b_m = \left|b\right|
                  \\
                  a_m = \left|a\right|
                  
                  \\
                  \begin{array}{l}
                  t_0 := \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\\
                  \mathbf{if}\;b\_m \leq 2.25 \cdot 10^{-91}:\\
                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(t\_0 \cdot \left(-a\_m\right)\right)\\
                  
                  \mathbf{elif}\;b\_m \leq 7 \cdot 10^{+220}:\\
                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot t\_0\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if b < 2.24999999999999988e-91

                    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.24999999999999988e-91 < b < 6.99999999999999972e220

                    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                      8. unpow2N/A

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

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

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

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

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

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

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

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                      16. lower-PI.f6458.4

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                    7. Applied rewrites58.4%

                      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]

                    if 6.99999999999999972e220 < b

                    1. Initial program 48.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                    7. Applied rewrites93.2%

                      \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)} \]
                  3. Recombined 3 regimes into one program.
                  4. Final simplification50.8%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.25 \cdot 10^{-91}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-a\right)\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+220}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 8: 62.9% accurate, 3.3× speedup?

                  \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 2.4 \cdot 10^{-87}:\\ \;\;\;\;\mathsf{fma}\left(a\_m, \mathsf{fma}\left(0.011111111111111112, \left(angle \cdot \pi\right) \cdot 0, -0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right), \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \mathbf{elif}\;b\_m \leq 7 \cdot 10^{+220}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
                  b_m = (fabs.f64 b)
                  a_m = (fabs.f64 a)
                  (FPCore (a_m b_m angle)
                   :precision binary64
                   (if (<= b_m 2.4e-87)
                     (fma
                      a_m
                      (fma
                       0.011111111111111112
                       (* (* angle PI) 0.0)
                       (* -0.011111111111111112 (* a_m (* angle PI))))
                      (* (* angle 0.011111111111111112) (* PI (* b_m b_m))))
                     (if (<= b_m 7e+220)
                       (*
                        (+ b_m a_m)
                        (*
                         (- b_m a_m)
                         (*
                          angle
                          (fma
                           (* -2.2862368541380886e-7 (* angle angle))
                           (* PI (* PI PI))
                           (* 0.011111111111111112 PI)))))
                       (* (+ b_m a_m) (* b_m (sin (* 0.011111111111111112 (* angle PI))))))))
                  b_m = fabs(b);
                  a_m = fabs(a);
                  double code(double a_m, double b_m, double angle) {
                  	double tmp;
                  	if (b_m <= 2.4e-87) {
                  		tmp = fma(a_m, fma(0.011111111111111112, ((angle * ((double) M_PI)) * 0.0), (-0.011111111111111112 * (a_m * (angle * ((double) M_PI))))), ((angle * 0.011111111111111112) * (((double) M_PI) * (b_m * b_m))));
                  	} else if (b_m <= 7e+220) {
                  		tmp = (b_m + a_m) * ((b_m - a_m) * (angle * fma((-2.2862368541380886e-7 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.011111111111111112 * ((double) M_PI)))));
                  	} else {
                  		tmp = (b_m + a_m) * (b_m * sin((0.011111111111111112 * (angle * ((double) M_PI)))));
                  	}
                  	return tmp;
                  }
                  
                  b_m = abs(b)
                  a_m = abs(a)
                  function code(a_m, b_m, angle)
                  	tmp = 0.0
                  	if (b_m <= 2.4e-87)
                  		tmp = fma(a_m, fma(0.011111111111111112, Float64(Float64(angle * pi) * 0.0), Float64(-0.011111111111111112 * Float64(a_m * Float64(angle * pi)))), Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b_m * b_m))));
                  	elseif (b_m <= 7e+220)
                  		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(angle * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.011111111111111112 * pi)))));
                  	else
                  		tmp = Float64(Float64(b_m + a_m) * Float64(b_m * sin(Float64(0.011111111111111112 * Float64(angle * pi)))));
                  	end
                  	return tmp
                  end
                  
                  b_m = N[Abs[b], $MachinePrecision]
                  a_m = N[Abs[a], $MachinePrecision]
                  code[a$95$m_, b$95$m_, angle_] := If[LessEqual[b$95$m, 2.4e-87], N[(a$95$m * N[(0.011111111111111112 * N[(N[(angle * Pi), $MachinePrecision] * 0.0), $MachinePrecision] + N[(-0.011111111111111112 * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$m, 7e+220], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(angle * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m * N[Sin[N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  b_m = \left|b\right|
                  \\
                  a_m = \left|a\right|
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;b\_m \leq 2.4 \cdot 10^{-87}:\\
                  \;\;\;\;\mathsf{fma}\left(a\_m, \mathsf{fma}\left(0.011111111111111112, \left(angle \cdot \pi\right) \cdot 0, -0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right), \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\
                  
                  \mathbf{elif}\;b\_m \leq 7 \cdot 10^{+220}:\\
                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(b\_m \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if b < 2.4e-87

                    1. Initial program 49.2%

                      \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
                    3. 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)} \]
                    4. Step-by-step derivation
                      1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                      12. lower--.f6451.6

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

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

                      \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) + \color{blue}{a \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)\right)} \]
                    7. Step-by-step derivation
                      1. Applied rewrites57.0%

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

                      if 2.4e-87 < b < 6.99999999999999972e220

                      1. Initial program 51.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. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                        8. unpow2N/A

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

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

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

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

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

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

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

                          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                        16. lower-PI.f6457.8

                          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                      7. Applied rewrites57.8%

                        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]

                      if 6.99999999999999972e220 < b

                      1. Initial program 48.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(b + a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\pi}\right)\right) \cdot b\right) \]
                      7. Applied rewrites93.2%

                        \[\leadsto \left(b + a\right) \cdot \color{blue}{\left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot b\right)} \]
                    8. Recombined 3 regimes into one program.
                    9. Final simplification59.3%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.4 \cdot 10^{-87}:\\ \;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(0.011111111111111112, \left(angle \cdot \pi\right) \cdot 0, -0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right), \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{elif}\;b \leq 7 \cdot 10^{+220}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 9: 63.3% accurate, 7.1× speedup?

                    \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 2.4 \cdot 10^{-87}:\\ \;\;\;\;\mathsf{fma}\left(a\_m, \mathsf{fma}\left(0.011111111111111112, \left(angle \cdot \pi\right) \cdot 0, -0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right), \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
                    b_m = (fabs.f64 b)
                    a_m = (fabs.f64 a)
                    (FPCore (a_m b_m angle)
                     :precision binary64
                     (if (<= b_m 2.4e-87)
                       (fma
                        a_m
                        (fma
                         0.011111111111111112
                         (* (* angle PI) 0.0)
                         (* -0.011111111111111112 (* a_m (* angle PI))))
                        (* (* angle 0.011111111111111112) (* PI (* b_m b_m))))
                       (*
                        (+ b_m a_m)
                        (*
                         (- b_m a_m)
                         (*
                          angle
                          (fma
                           (* -2.2862368541380886e-7 (* angle angle))
                           (* PI (* PI PI))
                           (* 0.011111111111111112 PI)))))))
                    b_m = fabs(b);
                    a_m = fabs(a);
                    double code(double a_m, double b_m, double angle) {
                    	double tmp;
                    	if (b_m <= 2.4e-87) {
                    		tmp = fma(a_m, fma(0.011111111111111112, ((angle * ((double) M_PI)) * 0.0), (-0.011111111111111112 * (a_m * (angle * ((double) M_PI))))), ((angle * 0.011111111111111112) * (((double) M_PI) * (b_m * b_m))));
                    	} else {
                    		tmp = (b_m + a_m) * ((b_m - a_m) * (angle * fma((-2.2862368541380886e-7 * (angle * angle)), (((double) M_PI) * (((double) M_PI) * ((double) M_PI))), (0.011111111111111112 * ((double) M_PI)))));
                    	}
                    	return tmp;
                    }
                    
                    b_m = abs(b)
                    a_m = abs(a)
                    function code(a_m, b_m, angle)
                    	tmp = 0.0
                    	if (b_m <= 2.4e-87)
                    		tmp = fma(a_m, fma(0.011111111111111112, Float64(Float64(angle * pi) * 0.0), Float64(-0.011111111111111112 * Float64(a_m * Float64(angle * pi)))), Float64(Float64(angle * 0.011111111111111112) * Float64(pi * Float64(b_m * b_m))));
                    	else
                    		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(angle * fma(Float64(-2.2862368541380886e-7 * Float64(angle * angle)), Float64(pi * Float64(pi * pi)), Float64(0.011111111111111112 * pi)))));
                    	end
                    	return tmp
                    end
                    
                    b_m = N[Abs[b], $MachinePrecision]
                    a_m = N[Abs[a], $MachinePrecision]
                    code[a$95$m_, b$95$m_, angle_] := If[LessEqual[b$95$m, 2.4e-87], N[(a$95$m * N[(0.011111111111111112 * N[(N[(angle * Pi), $MachinePrecision] * 0.0), $MachinePrecision] + N[(-0.011111111111111112 * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(angle * N[(N[(-2.2862368541380886e-7 * N[(angle * angle), $MachinePrecision]), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                    
                    \begin{array}{l}
                    b_m = \left|b\right|
                    \\
                    a_m = \left|a\right|
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;b\_m \leq 2.4 \cdot 10^{-87}:\\
                    \;\;\;\;\mathsf{fma}\left(a\_m, \mathsf{fma}\left(0.011111111111111112, \left(angle \cdot \pi\right) \cdot 0, -0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right), \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if b < 2.4e-87

                      1. Initial program 49.2%

                        \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
                      3. 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)} \]
                      4. Step-by-step derivation
                        1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                        12. lower--.f6451.6

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

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

                        \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) + \color{blue}{a \cdot \left(\frac{-1}{90} \cdot \left(a \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) + \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b + -1 \cdot b\right)\right)\right)\right)} \]
                      7. Step-by-step derivation
                        1. Applied rewrites57.0%

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

                        if 2.4e-87 < b

                        1. Initial program 50.6%

                          \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \color{blue}{\mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right)}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)\right)\right) \]
                          8. unpow2N/A

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

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

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

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

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

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

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

                            \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000} \cdot \left(angle \cdot angle\right), \mathsf{PI}\left(\right) \cdot \left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right), \color{blue}{\frac{1}{90} \cdot \mathsf{PI}\left(\right)}\right)\right)\right) \]
                          16. lower-PI.f6463.7

                            \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \color{blue}{\pi}\right)\right)\right) \]
                        7. Applied rewrites63.7%

                          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification58.9%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.4 \cdot 10^{-87}:\\ \;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(0.011111111111111112, \left(angle \cdot \pi\right) \cdot 0, -0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right), \left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7} \cdot \left(angle \cdot angle\right), \pi \cdot \left(\pi \cdot \pi\right), 0.011111111111111112 \cdot \pi\right)\right)\right)\\ \end{array} \]
                      10. Add Preprocessing

                      Alternative 10: 62.8% accurate, 9.8× speedup?

                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi + \pi \cdot 0\right)\right)\right)\\ \end{array} \end{array} \]
                      b_m = (fabs.f64 b)
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b_m angle)
                       :precision binary64
                       (if (<= (/ angle 180.0) 2e+177)
                         (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* angle PI))))
                         (* (* b_m b_m) (* 0.011111111111111112 (* angle (+ PI (* PI 0.0)))))))
                      b_m = fabs(b);
                      a_m = fabs(a);
                      double code(double a_m, double b_m, double angle) {
                      	double tmp;
                      	if ((angle / 180.0) <= 2e+177) {
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * ((double) M_PI))));
                      	} else {
                      		tmp = (b_m * b_m) * (0.011111111111111112 * (angle * (((double) M_PI) + (((double) M_PI) * 0.0))));
                      	}
                      	return tmp;
                      }
                      
                      b_m = Math.abs(b);
                      a_m = Math.abs(a);
                      public static double code(double a_m, double b_m, double angle) {
                      	double tmp;
                      	if ((angle / 180.0) <= 2e+177) {
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * Math.PI)));
                      	} else {
                      		tmp = (b_m * b_m) * (0.011111111111111112 * (angle * (Math.PI + (Math.PI * 0.0))));
                      	}
                      	return tmp;
                      }
                      
                      b_m = math.fabs(b)
                      a_m = math.fabs(a)
                      def code(a_m, b_m, angle):
                      	tmp = 0
                      	if (angle / 180.0) <= 2e+177:
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * math.pi)))
                      	else:
                      		tmp = (b_m * b_m) * (0.011111111111111112 * (angle * (math.pi + (math.pi * 0.0))))
                      	return tmp
                      
                      b_m = abs(b)
                      a_m = abs(a)
                      function code(a_m, b_m, angle)
                      	tmp = 0.0
                      	if (Float64(angle / 180.0) <= 2e+177)
                      		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(angle * pi))));
                      	else
                      		tmp = Float64(Float64(b_m * b_m) * Float64(0.011111111111111112 * Float64(angle * Float64(pi + Float64(pi * 0.0)))));
                      	end
                      	return tmp
                      end
                      
                      b_m = abs(b);
                      a_m = abs(a);
                      function tmp_2 = code(a_m, b_m, angle)
                      	tmp = 0.0;
                      	if ((angle / 180.0) <= 2e+177)
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * pi)));
                      	else
                      		tmp = (b_m * b_m) * (0.011111111111111112 * (angle * (pi + (pi * 0.0))));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      b_m = N[Abs[b], $MachinePrecision]
                      a_m = N[Abs[a], $MachinePrecision]
                      code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+177], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b$95$m * b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(Pi + N[(Pi * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      b_m = \left|b\right|
                      \\
                      a_m = \left|a\right|
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\
                      \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\left(b\_m \cdot b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\pi + \pi \cdot 0\right)\right)\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (/.f64 angle #s(literal 180 binary64)) < 2e177

                        1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 2e177 < (/.f64 angle #s(literal 180 binary64))

                        1. Initial program 27.4%

                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                        2. Add Preprocessing
                        3. 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)} \]
                        4. Step-by-step derivation
                          1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                          12. lower--.f6431.7

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

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

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

                          \[\leadsto {b}^{2} \cdot \color{blue}{\left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right) + \frac{1}{90} \cdot \frac{angle \cdot \left(\mathsf{PI}\left(\right) \cdot \left(a + -1 \cdot a\right)\right)}{b}\right)} \]
                        8. Applied rewrites38.9%

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

                      Alternative 11: 62.8% accurate, 10.3× speedup?

                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \end{array} \end{array} \]
                      b_m = (fabs.f64 b)
                      a_m = (fabs.f64 a)
                      (FPCore (a_m b_m angle)
                       :precision binary64
                       (if (<= (/ angle 180.0) 2e+177)
                         (* (+ b_m a_m) (* (- b_m a_m) (* 0.011111111111111112 (* angle PI))))
                         (* 0.011111111111111112 (* angle (* PI (* b_m b_m))))))
                      b_m = fabs(b);
                      a_m = fabs(a);
                      double code(double a_m, double b_m, double angle) {
                      	double tmp;
                      	if ((angle / 180.0) <= 2e+177) {
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * ((double) M_PI))));
                      	} else {
                      		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b_m * b_m)));
                      	}
                      	return tmp;
                      }
                      
                      b_m = Math.abs(b);
                      a_m = Math.abs(a);
                      public static double code(double a_m, double b_m, double angle) {
                      	double tmp;
                      	if ((angle / 180.0) <= 2e+177) {
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * Math.PI)));
                      	} else {
                      		tmp = 0.011111111111111112 * (angle * (Math.PI * (b_m * b_m)));
                      	}
                      	return tmp;
                      }
                      
                      b_m = math.fabs(b)
                      a_m = math.fabs(a)
                      def code(a_m, b_m, angle):
                      	tmp = 0
                      	if (angle / 180.0) <= 2e+177:
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * math.pi)))
                      	else:
                      		tmp = 0.011111111111111112 * (angle * (math.pi * (b_m * b_m)))
                      	return tmp
                      
                      b_m = abs(b)
                      a_m = abs(a)
                      function code(a_m, b_m, angle)
                      	tmp = 0.0
                      	if (Float64(angle / 180.0) <= 2e+177)
                      		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * Float64(0.011111111111111112 * Float64(angle * pi))));
                      	else
                      		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b_m * b_m))));
                      	end
                      	return tmp
                      end
                      
                      b_m = abs(b);
                      a_m = abs(a);
                      function tmp_2 = code(a_m, b_m, angle)
                      	tmp = 0.0;
                      	if ((angle / 180.0) <= 2e+177)
                      		tmp = (b_m + a_m) * ((b_m - a_m) * (0.011111111111111112 * (angle * pi)));
                      	else
                      		tmp = 0.011111111111111112 * (angle * (pi * (b_m * b_m)));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      b_m = N[Abs[b], $MachinePrecision]
                      a_m = N[Abs[a], $MachinePrecision]
                      code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+177], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      b_m = \left|b\right|
                      \\
                      a_m = \left|a\right|
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\
                      \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if (/.f64 angle #s(literal 180 binary64)) < 2e177

                        1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 2e177 < (/.f64 angle #s(literal 180 binary64))

                        1. Initial program 27.4%

                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                        2. Add Preprocessing
                        3. 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)} \]
                        4. Step-by-step derivation
                          1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                          12. lower--.f6431.7

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

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

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

                          \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                        8. Step-by-step derivation
                          1. Applied rewrites38.9%

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

                        Alternative 12: 62.8% accurate, 10.3× speedup?

                        \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(\left(b\_m - a\_m\right) \cdot \pi\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\ \end{array} \end{array} \]
                        b_m = (fabs.f64 b)
                        a_m = (fabs.f64 a)
                        (FPCore (a_m b_m angle)
                         :precision binary64
                         (if (<= (/ angle 180.0) 2e+177)
                           (* (+ b_m a_m) (* (* (- b_m a_m) PI) (* angle 0.011111111111111112)))
                           (* 0.011111111111111112 (* angle (* PI (* b_m b_m))))))
                        b_m = fabs(b);
                        a_m = fabs(a);
                        double code(double a_m, double b_m, double angle) {
                        	double tmp;
                        	if ((angle / 180.0) <= 2e+177) {
                        		tmp = (b_m + a_m) * (((b_m - a_m) * ((double) M_PI)) * (angle * 0.011111111111111112));
                        	} else {
                        		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b_m * b_m)));
                        	}
                        	return tmp;
                        }
                        
                        b_m = Math.abs(b);
                        a_m = Math.abs(a);
                        public static double code(double a_m, double b_m, double angle) {
                        	double tmp;
                        	if ((angle / 180.0) <= 2e+177) {
                        		tmp = (b_m + a_m) * (((b_m - a_m) * Math.PI) * (angle * 0.011111111111111112));
                        	} else {
                        		tmp = 0.011111111111111112 * (angle * (Math.PI * (b_m * b_m)));
                        	}
                        	return tmp;
                        }
                        
                        b_m = math.fabs(b)
                        a_m = math.fabs(a)
                        def code(a_m, b_m, angle):
                        	tmp = 0
                        	if (angle / 180.0) <= 2e+177:
                        		tmp = (b_m + a_m) * (((b_m - a_m) * math.pi) * (angle * 0.011111111111111112))
                        	else:
                        		tmp = 0.011111111111111112 * (angle * (math.pi * (b_m * b_m)))
                        	return tmp
                        
                        b_m = abs(b)
                        a_m = abs(a)
                        function code(a_m, b_m, angle)
                        	tmp = 0.0
                        	if (Float64(angle / 180.0) <= 2e+177)
                        		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(Float64(b_m - a_m) * pi) * Float64(angle * 0.011111111111111112)));
                        	else
                        		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b_m * b_m))));
                        	end
                        	return tmp
                        end
                        
                        b_m = abs(b);
                        a_m = abs(a);
                        function tmp_2 = code(a_m, b_m, angle)
                        	tmp = 0.0;
                        	if ((angle / 180.0) <= 2e+177)
                        		tmp = (b_m + a_m) * (((b_m - a_m) * pi) * (angle * 0.011111111111111112));
                        	else
                        		tmp = 0.011111111111111112 * (angle * (pi * (b_m * b_m)));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        b_m = N[Abs[b], $MachinePrecision]
                        a_m = N[Abs[a], $MachinePrecision]
                        code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+177], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(N[(b$95$m - a$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b$95$m * b$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        b_m = \left|b\right|
                        \\
                        a_m = \left|a\right|
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\
                        \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(\left(b\_m - a\_m\right) \cdot \pi\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b\_m \cdot b\_m\right)\right)\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if (/.f64 angle #s(literal 180 binary64)) < 2e177

                          1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if 2e177 < (/.f64 angle #s(literal 180 binary64))

                          1. Initial program 27.4%

                            \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                          2. Add Preprocessing
                          3. 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)} \]
                          4. Step-by-step derivation
                            1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                            12. lower--.f6431.7

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

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

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

                            \[\leadsto \frac{1}{90} \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                          8. Step-by-step derivation
                            1. Applied rewrites38.9%

                              \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
                          9. Recombined 2 regimes into one program.
                          10. Final simplification60.1%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \]
                          11. Add Preprocessing

                          Alternative 13: 38.7% accurate, 11.9× speedup?

                          \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\ \end{array} \end{array} \]
                          b_m = (fabs.f64 b)
                          a_m = (fabs.f64 a)
                          (FPCore (a_m b_m angle)
                           :precision binary64
                           (if (<= (/ angle 180.0) 2e+177)
                             (* a_m (* -0.011111111111111112 (* a_m (* angle PI))))
                             (* (* angle PI) (* 0.011111111111111112 (* a_m a_m)))))
                          b_m = fabs(b);
                          a_m = fabs(a);
                          double code(double a_m, double b_m, double angle) {
                          	double tmp;
                          	if ((angle / 180.0) <= 2e+177) {
                          		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * ((double) M_PI))));
                          	} else {
                          		tmp = (angle * ((double) M_PI)) * (0.011111111111111112 * (a_m * a_m));
                          	}
                          	return tmp;
                          }
                          
                          b_m = Math.abs(b);
                          a_m = Math.abs(a);
                          public static double code(double a_m, double b_m, double angle) {
                          	double tmp;
                          	if ((angle / 180.0) <= 2e+177) {
                          		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * Math.PI)));
                          	} else {
                          		tmp = (angle * Math.PI) * (0.011111111111111112 * (a_m * a_m));
                          	}
                          	return tmp;
                          }
                          
                          b_m = math.fabs(b)
                          a_m = math.fabs(a)
                          def code(a_m, b_m, angle):
                          	tmp = 0
                          	if (angle / 180.0) <= 2e+177:
                          		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * math.pi)))
                          	else:
                          		tmp = (angle * math.pi) * (0.011111111111111112 * (a_m * a_m))
                          	return tmp
                          
                          b_m = abs(b)
                          a_m = abs(a)
                          function code(a_m, b_m, angle)
                          	tmp = 0.0
                          	if (Float64(angle / 180.0) <= 2e+177)
                          		tmp = Float64(a_m * Float64(-0.011111111111111112 * Float64(a_m * Float64(angle * pi))));
                          	else
                          		tmp = Float64(Float64(angle * pi) * Float64(0.011111111111111112 * Float64(a_m * a_m)));
                          	end
                          	return tmp
                          end
                          
                          b_m = abs(b);
                          a_m = abs(a);
                          function tmp_2 = code(a_m, b_m, angle)
                          	tmp = 0.0;
                          	if ((angle / 180.0) <= 2e+177)
                          		tmp = a_m * (-0.011111111111111112 * (a_m * (angle * pi)));
                          	else
                          		tmp = (angle * pi) * (0.011111111111111112 * (a_m * a_m));
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          b_m = N[Abs[b], $MachinePrecision]
                          a_m = N[Abs[a], $MachinePrecision]
                          code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+177], N[(a$95$m * N[(-0.011111111111111112 * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                          
                          \begin{array}{l}
                          b_m = \left|b\right|
                          \\
                          a_m = \left|a\right|
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\
                          \;\;\;\;a\_m \cdot \left(-0.011111111111111112 \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if (/.f64 angle #s(literal 180 binary64)) < 2e177

                            1. Initial program 52.4%

                              \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                            2. Add Preprocessing
                            3. 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)} \]
                            4. Step-by-step derivation
                              1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                              12. lower--.f6452.6

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

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

                              \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                            7. Step-by-step derivation
                              1. Applied rewrites30.3%

                                \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                              2. Step-by-step derivation
                                1. Applied rewrites38.3%

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

                                if 2e177 < (/.f64 angle #s(literal 180 binary64))

                                1. Initial program 27.4%

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

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

                                  \[\leadsto \color{blue}{2 \cdot \left({a}^{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)} \]
                                5. Step-by-step derivation
                                  1. lower-*.f64N/A

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

                                    \[\leadsto 2 \cdot \color{blue}{\left(\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) \cdot {a}^{2}\right)} \]
                                  3. *-rgt-identityN/A

                                    \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left({a}^{2} \cdot 1\right)}\right) \]
                                  4. metadata-evalN/A

                                    \[\leadsto 2 \cdot \left(\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) \cdot \left({a}^{2} \cdot \color{blue}{\left(-1 + 2\right)}\right)\right) \]
                                  5. distribute-rgt-outN/A

                                    \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right)}\right) \]
                                  6. associate-*r*N/A

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

                                    \[\leadsto 2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
                                  8. distribute-rgt-outN/A

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

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

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

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

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

                                  \[\leadsto \frac{1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                8. Step-by-step derivation
                                  1. Applied rewrites29.0%

                                    \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
                                9. Recombined 2 regimes into one program.
                                10. Final simplification37.3%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;a \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]
                                11. Add Preprocessing

                                Alternative 14: 38.6% accurate, 11.9× speedup?

                                \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\ \end{array} \end{array} \]
                                b_m = (fabs.f64 b)
                                a_m = (fabs.f64 a)
                                (FPCore (a_m b_m angle)
                                 :precision binary64
                                 (if (<= (/ angle 180.0) 2e+177)
                                   (* -0.011111111111111112 (* a_m (* a_m (* angle PI))))
                                   (* (* angle PI) (* 0.011111111111111112 (* a_m a_m)))))
                                b_m = fabs(b);
                                a_m = fabs(a);
                                double code(double a_m, double b_m, double angle) {
                                	double tmp;
                                	if ((angle / 180.0) <= 2e+177) {
                                		tmp = -0.011111111111111112 * (a_m * (a_m * (angle * ((double) M_PI))));
                                	} else {
                                		tmp = (angle * ((double) M_PI)) * (0.011111111111111112 * (a_m * a_m));
                                	}
                                	return tmp;
                                }
                                
                                b_m = Math.abs(b);
                                a_m = Math.abs(a);
                                public static double code(double a_m, double b_m, double angle) {
                                	double tmp;
                                	if ((angle / 180.0) <= 2e+177) {
                                		tmp = -0.011111111111111112 * (a_m * (a_m * (angle * Math.PI)));
                                	} else {
                                		tmp = (angle * Math.PI) * (0.011111111111111112 * (a_m * a_m));
                                	}
                                	return tmp;
                                }
                                
                                b_m = math.fabs(b)
                                a_m = math.fabs(a)
                                def code(a_m, b_m, angle):
                                	tmp = 0
                                	if (angle / 180.0) <= 2e+177:
                                		tmp = -0.011111111111111112 * (a_m * (a_m * (angle * math.pi)))
                                	else:
                                		tmp = (angle * math.pi) * (0.011111111111111112 * (a_m * a_m))
                                	return tmp
                                
                                b_m = abs(b)
                                a_m = abs(a)
                                function code(a_m, b_m, angle)
                                	tmp = 0.0
                                	if (Float64(angle / 180.0) <= 2e+177)
                                		tmp = Float64(-0.011111111111111112 * Float64(a_m * Float64(a_m * Float64(angle * pi))));
                                	else
                                		tmp = Float64(Float64(angle * pi) * Float64(0.011111111111111112 * Float64(a_m * a_m)));
                                	end
                                	return tmp
                                end
                                
                                b_m = abs(b);
                                a_m = abs(a);
                                function tmp_2 = code(a_m, b_m, angle)
                                	tmp = 0.0;
                                	if ((angle / 180.0) <= 2e+177)
                                		tmp = -0.011111111111111112 * (a_m * (a_m * (angle * pi)));
                                	else
                                		tmp = (angle * pi) * (0.011111111111111112 * (a_m * a_m));
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                b_m = N[Abs[b], $MachinePrecision]
                                a_m = N[Abs[a], $MachinePrecision]
                                code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+177], N[(-0.011111111111111112 * N[(a$95$m * N[(a$95$m * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                
                                \begin{array}{l}
                                b_m = \left|b\right|
                                \\
                                a_m = \left|a\right|
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\
                                \;\;\;\;-0.011111111111111112 \cdot \left(a\_m \cdot \left(a\_m \cdot \left(angle \cdot \pi\right)\right)\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if (/.f64 angle #s(literal 180 binary64)) < 2e177

                                  1. Initial program 52.4%

                                    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                  2. Add Preprocessing
                                  3. 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)} \]
                                  4. Step-by-step derivation
                                    1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                    12. lower--.f6452.6

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

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

                                    \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites30.3%

                                      \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(\left(a \cdot a\right) \cdot \left(angle \cdot \pi\right)\right)} \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites38.3%

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

                                      if 2e177 < (/.f64 angle #s(literal 180 binary64))

                                      1. Initial program 27.4%

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

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

                                        \[\leadsto \color{blue}{2 \cdot \left({a}^{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)} \]
                                      5. Step-by-step derivation
                                        1. lower-*.f64N/A

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

                                          \[\leadsto 2 \cdot \color{blue}{\left(\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) \cdot {a}^{2}\right)} \]
                                        3. *-rgt-identityN/A

                                          \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left({a}^{2} \cdot 1\right)}\right) \]
                                        4. metadata-evalN/A

                                          \[\leadsto 2 \cdot \left(\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) \cdot \left({a}^{2} \cdot \color{blue}{\left(-1 + 2\right)}\right)\right) \]
                                        5. distribute-rgt-outN/A

                                          \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right)}\right) \]
                                        6. associate-*r*N/A

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

                                          \[\leadsto 2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
                                        8. distribute-rgt-outN/A

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

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

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

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

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

                                        \[\leadsto \frac{1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                      8. Step-by-step derivation
                                        1. Applied rewrites29.0%

                                          \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
                                      9. Recombined 2 regimes into one program.
                                      10. Final simplification37.2%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]
                                      11. Add Preprocessing

                                      Alternative 15: 34.5% accurate, 11.9× speedup?

                                      \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a\_m \cdot a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\ \end{array} \end{array} \]
                                      b_m = (fabs.f64 b)
                                      a_m = (fabs.f64 a)
                                      (FPCore (a_m b_m angle)
                                       :precision binary64
                                       (if (<= (/ angle 180.0) 2e+177)
                                         (* -0.011111111111111112 (* (* angle PI) (* a_m a_m)))
                                         (* (* angle PI) (* 0.011111111111111112 (* a_m a_m)))))
                                      b_m = fabs(b);
                                      a_m = fabs(a);
                                      double code(double a_m, double b_m, double angle) {
                                      	double tmp;
                                      	if ((angle / 180.0) <= 2e+177) {
                                      		tmp = -0.011111111111111112 * ((angle * ((double) M_PI)) * (a_m * a_m));
                                      	} else {
                                      		tmp = (angle * ((double) M_PI)) * (0.011111111111111112 * (a_m * a_m));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      b_m = Math.abs(b);
                                      a_m = Math.abs(a);
                                      public static double code(double a_m, double b_m, double angle) {
                                      	double tmp;
                                      	if ((angle / 180.0) <= 2e+177) {
                                      		tmp = -0.011111111111111112 * ((angle * Math.PI) * (a_m * a_m));
                                      	} else {
                                      		tmp = (angle * Math.PI) * (0.011111111111111112 * (a_m * a_m));
                                      	}
                                      	return tmp;
                                      }
                                      
                                      b_m = math.fabs(b)
                                      a_m = math.fabs(a)
                                      def code(a_m, b_m, angle):
                                      	tmp = 0
                                      	if (angle / 180.0) <= 2e+177:
                                      		tmp = -0.011111111111111112 * ((angle * math.pi) * (a_m * a_m))
                                      	else:
                                      		tmp = (angle * math.pi) * (0.011111111111111112 * (a_m * a_m))
                                      	return tmp
                                      
                                      b_m = abs(b)
                                      a_m = abs(a)
                                      function code(a_m, b_m, angle)
                                      	tmp = 0.0
                                      	if (Float64(angle / 180.0) <= 2e+177)
                                      		tmp = Float64(-0.011111111111111112 * Float64(Float64(angle * pi) * Float64(a_m * a_m)));
                                      	else
                                      		tmp = Float64(Float64(angle * pi) * Float64(0.011111111111111112 * Float64(a_m * a_m)));
                                      	end
                                      	return tmp
                                      end
                                      
                                      b_m = abs(b);
                                      a_m = abs(a);
                                      function tmp_2 = code(a_m, b_m, angle)
                                      	tmp = 0.0;
                                      	if ((angle / 180.0) <= 2e+177)
                                      		tmp = -0.011111111111111112 * ((angle * pi) * (a_m * a_m));
                                      	else
                                      		tmp = (angle * pi) * (0.011111111111111112 * (a_m * a_m));
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      b_m = N[Abs[b], $MachinePrecision]
                                      a_m = N[Abs[a], $MachinePrecision]
                                      code[a$95$m_, b$95$m_, angle_] := If[LessEqual[N[(angle / 180.0), $MachinePrecision], 2e+177], N[(-0.011111111111111112 * N[(N[(angle * Pi), $MachinePrecision] * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * Pi), $MachinePrecision] * N[(0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      b_m = \left|b\right|
                                      \\
                                      a_m = \left|a\right|
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\
                                      \;\;\;\;-0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a\_m \cdot a\_m\right)\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if (/.f64 angle #s(literal 180 binary64)) < 2e177

                                        1. Initial program 52.4%

                                          \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
                                        2. Add Preprocessing
                                        3. 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)} \]
                                        4. Step-by-step derivation
                                          1. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right) \]
                                          12. lower--.f6452.6

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

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

                                          \[\leadsto \frac{-1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites30.3%

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

                                          if 2e177 < (/.f64 angle #s(literal 180 binary64))

                                          1. Initial program 27.4%

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

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

                                            \[\leadsto \color{blue}{2 \cdot \left({a}^{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)} \]
                                          5. Step-by-step derivation
                                            1. lower-*.f64N/A

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

                                              \[\leadsto 2 \cdot \color{blue}{\left(\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) \cdot {a}^{2}\right)} \]
                                            3. *-rgt-identityN/A

                                              \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left({a}^{2} \cdot 1\right)}\right) \]
                                            4. metadata-evalN/A

                                              \[\leadsto 2 \cdot \left(\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) \cdot \left({a}^{2} \cdot \color{blue}{\left(-1 + 2\right)}\right)\right) \]
                                            5. distribute-rgt-outN/A

                                              \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right)}\right) \]
                                            6. associate-*r*N/A

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

                                              \[\leadsto 2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
                                            8. distribute-rgt-outN/A

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

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

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

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

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

                                            \[\leadsto \frac{1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                          8. Step-by-step derivation
                                            1. Applied rewrites29.0%

                                              \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
                                          9. Recombined 2 regimes into one program.
                                          10. Final simplification30.1%

                                            \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+177}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(a \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right)\\ \end{array} \]
                                          11. Add Preprocessing

                                          Alternative 16: 20.1% accurate, 21.6× speedup?

                                          \[\begin{array}{l} b_m = \left|b\right| \\ a_m = \left|a\right| \\ \left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right) \end{array} \]
                                          b_m = (fabs.f64 b)
                                          a_m = (fabs.f64 a)
                                          (FPCore (a_m b_m angle)
                                           :precision binary64
                                           (* (* angle PI) (* 0.011111111111111112 (* a_m a_m))))
                                          b_m = fabs(b);
                                          a_m = fabs(a);
                                          double code(double a_m, double b_m, double angle) {
                                          	return (angle * ((double) M_PI)) * (0.011111111111111112 * (a_m * a_m));
                                          }
                                          
                                          b_m = Math.abs(b);
                                          a_m = Math.abs(a);
                                          public static double code(double a_m, double b_m, double angle) {
                                          	return (angle * Math.PI) * (0.011111111111111112 * (a_m * a_m));
                                          }
                                          
                                          b_m = math.fabs(b)
                                          a_m = math.fabs(a)
                                          def code(a_m, b_m, angle):
                                          	return (angle * math.pi) * (0.011111111111111112 * (a_m * a_m))
                                          
                                          b_m = abs(b)
                                          a_m = abs(a)
                                          function code(a_m, b_m, angle)
                                          	return Float64(Float64(angle * pi) * Float64(0.011111111111111112 * Float64(a_m * a_m)))
                                          end
                                          
                                          b_m = abs(b);
                                          a_m = abs(a);
                                          function tmp = code(a_m, b_m, angle)
                                          	tmp = (angle * pi) * (0.011111111111111112 * (a_m * a_m));
                                          end
                                          
                                          b_m = N[Abs[b], $MachinePrecision]
                                          a_m = N[Abs[a], $MachinePrecision]
                                          code[a$95$m_, b$95$m_, angle_] := N[(N[(angle * Pi), $MachinePrecision] * N[(0.011111111111111112 * N[(a$95$m * a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                          
                                          \begin{array}{l}
                                          b_m = \left|b\right|
                                          \\
                                          a_m = \left|a\right|
                                          
                                          \\
                                          \left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a\_m \cdot a\_m\right)\right)
                                          \end{array}
                                          
                                          Derivation
                                          1. Initial program 49.6%

                                            \[\left(\left(2 \cdot \left({b}^{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. Add Preprocessing
                                          3. Applied rewrites6.1%

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

                                            \[\leadsto \color{blue}{2 \cdot \left({a}^{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)} \]
                                          5. Step-by-step derivation
                                            1. lower-*.f64N/A

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

                                              \[\leadsto 2 \cdot \color{blue}{\left(\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) \cdot {a}^{2}\right)} \]
                                            3. *-rgt-identityN/A

                                              \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left({a}^{2} \cdot 1\right)}\right) \]
                                            4. metadata-evalN/A

                                              \[\leadsto 2 \cdot \left(\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) \cdot \left({a}^{2} \cdot \color{blue}{\left(-1 + 2\right)}\right)\right) \]
                                            5. distribute-rgt-outN/A

                                              \[\leadsto 2 \cdot \left(\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) \cdot \color{blue}{\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right)}\right) \]
                                            6. associate-*r*N/A

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

                                              \[\leadsto 2 \cdot \left(\cos \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \color{blue}{\left(\left(-1 \cdot {a}^{2} + 2 \cdot {a}^{2}\right) \cdot \sin \left(\frac{1}{180} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)}\right) \]
                                            8. distribute-rgt-outN/A

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

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

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

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

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

                                            \[\leadsto \frac{1}{90} \cdot \color{blue}{\left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
                                          8. Step-by-step derivation
                                            1. Applied rewrites19.4%

                                              \[\leadsto \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right) \cdot \color{blue}{\left(angle \cdot \pi\right)} \]
                                            2. Final simplification19.4%

                                              \[\leadsto \left(angle \cdot \pi\right) \cdot \left(0.011111111111111112 \cdot \left(a \cdot a\right)\right) \]
                                            3. Add Preprocessing

                                            Reproduce

                                            ?
                                            herbie shell --seed 2024234 
                                            (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)))))