ab-angle->ABCF B

Percentage Accurate: 53.7% → 65.9%
Time: 17.0s
Alternatives: 22
Speedup: 8.5×

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 22 alternatives:

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

Initial Program: 53.7% 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: 65.9% accurate, 1.4× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\\ t_1 := \mathsf{fma}\left(angle\_m, \frac{180}{angle\_m}, -180\right)\\ t_2 := \frac{32400 \cdot \left(\pi \cdot \pi\right)}{t\_1 \cdot \left(-\pi\right)}\\ t_3 := \frac{180}{angle\_m \cdot 0.005555555555555556}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+25}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+133}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(angle\_m \cdot \pi\right)\right)}{angle\_m \cdot angle\_m}, \frac{1}{\pi \cdot t\_1}, t\_2\right)}{t\_3}\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+226}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{\frac{180}{angle\_m}}{\pi}, \frac{\left(angle\_m \cdot \pi\right) \cdot \frac{angle\_m \cdot \pi}{angle\_m \cdot 0.005555555555555556}}{t\_1}, t\_2\right)}{t\_3}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(t\_0 \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (sin (* (* angle_m PI) 0.011111111111111112)))
        (t_1 (fma angle_m (/ 180.0 angle_m) -180.0))
        (t_2 (/ (* 32400.0 (* PI PI)) (* t_1 (- PI))))
        (t_3 (/ 180.0 (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 2e+25)
      (* (+ b a) (* (- b a) t_0))
      (if (<= (/ angle_m 180.0) 1e+133)
        (*
         (+ b a)
         (*
          (- b a)
          (sin
           (/
            (fma
             (/
              (* 32400.0 (* (* angle_m PI) (* angle_m PI)))
              (* angle_m angle_m))
             (/ 1.0 (* PI t_1))
             t_2)
            t_3))))
        (if (<= (/ angle_m 180.0) 5e+226)
          (*
           (+ b a)
           (*
            (- b a)
            (sin
             (/
              (fma
               (/ (/ 180.0 angle_m) PI)
               (/
                (*
                 (* angle_m PI)
                 (/ (* angle_m PI) (* angle_m 0.005555555555555556)))
                t_1)
               t_2)
              t_3))))
          (* (* a a) (* t_0 (fma b (/ b (* a a)) -1.0)))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = sin(((angle_m * ((double) M_PI)) * 0.011111111111111112));
	double t_1 = fma(angle_m, (180.0 / angle_m), -180.0);
	double t_2 = (32400.0 * (((double) M_PI) * ((double) M_PI))) / (t_1 * -((double) M_PI));
	double t_3 = 180.0 / (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 2e+25) {
		tmp = (b + a) * ((b - a) * t_0);
	} else if ((angle_m / 180.0) <= 1e+133) {
		tmp = (b + a) * ((b - a) * sin((fma(((32400.0 * ((angle_m * ((double) M_PI)) * (angle_m * ((double) M_PI)))) / (angle_m * angle_m)), (1.0 / (((double) M_PI) * t_1)), t_2) / t_3)));
	} else if ((angle_m / 180.0) <= 5e+226) {
		tmp = (b + a) * ((b - a) * sin((fma(((180.0 / angle_m) / ((double) M_PI)), (((angle_m * ((double) M_PI)) * ((angle_m * ((double) M_PI)) / (angle_m * 0.005555555555555556))) / t_1), t_2) / t_3)));
	} else {
		tmp = (a * a) * (t_0 * fma(b, (b / (a * a)), -1.0));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = sin(Float64(Float64(angle_m * pi) * 0.011111111111111112))
	t_1 = fma(angle_m, Float64(180.0 / angle_m), -180.0)
	t_2 = Float64(Float64(32400.0 * Float64(pi * pi)) / Float64(t_1 * Float64(-pi)))
	t_3 = Float64(180.0 / Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 2e+25)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * t_0));
	elseif (Float64(angle_m / 180.0) <= 1e+133)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(fma(Float64(Float64(32400.0 * Float64(Float64(angle_m * pi) * Float64(angle_m * pi))) / Float64(angle_m * angle_m)), Float64(1.0 / Float64(pi * t_1)), t_2) / t_3))));
	elseif (Float64(angle_m / 180.0) <= 5e+226)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(fma(Float64(Float64(180.0 / angle_m) / pi), Float64(Float64(Float64(angle_m * pi) * Float64(Float64(angle_m * pi) / Float64(angle_m * 0.005555555555555556))) / t_1), t_2) / t_3))));
	else
		tmp = Float64(Float64(a * a) * Float64(t_0 * fma(b, Float64(b / Float64(a * a)), -1.0)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(angle$95$m * N[(180.0 / angle$95$m), $MachinePrecision] + -180.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(32400.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * (-Pi)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(180.0 / N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+25], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+133], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(N[(N[(32400.0 * N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(Pi * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+226], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(N[(N[(180.0 / angle$95$m), $MachinePrecision] / Pi), $MachinePrecision] * N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] / N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(t$95$0 * N[(b * N[(b / N[(a * a), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\\
t_1 := \mathsf{fma}\left(angle\_m, \frac{180}{angle\_m}, -180\right)\\
t_2 := \frac{32400 \cdot \left(\pi \cdot \pi\right)}{t\_1 \cdot \left(-\pi\right)}\\
t_3 := \frac{180}{angle\_m \cdot 0.005555555555555556}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+25}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+133}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(angle\_m \cdot \pi\right)\right)}{angle\_m \cdot angle\_m}, \frac{1}{\pi \cdot t\_1}, t\_2\right)}{t\_3}\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+226}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{\frac{180}{angle\_m}}{\pi}, \frac{\left(angle\_m \cdot \pi\right) \cdot \frac{angle\_m \cdot \pi}{angle\_m \cdot 0.005555555555555556}}{t\_1}, t\_2\right)}{t\_3}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \left(t\_0 \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000018e25

    1. Initial program 56.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr75.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)} \]

    if 2.00000000000000018e25 < (/.f64 angle #s(literal 180 binary64)) < 1e133

    1. Initial program 30.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr31.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. *-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) \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180} + \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) \]
      10. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{180 \cdot \frac{180}{angle}}}\right)\right) \]
      22. /-lowering-/.f6431.5

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \color{blue}{\frac{180}{angle}}}\right)\right) \]
    6. Applied egg-rr31.5%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \frac{180}{angle}}\right)}\right) \]
    7. Step-by-step derivation
      1. clear-numN/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{180}{\frac{angle}{180}}}}\right)\right) \]
      4. div-invN/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{\color{blue}{angle \cdot \frac{1}{180}}}}\right)\right) \]
      6. metadata-eval36.8

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\frac{180}{angle \cdot \color{blue}{0.005555555555555556}}}\right)\right) \]
    8. Applied egg-rr36.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\color{blue}{\frac{180}{angle \cdot 0.005555555555555556}}}\right)\right) \]
    9. Step-by-step derivation
      1. flip-+N/A

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\color{blue}{\mathsf{fma}\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right), \frac{1}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}, \mathsf{neg}\left(\frac{\left(180 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(180 \cdot \mathsf{PI}\left(\right)\right)}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}\right)\right)}}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
    10. Applied egg-rr54.5%

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

    if 1e133 < (/.f64 angle #s(literal 180 binary64)) < 5.0000000000000005e226

    1. Initial program 29.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. Step-by-step derivation
      1. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr33.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. *-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) \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180} + \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) \]
      10. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{180 \cdot \frac{180}{angle}}}\right)\right) \]
      22. /-lowering-/.f6439.2

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \color{blue}{\frac{180}{angle}}}\right)\right) \]
    6. Applied egg-rr39.2%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \frac{180}{angle}}\right)}\right) \]
    7. Step-by-step derivation
      1. clear-numN/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{180}{\frac{angle}{180}}}}\right)\right) \]
      4. div-invN/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{\color{blue}{angle \cdot \frac{1}{180}}}}\right)\right) \]
      6. metadata-eval40.4

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\frac{180}{angle \cdot \color{blue}{0.005555555555555556}}}\right)\right) \]
    8. Applied egg-rr40.4%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\color{blue}{\frac{180}{angle \cdot 0.005555555555555556}}}\right)\right) \]
    9. Step-by-step derivation
      1. flip-+N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\color{blue}{\frac{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right)}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)} + \left(\mathsf{neg}\left(\frac{\left(180 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(180 \cdot \mathsf{PI}\left(\right)\right)}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}\right)\right)}}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
    10. Applied egg-rr51.3%

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

    if 5.0000000000000005e226 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 10.3%

      \[\left(\left(2 \cdot \left({b}^{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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

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

      \[\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 a around inf

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

      \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification72.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+25}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+133}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)\right)}{angle \cdot angle}, \frac{1}{\pi \cdot \mathsf{fma}\left(angle, \frac{180}{angle}, -180\right)}, \frac{32400 \cdot \left(\pi \cdot \pi\right)}{\mathsf{fma}\left(angle, \frac{180}{angle}, -180\right) \cdot \left(-\pi\right)}\right)}{\frac{180}{angle \cdot 0.005555555555555556}}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+226}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{\frac{180}{angle}}{\pi}, \frac{\left(angle \cdot \pi\right) \cdot \frac{angle \cdot \pi}{angle \cdot 0.005555555555555556}}{\mathsf{fma}\left(angle, \frac{180}{angle}, -180\right)}, \frac{32400 \cdot \left(\pi \cdot \pi\right)}{\mathsf{fma}\left(angle, \frac{180}{angle}, -180\right) \cdot \left(-\pi\right)}\right)}{\frac{180}{angle \cdot 0.005555555555555556}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 65.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \left(\pi \cdot \pi\right)\\
t_1 := {b}^{2} - {a}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;a \cdot \left(angle\_m \cdot \left(a \cdot \mathsf{fma}\left(angle\_m \cdot \left(angle\_m \cdot t\_0\right), 2.2862368541380886 \cdot 10^{-7}, \pi \cdot -0.011111111111111112\right)\right)\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-269}:\\
\;\;\;\;\sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(a \cdot \left(-a\right)\right)\\

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


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

    1. Initial program 44.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr68.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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) \]
      13. *-lowering-*.f6448.6

        \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-\color{blue}{a \cdot a}\right) \]
    7. Simplified48.6%

      \[\leadsto \color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-a \cdot a\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-neg-inN/A

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

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

        \[\leadsto \left(\sin \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
      4. add-cbrt-cubeN/A

        \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
      5. add-sqr-sqrtN/A

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

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

        \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
      8. unpow1/3N/A

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

        \[\leadsto \left(\sin \left(\color{blue}{\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
    9. Applied egg-rr66.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(angle \cdot \left(\color{blue}{\left(a \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) \cdot \frac{1}{4374000}} + \frac{-1}{90} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a \]
    12. Simplified72.5%

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.99999999999999979e-269

    1. Initial program 63.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr65.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 \color{blue}{-1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) \]
      13. *-lowering-*.f6464.9

        \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-\color{blue}{a \cdot a}\right) \]
    7. Simplified64.9%

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

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

    1. Initial program 46.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr69.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 \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)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \left(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 \left(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. accelerator-lowering-fma.f64N/A

        \[\leadsto \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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 \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} \cdot \left(b - a\right), \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \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} \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 \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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. --lowering--.f64N/A

        \[\leadsto \left(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 \left(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 \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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. PI-lowering-PI.f64N/A

        \[\leadsto \left(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 \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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. PI-lowering-PI.f64N/A

        \[\leadsto \left(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. PI-lowering-PI.f64N/A

        \[\leadsto \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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) \]
    7. Simplified70.1%

      \[\leadsto \left(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 simplification69.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -\infty:\\ \;\;\;\;a \cdot \left(angle \cdot \left(a \cdot \mathsf{fma}\left(angle \cdot \left(angle \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right)\right), 2.2862368541380886 \cdot 10^{-7}, \pi \cdot -0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq 5 \cdot 10^{-269}:\\ \;\;\;\;\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(a \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \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 3: 56.8% accurate, 0.9× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \frac{angle\_m}{180} \cdot \pi\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -\infty:\\ \;\;\;\;\left(a \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(a \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* (/ angle_m 180.0) PI)))
   (*
    angle_s
    (if (<=
         (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0))
         (- INFINITY))
      (* (* a (* angle_m PI)) (* a -0.011111111111111112))
      (* (* (* angle_m PI) 0.011111111111111112) (* (+ b a) (- b a)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = (angle_m / 180.0) * ((double) M_PI);
	double tmp;
	if ((((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0)) <= -((double) INFINITY)) {
		tmp = (a * (angle_m * ((double) M_PI))) * (a * -0.011111111111111112);
	} else {
		tmp = ((angle_m * ((double) M_PI)) * 0.011111111111111112) * ((b + a) * (b - a));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = (angle_m / 180.0) * Math.PI;
	double tmp;
	if ((((2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))) * Math.sin(t_0)) * Math.cos(t_0)) <= -Double.POSITIVE_INFINITY) {
		tmp = (a * (angle_m * Math.PI)) * (a * -0.011111111111111112);
	} else {
		tmp = ((angle_m * Math.PI) * 0.011111111111111112) * ((b + a) * (b - a));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = (angle_m / 180.0) * math.pi
	tmp = 0
	if (((2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))) * math.sin(t_0)) * math.cos(t_0)) <= -math.inf:
		tmp = (a * (angle_m * math.pi)) * (a * -0.011111111111111112)
	else:
		tmp = ((angle_m * math.pi) * 0.011111111111111112) * ((b + a) * (b - a))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(Float64(angle_m / 180.0) * pi)
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= Float64(-Inf))
		tmp = Float64(Float64(a * Float64(angle_m * pi)) * Float64(a * -0.011111111111111112));
	else
		tmp = Float64(Float64(Float64(angle_m * pi) * 0.011111111111111112) * Float64(Float64(b + a) * Float64(b - a)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	t_0 = (angle_m / 180.0) * pi;
	tmp = 0.0;
	if ((((2.0 * ((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0)) <= -Inf)
		tmp = (a * (angle_m * pi)) * (a * -0.011111111111111112);
	else
		tmp = ((angle_m * pi) * 0.011111111111111112) * ((b + a) * (b - a));
	end
	tmp_2 = angle_s * tmp;
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[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], (-Infinity)], N[(N[(a * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision] * N[(a * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \frac{angle\_m}{180} \cdot \pi\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0 \leq -\infty:\\
\;\;\;\;\left(a \cdot \left(angle\_m \cdot \pi\right)\right) \cdot \left(a \cdot -0.011111111111111112\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) < -inf.0

    1. Initial program 54.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6443.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. Simplified43.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. Taylor expanded in b around 0

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

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

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

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

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

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

        \[\leadsto \frac{-1}{90} \cdot \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
      7. PI-lowering-PI.f6425.7

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{90} \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \]
      7. PI-lowering-PI.f6432.0

        \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\color{blue}{\pi} \cdot angle\right)\right)\right) \]
    10. Applied egg-rr32.0%

      \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)} \]
    11. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

        \[\leadsto \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)} \]
      8. *-lowering-*.f6432.0

        \[\leadsto \left(a \cdot \left(\pi \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)} \]
    12. Applied egg-rr32.0%

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

    if -inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64)))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64))))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle #s(literal 180 binary64)))))

    1. Initial program 50.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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6452.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. Simplified52.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.2%

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

Alternative 4: 66.0% accurate, 1.4× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\\ t_1 := \mathsf{fma}\left(angle\_m, \frac{180}{angle\_m}, -180\right)\\ t_2 := \frac{32400 \cdot \left(\pi \cdot \pi\right)}{t\_1 \cdot \left(-\pi\right)}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+25}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+133}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(angle\_m \cdot \pi\right)\right)}{angle\_m \cdot angle\_m}, \frac{1}{\pi \cdot t\_1}, t\_2\right)}{\frac{180}{angle\_m \cdot 0.005555555555555556}}\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+226}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{\frac{180}{angle\_m}}{\pi}, \frac{\left(angle\_m \cdot \pi\right) \cdot \frac{angle\_m \cdot \pi}{angle\_m \cdot 0.005555555555555556}}{t\_1}, t\_2\right)}{180 \cdot \frac{180}{angle\_m}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(t\_0 \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (sin (* (* angle_m PI) 0.011111111111111112)))
        (t_1 (fma angle_m (/ 180.0 angle_m) -180.0))
        (t_2 (/ (* 32400.0 (* PI PI)) (* t_1 (- PI)))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 2e+25)
      (* (+ b a) (* (- b a) t_0))
      (if (<= (/ angle_m 180.0) 1e+133)
        (*
         (+ b a)
         (*
          (- b a)
          (sin
           (/
            (fma
             (/
              (* 32400.0 (* (* angle_m PI) (* angle_m PI)))
              (* angle_m angle_m))
             (/ 1.0 (* PI t_1))
             t_2)
            (/ 180.0 (* angle_m 0.005555555555555556))))))
        (if (<= (/ angle_m 180.0) 5e+226)
          (*
           (+ b a)
           (*
            (- b a)
            (sin
             (/
              (fma
               (/ (/ 180.0 angle_m) PI)
               (/
                (*
                 (* angle_m PI)
                 (/ (* angle_m PI) (* angle_m 0.005555555555555556)))
                t_1)
               t_2)
              (* 180.0 (/ 180.0 angle_m))))))
          (* (* a a) (* t_0 (fma b (/ b (* a a)) -1.0)))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = sin(((angle_m * ((double) M_PI)) * 0.011111111111111112));
	double t_1 = fma(angle_m, (180.0 / angle_m), -180.0);
	double t_2 = (32400.0 * (((double) M_PI) * ((double) M_PI))) / (t_1 * -((double) M_PI));
	double tmp;
	if ((angle_m / 180.0) <= 2e+25) {
		tmp = (b + a) * ((b - a) * t_0);
	} else if ((angle_m / 180.0) <= 1e+133) {
		tmp = (b + a) * ((b - a) * sin((fma(((32400.0 * ((angle_m * ((double) M_PI)) * (angle_m * ((double) M_PI)))) / (angle_m * angle_m)), (1.0 / (((double) M_PI) * t_1)), t_2) / (180.0 / (angle_m * 0.005555555555555556)))));
	} else if ((angle_m / 180.0) <= 5e+226) {
		tmp = (b + a) * ((b - a) * sin((fma(((180.0 / angle_m) / ((double) M_PI)), (((angle_m * ((double) M_PI)) * ((angle_m * ((double) M_PI)) / (angle_m * 0.005555555555555556))) / t_1), t_2) / (180.0 * (180.0 / angle_m)))));
	} else {
		tmp = (a * a) * (t_0 * fma(b, (b / (a * a)), -1.0));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = sin(Float64(Float64(angle_m * pi) * 0.011111111111111112))
	t_1 = fma(angle_m, Float64(180.0 / angle_m), -180.0)
	t_2 = Float64(Float64(32400.0 * Float64(pi * pi)) / Float64(t_1 * Float64(-pi)))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 2e+25)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * t_0));
	elseif (Float64(angle_m / 180.0) <= 1e+133)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(fma(Float64(Float64(32400.0 * Float64(Float64(angle_m * pi) * Float64(angle_m * pi))) / Float64(angle_m * angle_m)), Float64(1.0 / Float64(pi * t_1)), t_2) / Float64(180.0 / Float64(angle_m * 0.005555555555555556))))));
	elseif (Float64(angle_m / 180.0) <= 5e+226)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(fma(Float64(Float64(180.0 / angle_m) / pi), Float64(Float64(Float64(angle_m * pi) * Float64(Float64(angle_m * pi) / Float64(angle_m * 0.005555555555555556))) / t_1), t_2) / Float64(180.0 * Float64(180.0 / angle_m))))));
	else
		tmp = Float64(Float64(a * a) * Float64(t_0 * fma(b, Float64(b / Float64(a * a)), -1.0)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(angle$95$m * N[(180.0 / angle$95$m), $MachinePrecision] + -180.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(32400.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 * (-Pi)), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+25], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+133], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(N[(N[(32400.0 * N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(Pi * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(180.0 / N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+226], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(N[(N[(180.0 / angle$95$m), $MachinePrecision] / Pi), $MachinePrecision] * N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(N[(angle$95$m * Pi), $MachinePrecision] / N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision] / N[(180.0 * N[(180.0 / angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(t$95$0 * N[(b * N[(b / N[(a * a), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\\
t_1 := \mathsf{fma}\left(angle\_m, \frac{180}{angle\_m}, -180\right)\\
t_2 := \frac{32400 \cdot \left(\pi \cdot \pi\right)}{t\_1 \cdot \left(-\pi\right)}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+25}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+133}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(angle\_m \cdot \pi\right)\right)}{angle\_m \cdot angle\_m}, \frac{1}{\pi \cdot t\_1}, t\_2\right)}{\frac{180}{angle\_m \cdot 0.005555555555555556}}\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+226}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{\frac{180}{angle\_m}}{\pi}, \frac{\left(angle\_m \cdot \pi\right) \cdot \frac{angle\_m \cdot \pi}{angle\_m \cdot 0.005555555555555556}}{t\_1}, t\_2\right)}{180 \cdot \frac{180}{angle\_m}}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(a \cdot a\right) \cdot \left(t\_0 \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000018e25

    1. Initial program 56.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr75.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)} \]

    if 2.00000000000000018e25 < (/.f64 angle #s(literal 180 binary64)) < 1e133

    1. Initial program 30.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr31.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. *-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) \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180} + \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) \]
      10. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{180 \cdot \frac{180}{angle}}}\right)\right) \]
      22. /-lowering-/.f6431.5

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \color{blue}{\frac{180}{angle}}}\right)\right) \]
    6. Applied egg-rr31.5%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \frac{180}{angle}}\right)}\right) \]
    7. Step-by-step derivation
      1. clear-numN/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{180}{\frac{angle}{180}}}}\right)\right) \]
      4. div-invN/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{\color{blue}{angle \cdot \frac{1}{180}}}}\right)\right) \]
      6. metadata-eval36.8

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\frac{180}{angle \cdot \color{blue}{0.005555555555555556}}}\right)\right) \]
    8. Applied egg-rr36.8%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\color{blue}{\frac{180}{angle \cdot 0.005555555555555556}}}\right)\right) \]
    9. Step-by-step derivation
      1. flip-+N/A

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\color{blue}{\mathsf{fma}\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right), \frac{1}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}, \mathsf{neg}\left(\frac{\left(180 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(180 \cdot \mathsf{PI}\left(\right)\right)}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}\right)\right)}}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
    10. Applied egg-rr54.5%

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

    if 1e133 < (/.f64 angle #s(literal 180 binary64)) < 5.0000000000000005e226

    1. Initial program 29.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. Step-by-step derivation
      1. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr33.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. *-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) \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180} + \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) \]
      10. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{180 \cdot \frac{180}{angle}}}\right)\right) \]
      22. /-lowering-/.f6439.2

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \color{blue}{\frac{180}{angle}}}\right)\right) \]
    6. Applied egg-rr39.2%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \frac{180}{angle}}\right)}\right) \]
    7. Step-by-step derivation
      1. flip-+N/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\color{blue}{\frac{\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right)}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)} - \frac{\left(180 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(180 \cdot \mathsf{PI}\left(\right)\right)}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}}}{180 \cdot \frac{180}{angle}}\right)\right) \]
      3. sub-negN/A

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

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

    if 5.0000000000000005e226 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 10.3%

      \[\left(\left(2 \cdot \left({b}^{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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

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

      \[\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 a around inf

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

      \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification72.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+25}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+133}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)\right)}{angle \cdot angle}, \frac{1}{\pi \cdot \mathsf{fma}\left(angle, \frac{180}{angle}, -180\right)}, \frac{32400 \cdot \left(\pi \cdot \pi\right)}{\mathsf{fma}\left(angle, \frac{180}{angle}, -180\right) \cdot \left(-\pi\right)}\right)}{\frac{180}{angle \cdot 0.005555555555555556}}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+226}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{\frac{180}{angle}}{\pi}, \frac{\left(angle \cdot \pi\right) \cdot \frac{angle \cdot \pi}{angle \cdot 0.005555555555555556}}{\mathsf{fma}\left(angle, \frac{180}{angle}, -180\right)}, \frac{32400 \cdot \left(\pi \cdot \pi\right)}{\mathsf{fma}\left(angle, \frac{180}{angle}, -180\right) \cdot \left(-\pi\right)}\right)}{180 \cdot \frac{180}{angle}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \mathsf{fma}\left(b, \frac{b}{a \cdot a}, -1\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 67.2% accurate, 1.5× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{fma}\left(angle\_m, \frac{180}{angle\_m}, -180\right)\\ t_1 := \frac{180}{angle\_m \cdot 0.005555555555555556}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+25}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+133}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(angle\_m \cdot \pi\right)\right)}{angle\_m \cdot angle\_m}, \frac{1}{\pi \cdot t\_0}, \frac{32400 \cdot \left(\pi \cdot \pi\right)}{t\_0 \cdot \left(-\pi\right)}\right)}{t\_1}\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+160}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \sqrt{\pi}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - \frac{b \cdot a}{b}\right) \cdot \sin \left(\frac{\mathsf{fma}\left(angle\_m \cdot \pi, \frac{180}{angle\_m}, 180 \cdot \pi\right)}{t\_1}\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (fma angle_m (/ 180.0 angle_m) -180.0))
        (t_1 (/ 180.0 (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 2e+25)
      (* (+ b a) (* (- b a) (sin (* (* angle_m PI) 0.011111111111111112))))
      (if (<= (/ angle_m 180.0) 2e+133)
        (*
         (+ b a)
         (*
          (- b a)
          (sin
           (/
            (fma
             (/
              (* 32400.0 (* (* angle_m PI) (* angle_m PI)))
              (* angle_m angle_m))
             (/ 1.0 (* PI t_0))
             (/ (* 32400.0 (* PI PI)) (* t_0 (- PI))))
            t_1))))
        (if (<= (/ angle_m 180.0) 1e+160)
          (*
           (+ b a)
           (*
            (- b a)
            (sin
             (* (sqrt PI) (* (* angle_m 0.011111111111111112) (sqrt PI))))))
          (*
           (+ b a)
           (*
            (- b (/ (* b a) b))
            (sin
             (/
              (fma (* angle_m PI) (/ 180.0 angle_m) (* 180.0 PI))
              t_1))))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = fma(angle_m, (180.0 / angle_m), -180.0);
	double t_1 = 180.0 / (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 2e+25) {
		tmp = (b + a) * ((b - a) * sin(((angle_m * ((double) M_PI)) * 0.011111111111111112)));
	} else if ((angle_m / 180.0) <= 2e+133) {
		tmp = (b + a) * ((b - a) * sin((fma(((32400.0 * ((angle_m * ((double) M_PI)) * (angle_m * ((double) M_PI)))) / (angle_m * angle_m)), (1.0 / (((double) M_PI) * t_0)), ((32400.0 * (((double) M_PI) * ((double) M_PI))) / (t_0 * -((double) M_PI)))) / t_1)));
	} else if ((angle_m / 180.0) <= 1e+160) {
		tmp = (b + a) * ((b - a) * sin((sqrt(((double) M_PI)) * ((angle_m * 0.011111111111111112) * sqrt(((double) M_PI))))));
	} else {
		tmp = (b + a) * ((b - ((b * a) / b)) * sin((fma((angle_m * ((double) M_PI)), (180.0 / angle_m), (180.0 * ((double) M_PI))) / t_1)));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = fma(angle_m, Float64(180.0 / angle_m), -180.0)
	t_1 = Float64(180.0 / Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 2e+25)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(Float64(angle_m * pi) * 0.011111111111111112))));
	elseif (Float64(angle_m / 180.0) <= 2e+133)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(fma(Float64(Float64(32400.0 * Float64(Float64(angle_m * pi) * Float64(angle_m * pi))) / Float64(angle_m * angle_m)), Float64(1.0 / Float64(pi * t_0)), Float64(Float64(32400.0 * Float64(pi * pi)) / Float64(t_0 * Float64(-pi)))) / t_1))));
	elseif (Float64(angle_m / 180.0) <= 1e+160)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(sqrt(pi) * Float64(Float64(angle_m * 0.011111111111111112) * sqrt(pi))))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - Float64(Float64(b * a) / b)) * sin(Float64(fma(Float64(angle_m * pi), Float64(180.0 / angle_m), Float64(180.0 * pi)) / t_1))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(angle$95$m * N[(180.0 / angle$95$m), $MachinePrecision] + -180.0), $MachinePrecision]}, Block[{t$95$1 = N[(180.0 / N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+25], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+133], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[(N[(N[(32400.0 * N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(angle$95$m * angle$95$m), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[(32400.0 * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision] / N[(t$95$0 * (-Pi)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+160], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(N[Sqrt[Pi], $MachinePrecision] * N[(N[(angle$95$m * 0.011111111111111112), $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - N[(N[(b * a), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(180.0 / angle$95$m), $MachinePrecision] + N[(180.0 * Pi), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(angle\_m, \frac{180}{angle\_m}, -180\right)\\
t_1 := \frac{180}{angle\_m \cdot 0.005555555555555556}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+25}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+133}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(angle\_m \cdot \pi\right)\right)}{angle\_m \cdot angle\_m}, \frac{1}{\pi \cdot t\_0}, \frac{32400 \cdot \left(\pi \cdot \pi\right)}{t\_0 \cdot \left(-\pi\right)}\right)}{t\_1}\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+160}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle\_m \cdot 0.011111111111111112\right) \cdot \sqrt{\pi}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - \frac{b \cdot a}{b}\right) \cdot \sin \left(\frac{\mathsf{fma}\left(angle\_m \cdot \pi, \frac{180}{angle\_m}, 180 \cdot \pi\right)}{t\_1}\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000018e25

    1. Initial program 56.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr75.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)} \]

    if 2.00000000000000018e25 < (/.f64 angle #s(literal 180 binary64)) < 2e133

    1. Initial program 29.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr29.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. Step-by-step derivation
      1. *-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) \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180} + \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) \]
      10. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{180 \cdot \frac{180}{angle}}}\right)\right) \]
      22. /-lowering-/.f6430.0

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \color{blue}{\frac{180}{angle}}}\right)\right) \]
    6. Applied egg-rr30.0%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \frac{180}{angle}}\right)}\right) \]
    7. Step-by-step derivation
      1. clear-numN/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{180}{\frac{angle}{180}}}}\right)\right) \]
      4. div-invN/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{\color{blue}{angle \cdot \frac{1}{180}}}}\right)\right) \]
      6. metadata-eval35.0

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\frac{180}{angle \cdot \color{blue}{0.005555555555555556}}}\right)\right) \]
    8. Applied egg-rr35.0%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\color{blue}{\frac{180}{angle \cdot 0.005555555555555556}}}\right)\right) \]
    9. Step-by-step derivation
      1. flip-+N/A

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\color{blue}{\mathsf{fma}\left(\left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right) \cdot \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle}\right), \frac{1}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}, \mathsf{neg}\left(\frac{\left(180 \cdot \mathsf{PI}\left(\right)\right) \cdot \left(180 \cdot \mathsf{PI}\left(\right)\right)}{\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{180}{angle} - 180 \cdot \mathsf{PI}\left(\right)}\right)\right)}}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
    10. Applied egg-rr56.8%

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

    if 2e133 < (/.f64 angle #s(literal 180 binary64)) < 1.00000000000000001e160

    1. Initial program 44.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr40.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. *-commutativeN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right) \]
      2. *-commutativeN/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) \]
      3. 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 angle\right) \cdot \mathsf{PI}\left(\right)\right)}\right) \]
      4. add-sqr-sqrtN/A

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(\left(angle \cdot \frac{1}{90}\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right) \cdot \color{blue}{\sqrt{\mathsf{PI}\left(\right)}}\right)\right) \]
      13. PI-lowering-PI.f6460.1

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

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

    if 1.00000000000000001e160 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 19.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
    4. Applied egg-rr43.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. Step-by-step derivation
      1. *-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) \]
      2. metadata-evalN/A

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{angle \cdot \mathsf{PI}\left(\right)}{180} + \color{blue}{\mathsf{PI}\left(\right) \cdot \frac{angle}{180}}\right)\right) \]
      10. clear-numN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{180 \cdot \frac{180}{angle}}}\right)\right) \]
      22. /-lowering-/.f6445.1

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \color{blue}{\frac{180}{angle}}}\right)\right) \]
    6. Applied egg-rr45.1%

      \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{180 \cdot \frac{180}{angle}}\right)}\right) \]
    7. Step-by-step derivation
      1. clear-numN/A

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\color{blue}{\frac{180}{\frac{angle}{180}}}}\right)\right) \]
      4. div-invN/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{\color{blue}{angle \cdot \frac{1}{180}}}}\right)\right) \]
      6. metadata-eval46.1

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\frac{180}{angle \cdot \color{blue}{0.005555555555555556}}}\right)\right) \]
    8. Applied egg-rr46.1%

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

      \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\left(b \cdot \left(1 + -1 \cdot \frac{a}{b}\right)\right)} \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
    10. Step-by-step derivation
      1. distribute-rgt-inN/A

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(\color{blue}{b} + \left(-1 \cdot \frac{a}{b}\right) \cdot b\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b + \color{blue}{\left(\mathsf{neg}\left(\frac{a}{b}\right)\right)} \cdot b\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \left(b + a\right) \cdot \left(\left(b + \color{blue}{\left(\mathsf{neg}\left(\frac{a}{b} \cdot b\right)\right)}\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
      5. unsub-negN/A

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

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

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

        \[\leadsto \left(b + a\right) \cdot \left(\left(b - \color{blue}{\frac{a \cdot b}{b}}\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\mathsf{PI}\left(\right) \cdot angle, \frac{180}{angle}, 180 \cdot \mathsf{PI}\left(\right)\right)}{\frac{180}{angle \cdot \frac{1}{180}}}\right)\right) \]
      9. *-lowering-*.f6446.1

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

      \[\leadsto \left(b + a\right) \cdot \left(\color{blue}{\left(b - \frac{a \cdot b}{b}\right)} \cdot \sin \left(\frac{\mathsf{fma}\left(\pi \cdot angle, \frac{180}{angle}, 180 \cdot \pi\right)}{\frac{180}{angle \cdot 0.005555555555555556}}\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification71.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+25}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+133}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\frac{\mathsf{fma}\left(\frac{32400 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)\right)}{angle \cdot angle}, \frac{1}{\pi \cdot \mathsf{fma}\left(angle, \frac{180}{angle}, -180\right)}, \frac{32400 \cdot \left(\pi \cdot \pi\right)}{\mathsf{fma}\left(angle, \frac{180}{angle}, -180\right) \cdot \left(-\pi\right)}\right)}{\frac{180}{angle \cdot 0.005555555555555556}}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+160}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\sqrt{\pi} \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \sqrt{\pi}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - \frac{b \cdot a}{b}\right) \cdot \sin \left(\frac{\mathsf{fma}\left(angle \cdot \pi, \frac{180}{angle}, 180 \cdot \pi\right)}{\frac{180}{angle \cdot 0.005555555555555556}}\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 57.2% accurate, 1.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(b \cdot \left(b - a\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))) < -4.00000000000000007e-221

    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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6447.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. Simplified47.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 0

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

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

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

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

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

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

        \[\leadsto \frac{-1}{90} \cdot \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
      7. PI-lowering-PI.f6447.3

        \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \color{blue}{\pi}\right) \]
    8. Simplified47.3%

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

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

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

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

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

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

        \[\leadsto \frac{-1}{90} \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \]
      7. PI-lowering-PI.f6457.5

        \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\color{blue}{\pi} \cdot angle\right)\right)\right) \]
    10. Applied egg-rr57.5%

      \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)} \]
    11. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

        \[\leadsto \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)} \]
      8. *-lowering-*.f6457.6

        \[\leadsto \left(a \cdot \left(\pi \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)} \]
    12. Applied egg-rr57.6%

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

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

    1. Initial program 51.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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6453.5

        \[\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. Simplified53.5%

      \[\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 \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\color{blue}{b} \cdot \left(b - a\right)\right) \]
    7. Step-by-step derivation
      1. Simplified53.2%

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

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

    Alternative 7: 56.6% accurate, 1.9× speedup?

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

      1. Initial program 49.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6448.2

          \[\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. Simplified48.2%

        \[\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 \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
        7. PI-lowering-PI.f6447.6

          \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \color{blue}{\pi}\right) \]
      8. Simplified47.6%

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

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \]
        7. PI-lowering-PI.f6458.1

          \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\color{blue}{\pi} \cdot angle\right)\right)\right) \]
      10. Applied egg-rr58.1%

        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      11. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

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

          \[\leadsto \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)} \]
        8. *-lowering-*.f6458.2

          \[\leadsto \left(a \cdot \left(\pi \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)} \]
      12. Applied egg-rr58.2%

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

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

      1. Initial program 51.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6453.2

          \[\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. Simplified53.2%

        \[\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 \color{blue}{{b}^{2} \cdot \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)} \]
      7. Simplified51.9%

        \[\leadsto \color{blue}{\left(b \cdot b\right) \cdot \mathsf{fma}\left(0.011111111111111112, angle \cdot \pi, 0\right)} \]
    3. Recombined 2 regimes into one program.
    4. Final simplification54.3%

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

    Alternative 8: 56.6% accurate, 2.0× speedup?

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

      1. Initial program 49.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6448.2

          \[\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. Simplified48.2%

        \[\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 \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
        7. PI-lowering-PI.f6447.6

          \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \color{blue}{\pi}\right) \]
      8. Simplified47.6%

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

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \]
        7. PI-lowering-PI.f6458.1

          \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\color{blue}{\pi} \cdot angle\right)\right)\right) \]
      10. Applied egg-rr58.1%

        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      11. Step-by-step derivation
        1. associate-*r*N/A

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

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

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

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

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

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

          \[\leadsto \left(a \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot \frac{-1}{90}\right)} \]
        8. *-lowering-*.f6458.2

          \[\leadsto \left(a \cdot \left(\pi \cdot angle\right)\right) \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)} \]
      12. Applied egg-rr58.2%

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

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

      1. Initial program 51.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6453.2

          \[\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. Simplified53.2%

        \[\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 \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
        7. *-lowering-*.f6451.9

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      8. Simplified51.9%

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

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

    Alternative 9: 56.6% accurate, 2.0× speedup?

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

      1. Initial program 49.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6448.2

          \[\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. Simplified48.2%

        \[\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 \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
        7. PI-lowering-PI.f6447.6

          \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \color{blue}{\pi}\right) \]
      8. Simplified47.6%

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

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \]
        7. PI-lowering-PI.f6458.1

          \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\color{blue}{\pi} \cdot angle\right)\right)\right) \]
      10. Applied egg-rr58.1%

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

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

      1. Initial program 51.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6453.2

          \[\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. Simplified53.2%

        \[\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 \color{blue}{\frac{1}{90} \cdot \left(angle \cdot \left({b}^{2} \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{1}{90} \cdot \left(angle \cdot \left(\mathsf{PI}\left(\right) \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
        7. *-lowering-*.f6451.9

          \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
      8. Simplified51.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -4 \cdot 10^{-173}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(a \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} \]
    5. Add Preprocessing

    Alternative 10: 63.3% accurate, 3.1× speedup?

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

      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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr71.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 \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)} \]
      6. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \left(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 \left(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. accelerator-lowering-fma.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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 \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} \cdot \left(b - a\right), \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \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} \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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. --lowering--.f64N/A

          \[\leadsto \left(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 \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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) \]
      7. Simplified69.2%

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

      if 9.9999999999999993e158 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 19.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. *-lowering-*.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)} \]
        5. 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) \]
        6. 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) \]
        7. 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) \]
        8. *-lowering-*.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) \]
        9. +-lowering-+.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) \]
        10. --lowering--.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) \]
        11. 2-sinN/A

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

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

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

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

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

          \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\left(\mathsf{PI}\left(\right) \cdot angle\right) \cdot \frac{1}{180} + \color{blue}{\frac{\mathsf{PI}\left(\right) \cdot angle}{180}}\right) \]
        17. div-invN/A

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

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

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

    Alternative 11: 67.3% accurate, 3.4× speedup?

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

      1. Initial program 50.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr68.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)} \]

      if 2.6e236 < a

      1. Initial program 50.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. Step-by-step derivation
        1. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr58.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. *-lowering-*.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. accelerator-lowering-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}, {angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

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

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        7. unpow2N/A

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

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        12. PI-lowering-PI.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        13. PI-lowering-PI.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)}\right)\right)\right) \]
        15. PI-lowering-PI.f6475.1

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

        \[\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}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification69.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.6 \cdot 10^{+236}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\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}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 12: 67.4% accurate, 3.4× speedup?

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

      1. Initial program 50.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr68.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. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot angle\right)\right)}\right) \]
        2. 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) \]
        3. *-lowering-*.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) \]
        4. *-lowering-*.f64N/A

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(0.011111111111111112 \cdot \color{blue}{\pi}\right) \cdot angle\right)\right) \]
      6. Applied egg-rr68.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 2.3e236 < a

      1. Initial program 50.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. Step-by-step derivation
        1. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr58.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. *-lowering-*.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. accelerator-lowering-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}, {angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

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

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        7. unpow2N/A

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

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        12. PI-lowering-PI.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        13. PI-lowering-PI.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)}\right)\right)\right) \]
        15. PI-lowering-PI.f6475.1

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

        \[\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}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
    3. Recombined 2 regimes into one program.
    4. Final simplification68.8%

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.3 \cdot 10^{+236}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\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}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \]
    5. Add Preprocessing

    Alternative 13: 52.3% accurate, 3.5× speedup?

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

      1. Initial program 52.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

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

        \[\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 \color{blue}{-1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) \]
        13. *-lowering-*.f6442.2

          \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-\color{blue}{a \cdot a}\right) \]
      7. Simplified42.2%

        \[\leadsto \color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-a \cdot a\right)} \]
      8. Step-by-step derivation
        1. distribute-lft-neg-inN/A

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

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

          \[\leadsto \left(\sin \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        4. add-cbrt-cubeN/A

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        5. add-sqr-sqrtN/A

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

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

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        8. unpow1/3N/A

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

          \[\leadsto \left(\sin \left(\color{blue}{\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
      9. Applied egg-rr46.8%

        \[\leadsto \color{blue}{\left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(-a\right)\right) \cdot a} \]
      10. Step-by-step derivation
        1. associate-*r*N/A

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

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

          \[\leadsto \left(\sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        4. PI-lowering-PI.f6447.0

          \[\leadsto \left(\sin \left(\left(\color{blue}{\pi} \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left(-a\right)\right) \cdot a \]
      11. Applied egg-rr47.0%

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

      if 4.9000000000000003e-104 < b

      1. Initial program 46.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

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

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

          \[\leadsto \left(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 \left(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. accelerator-lowering-fma.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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 \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} \cdot \left(b - a\right), \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \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} \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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. --lowering--.f64N/A

          \[\leadsto \left(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 \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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) \]
      7. Simplified66.1%

        \[\leadsto \left(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 2 regimes into one program.
    4. Final simplification53.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 4.9 \cdot 10^{-104}:\\ \;\;\;\;a \cdot \left(\sin \left(\left(angle \cdot \pi\right) \cdot 0.011111111111111112\right) \cdot \left(-a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \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 14: 52.3% accurate, 3.5× speedup?

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

      1. Initial program 52.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

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

        \[\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 \color{blue}{-1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) \]
        13. *-lowering-*.f6442.2

          \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-\color{blue}{a \cdot a}\right) \]
      7. Simplified42.2%

        \[\leadsto \color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-a \cdot a\right)} \]
      8. Step-by-step derivation
        1. distribute-lft-neg-inN/A

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

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

          \[\leadsto \left(\sin \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        4. add-cbrt-cubeN/A

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        5. add-sqr-sqrtN/A

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

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

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        8. unpow1/3N/A

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

          \[\leadsto \left(\sin \left(\color{blue}{\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
      9. Applied egg-rr46.8%

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

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

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

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

          \[\leadsto \left(\sin \left(\color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{90}\right)} \cdot angle\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        5. PI-lowering-PI.f6447.1

          \[\leadsto \left(\sin \left(\left(\color{blue}{\pi} \cdot 0.011111111111111112\right) \cdot angle\right) \cdot \left(-a\right)\right) \cdot a \]
      11. Applied egg-rr47.1%

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

      if 2.90000000000000003e-105 < b

      1. Initial program 46.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

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

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

          \[\leadsto \left(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 \left(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. accelerator-lowering-fma.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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 \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} \cdot \left(b - a\right), \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \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} \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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. --lowering--.f64N/A

          \[\leadsto \left(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 \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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) \]
      7. Simplified66.1%

        \[\leadsto \left(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 2 regimes into one program.
    4. Final simplification53.4%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 2.9 \cdot 10^{-105}:\\ \;\;\;\;a \cdot \left(\left(-a\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \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 15: 52.3% accurate, 3.5× speedup?

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

      1. Initial program 52.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

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

        \[\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 \color{blue}{-1 \cdot \left({a}^{2} \cdot \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)\right)} \]
      6. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) \]
        13. *-lowering-*.f6442.2

          \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-\color{blue}{a \cdot a}\right) \]
      7. Simplified42.2%

        \[\leadsto \color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-a \cdot a\right)} \]
      8. Step-by-step derivation
        1. distribute-lft-neg-inN/A

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

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

          \[\leadsto \left(\sin \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        4. add-cbrt-cubeN/A

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        5. add-sqr-sqrtN/A

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

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

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        8. unpow1/3N/A

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

          \[\leadsto \left(\sin \left(\color{blue}{\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
      9. Applied egg-rr46.8%

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

      if 9.99999999999999958e-104 < b

      1. Initial program 46.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

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

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

          \[\leadsto \left(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 \left(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. accelerator-lowering-fma.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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 \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} \cdot \left(b - a\right), \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \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} \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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. --lowering--.f64N/A

          \[\leadsto \left(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 \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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 \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. PI-lowering-PI.f64N/A

          \[\leadsto \left(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. *-lowering-*.f64N/A

          \[\leadsto \left(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) \]
      7. Simplified66.1%

        \[\leadsto \left(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 2 regimes into one program.
    4. Final simplification53.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 10^{-103}:\\ \;\;\;\;a \cdot \left(\left(-a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \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 16: 61.5% accurate, 5.6× speedup?

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

      1. Initial program 55.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr73.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 \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. *-lowering-*.f64N/A

          \[\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)} \]
        2. *-lowering-*.f64N/A

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

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

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

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

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

      if 3.99999999999999993e73 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000017e218

      1. Initial program 32.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr35.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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) \]
        13. *-lowering-*.f6422.9

          \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-\color{blue}{a \cdot a}\right) \]
      7. Simplified22.9%

        \[\leadsto \color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-a \cdot a\right)} \]
      8. Step-by-step derivation
        1. distribute-lft-neg-inN/A

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

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

          \[\leadsto \left(\sin \color{blue}{\left(\left(angle \cdot \mathsf{PI}\left(\right)\right) \cdot \frac{1}{90}\right)} \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        4. add-cbrt-cubeN/A

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \mathsf{PI}\left(\right)}}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        5. add-sqr-sqrtN/A

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

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

          \[\leadsto \left(\sin \left(\left(angle \cdot \color{blue}{\left(\sqrt[3]{\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right)}\right) \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
        8. unpow1/3N/A

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

          \[\leadsto \left(\sin \left(\color{blue}{\left(\left({\left(\left(\mathsf{PI}\left(\right) \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\mathsf{PI}\left(\right)}\right)}^{\frac{1}{3}} \cdot \sqrt[3]{\sqrt{\mathsf{PI}\left(\right)}}\right) \cdot angle\right)} \cdot \frac{1}{90}\right) \cdot \left(\mathsf{neg}\left(a\right)\right)\right) \cdot a \]
      9. Applied egg-rr25.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(angle \cdot \left(\color{blue}{\left(a \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) \cdot \frac{1}{4374000}} + \frac{-1}{90} \cdot \left(a \cdot \mathsf{PI}\left(\right)\right)\right)\right) \cdot a \]
      12. Simplified29.6%

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

      if 2.00000000000000017e218 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 17.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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6442.3

          \[\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. Simplified42.3%

        \[\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 \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
        2. neg-lowering-neg.f6450.9

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

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

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

    Alternative 17: 61.7% accurate, 5.6× speedup?

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

      1. Initial program 55.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr73.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 \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. *-lowering-*.f64N/A

          \[\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)} \]
        2. *-lowering-*.f64N/A

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

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

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

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

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

      if 3.99999999999999993e73 < (/.f64 angle #s(literal 180 binary64)) < 9.99999999999999907e214

      1. Initial program 32.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr35.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 b around 0

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \sin \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{a \cdot a}\right)\right) \]
        13. *-lowering-*.f6422.9

          \[\leadsto \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(-\color{blue}{a \cdot a}\right) \]
      7. Simplified22.9%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto angle \cdot \left(\color{blue}{\left({a}^{2} \cdot \left({angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}\right)\right) \cdot \frac{1}{4374000}} + \frac{-1}{90} \cdot \left({a}^{2} \cdot \mathsf{PI}\left(\right)\right)\right) \]
      10. Simplified35.5%

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

      if 9.99999999999999907e214 < (/.f64 angle #s(literal 180 binary64))

      1. Initial program 17.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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6442.3

          \[\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. Simplified42.3%

        \[\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 \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
      7. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
        2. neg-lowering-neg.f6450.9

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

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

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

    Alternative 18: 61.4% accurate, 7.4× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(\left(angle\_m \cdot angle\_m\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \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)\right) \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (*
      angle_s
      (*
       (+ b a)
       (*
        angle_m
        (fma
         (* (* angle_m angle_m) -2.2862368541380886e-7)
         (* (- b a) (* PI (* PI PI)))
         (* 0.011111111111111112 (* (- b a) PI)))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	return angle_s * ((b + a) * (angle_m * fma(((angle_m * angle_m) * -2.2862368541380886e-7), ((b - a) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (0.011111111111111112 * ((b - a) * ((double) M_PI))))));
    }
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	return Float64(angle_s * Float64(Float64(b + a) * Float64(angle_m * fma(Float64(Float64(angle_m * angle_m) * -2.2862368541380886e-7), Float64(Float64(b - a) * Float64(pi * Float64(pi * pi))), Float64(0.011111111111111112 * Float64(Float64(b - a) * pi))))))
    end
    
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(angle$95$m * N[(N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * -2.2862368541380886e-7), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.011111111111111112 * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    angle\_s \cdot \left(\left(b + a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(\left(angle\_m \cdot angle\_m\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \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)\right)
    \end{array}
    
    Derivation
    1. Initial program 50.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. 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)} \]
      2. *-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) \]
      3. 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)} \]
      4. 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) \]
      5. 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) \]
      6. 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) \]
      7. 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)} \]
      8. *-lowering-*.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)} \]
      9. +-lowering-+.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) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
      11. --lowering--.f64N/A

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

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

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

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

        \[\leadsto \left(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 \left(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. accelerator-lowering-fma.f64N/A

        \[\leadsto \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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 \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} \cdot \left(b - a\right), \frac{1}{90} \cdot \left(\mathsf{PI}\left(\right) \cdot \left(b - a\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \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} \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 \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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. --lowering--.f64N/A

        \[\leadsto \left(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 \left(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 \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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. PI-lowering-PI.f64N/A

        \[\leadsto \left(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 \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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. PI-lowering-PI.f64N/A

        \[\leadsto \left(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. PI-lowering-PI.f64N/A

        \[\leadsto \left(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. *-lowering-*.f64N/A

        \[\leadsto \left(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) \]
    7. Simplified66.0%

      \[\leadsto \left(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)} \]
    8. Final simplification66.0%

      \[\leadsto \left(b + a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\left(angle \cdot angle\right) \cdot -2.2862368541380886 \cdot 10^{-7}, \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) \]
    9. Add Preprocessing

    Alternative 19: 62.9% accurate, 7.5× speedup?

    \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+128}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+218}:\\ \;\;\;\;t\_0 \cdot \left(b \cdot \left(b + a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(a \cdot \left(\left(-a\right) - b\right)\right)\\ \end{array} \end{array} \end{array} \]
    angle\_m = (fabs.f64 angle)
    angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
    (FPCore (angle_s a b angle_m)
     :precision binary64
     (let* ((t_0 (* (* angle_m PI) 0.011111111111111112)))
       (*
        angle_s
        (if (<= (/ angle_m 180.0) 2e+128)
          (* (+ b a) (* 0.011111111111111112 (* angle_m (* (- b a) PI))))
          (if (<= (/ angle_m 180.0) 2e+218)
            (* t_0 (* b (+ b a)))
            (* t_0 (* a (- (- a) b))))))))
    angle\_m = fabs(angle);
    angle\_s = copysign(1.0, angle);
    double code(double angle_s, double a, double b, double angle_m) {
    	double t_0 = (angle_m * ((double) M_PI)) * 0.011111111111111112;
    	double tmp;
    	if ((angle_m / 180.0) <= 2e+128) {
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * ((b - a) * ((double) M_PI))));
    	} else if ((angle_m / 180.0) <= 2e+218) {
    		tmp = t_0 * (b * (b + a));
    	} else {
    		tmp = t_0 * (a * (-a - b));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = Math.abs(angle);
    angle\_s = Math.copySign(1.0, angle);
    public static double code(double angle_s, double a, double b, double angle_m) {
    	double t_0 = (angle_m * Math.PI) * 0.011111111111111112;
    	double tmp;
    	if ((angle_m / 180.0) <= 2e+128) {
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * ((b - a) * Math.PI)));
    	} else if ((angle_m / 180.0) <= 2e+218) {
    		tmp = t_0 * (b * (b + a));
    	} else {
    		tmp = t_0 * (a * (-a - b));
    	}
    	return angle_s * tmp;
    }
    
    angle\_m = math.fabs(angle)
    angle\_s = math.copysign(1.0, angle)
    def code(angle_s, a, b, angle_m):
    	t_0 = (angle_m * math.pi) * 0.011111111111111112
    	tmp = 0
    	if (angle_m / 180.0) <= 2e+128:
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * ((b - a) * math.pi)))
    	elif (angle_m / 180.0) <= 2e+218:
    		tmp = t_0 * (b * (b + a))
    	else:
    		tmp = t_0 * (a * (-a - b))
    	return angle_s * tmp
    
    angle\_m = abs(angle)
    angle\_s = copysign(1.0, angle)
    function code(angle_s, a, b, angle_m)
    	t_0 = Float64(Float64(angle_m * pi) * 0.011111111111111112)
    	tmp = 0.0
    	if (Float64(angle_m / 180.0) <= 2e+128)
    		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(angle_m * Float64(Float64(b - a) * pi))));
    	elseif (Float64(angle_m / 180.0) <= 2e+218)
    		tmp = Float64(t_0 * Float64(b * Float64(b + a)));
    	else
    		tmp = Float64(t_0 * Float64(a * Float64(Float64(-a) - b)));
    	end
    	return Float64(angle_s * tmp)
    end
    
    angle\_m = abs(angle);
    angle\_s = sign(angle) * abs(1.0);
    function tmp_2 = code(angle_s, a, b, angle_m)
    	t_0 = (angle_m * pi) * 0.011111111111111112;
    	tmp = 0.0;
    	if ((angle_m / 180.0) <= 2e+128)
    		tmp = (b + a) * (0.011111111111111112 * (angle_m * ((b - a) * pi)));
    	elseif ((angle_m / 180.0) <= 2e+218)
    		tmp = t_0 * (b * (b + a));
    	else
    		tmp = t_0 * (a * (-a - b));
    	end
    	tmp_2 = angle_s * tmp;
    end
    
    angle\_m = N[Abs[angle], $MachinePrecision]
    angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(N[(angle$95$m * Pi), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+128], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+218], N[(t$95$0 * N[(b * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(a * N[((-a) - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
    
    \begin{array}{l}
    angle\_m = \left|angle\right|
    \\
    angle\_s = \mathsf{copysign}\left(1, angle\right)
    
    \\
    \begin{array}{l}
    t_0 := \left(angle\_m \cdot \pi\right) \cdot 0.011111111111111112\\
    angle\_s \cdot \begin{array}{l}
    \mathbf{if}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+128}:\\
    \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\
    
    \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+218}:\\
    \;\;\;\;t\_0 \cdot \left(b \cdot \left(b + a\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0 \cdot \left(a \cdot \left(\left(-a\right) - b\right)\right)\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 angle #s(literal 180 binary64)) < 2.0000000000000002e128

      1. Initial program 55.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \frac{angle}{180} + \mathsf{PI}\left(\right) \cdot \frac{angle}{180}\right)}\right) \]
      4. Applied egg-rr72.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 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. *-lowering-*.f64N/A

          \[\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)} \]
        2. *-lowering-*.f64N/A

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

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

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

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

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

      if 2.0000000000000002e128 < (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000017e218

      1. Initial program 24.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6416.3

          \[\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. Simplified16.3%

        \[\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 \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{b}\right) \]
      7. Step-by-step derivation
        1. Simplified21.3%

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

        if 2.00000000000000017e218 < (/.f64 angle #s(literal 180 binary64))

        1. Initial program 17.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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6442.3

            \[\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. Simplified42.3%

          \[\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 \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(-1 \cdot a\right)}\right) \]
        7. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \left(\frac{1}{90} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)}\right) \]
          2. neg-lowering-neg.f6450.9

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

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

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

      Alternative 20: 61.6% accurate, 8.5× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (*
        angle_s
        (*
         (+ b a)
         (*
          (- b a)
          (*
           angle_m
           (fma
            -2.2862368541380886e-7
            (* (* angle_m angle_m) (* PI (* PI PI)))
            (* PI 0.011111111111111112)))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * ((b + a) * ((b - a) * (angle_m * fma(-2.2862368541380886e-7, ((angle_m * angle_m) * (((double) M_PI) * (((double) M_PI) * ((double) M_PI)))), (((double) M_PI) * 0.011111111111111112)))));
      }
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(b - a) * Float64(angle_m * fma(-2.2862368541380886e-7, Float64(Float64(angle_m * angle_m) * Float64(pi * Float64(pi * pi))), Float64(pi * 0.011111111111111112))))))
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(angle$95$m * N[(-2.2862368541380886e-7 * N[(N[(angle$95$m * angle$95$m), $MachinePrecision] * N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \mathsf{fma}\left(-2.2862368541380886 \cdot 10^{-7}, \left(angle\_m \cdot angle\_m\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), \pi \cdot 0.011111111111111112\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 50.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. 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)} \]
        2. *-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) \]
        3. 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)} \]
        4. 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) \]
        5. 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) \]
        6. 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) \]
        7. 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)} \]
        8. *-lowering-*.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)} \]
        9. +-lowering-+.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) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \color{blue}{\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)} \]
        11. --lowering--.f64N/A

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

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

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

        \[\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. *-lowering-*.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. accelerator-lowering-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}, {angle}^{2} \cdot {\mathsf{PI}\left(\right)}^{3}, \frac{1}{90} \cdot \mathsf{PI}\left(\right)\right)}\right)\right) \]
        3. *-lowering-*.f64N/A

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

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        7. unpow2N/A

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

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

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

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        12. PI-lowering-PI.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        13. PI-lowering-PI.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle \cdot \mathsf{fma}\left(\frac{-1}{4374000}, \left(angle \cdot angle\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 \mathsf{PI}\left(\right)}\right)\right)\right) \]
        15. PI-lowering-PI.f6466.0

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

        \[\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}, \left(angle \cdot angle\right) \cdot \left(\pi \cdot \left(\pi \cdot \pi\right)\right), 0.011111111111111112 \cdot \pi\right)\right)}\right) \]
      8. Final simplification66.0%

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

      Alternative 21: 37.5% accurate, 21.6× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot \left(angle\_m \cdot a\right)\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (* angle_s (* -0.011111111111111112 (* a (* PI (* angle_m a))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * (-0.011111111111111112 * (a * (((double) M_PI) * (angle_m * a))));
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * (-0.011111111111111112 * (a * (Math.PI * (angle_m * a))));
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	return angle_s * (-0.011111111111111112 * (a * (math.pi * (angle_m * a))))
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(-0.011111111111111112 * Float64(a * Float64(pi * Float64(angle_m * a)))))
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b, angle_m)
      	tmp = angle_s * (-0.011111111111111112 * (a * (pi * (angle_m * a))));
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(-0.011111111111111112 * N[(a * N[(Pi * N[(angle$95$m * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(\pi \cdot \left(angle\_m \cdot a\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 50.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6451.3

          \[\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. Simplified51.3%

        \[\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 \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
        7. PI-lowering-PI.f6434.2

          \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \color{blue}{\pi}\right) \]
      8. Simplified34.2%

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(a \cdot \left(\color{blue}{\left(a \cdot angle\right)} \cdot \mathsf{PI}\left(\right)\right)\right) \]
        6. PI-lowering-PI.f6438.0

          \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(\left(a \cdot angle\right) \cdot \color{blue}{\pi}\right)\right) \]
      10. Applied egg-rr38.0%

        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(\left(a \cdot angle\right) \cdot \pi\right)\right)} \]
      11. Final simplification38.0%

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

      Alternative 22: 37.5% accurate, 21.6× speedup?

      \[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right) \end{array} \]
      angle\_m = (fabs.f64 angle)
      angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
      (FPCore (angle_s a b angle_m)
       :precision binary64
       (* angle_s (* -0.011111111111111112 (* a (* a (* angle_m PI))))))
      angle\_m = fabs(angle);
      angle\_s = copysign(1.0, angle);
      double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * (-0.011111111111111112 * (a * (a * (angle_m * ((double) M_PI)))));
      }
      
      angle\_m = Math.abs(angle);
      angle\_s = Math.copySign(1.0, angle);
      public static double code(double angle_s, double a, double b, double angle_m) {
      	return angle_s * (-0.011111111111111112 * (a * (a * (angle_m * Math.PI))));
      }
      
      angle\_m = math.fabs(angle)
      angle\_s = math.copysign(1.0, angle)
      def code(angle_s, a, b, angle_m):
      	return angle_s * (-0.011111111111111112 * (a * (a * (angle_m * math.pi))))
      
      angle\_m = abs(angle)
      angle\_s = copysign(1.0, angle)
      function code(angle_s, a, b, angle_m)
      	return Float64(angle_s * Float64(-0.011111111111111112 * Float64(a * Float64(a * Float64(angle_m * pi)))))
      end
      
      angle\_m = abs(angle);
      angle\_s = sign(angle) * abs(1.0);
      function tmp = code(angle_s, a, b, angle_m)
      	tmp = angle_s * (-0.011111111111111112 * (a * (a * (angle_m * pi))));
      end
      
      angle\_m = N[Abs[angle], $MachinePrecision]
      angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(-0.011111111111111112 * N[(a * N[(a * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      angle\_m = \left|angle\right|
      \\
      angle\_s = \mathsf{copysign}\left(1, angle\right)
      
      \\
      angle\_s \cdot \left(-0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)
      \end{array}
      
      Derivation
      1. Initial program 50.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. 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. *-lowering-*.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. *-lowering-*.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. *-lowering-*.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. PI-lowering-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. *-lowering-*.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. +-lowering-+.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. --lowering--.f6451.3

          \[\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. Simplified51.3%

        \[\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 \color{blue}{\frac{-1}{90} \cdot \left({a}^{2} \cdot \left(angle \cdot \mathsf{PI}\left(\right)\right)\right)} \]
      7. Step-by-step derivation
        1. *-lowering-*.f64N/A

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(\left(\color{blue}{\left(a \cdot a\right)} \cdot angle\right) \cdot \mathsf{PI}\left(\right)\right) \]
        7. PI-lowering-PI.f6434.2

          \[\leadsto -0.011111111111111112 \cdot \left(\left(\left(a \cdot a\right) \cdot angle\right) \cdot \color{blue}{\pi}\right) \]
      8. Simplified34.2%

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

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

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

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

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

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

          \[\leadsto \frac{-1}{90} \cdot \left(a \cdot \left(a \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot angle\right)}\right)\right) \]
        7. PI-lowering-PI.f6438.0

          \[\leadsto -0.011111111111111112 \cdot \left(a \cdot \left(a \cdot \left(\color{blue}{\pi} \cdot angle\right)\right)\right) \]
      10. Applied egg-rr38.0%

        \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(a \cdot \left(\pi \cdot angle\right)\right)\right)} \]
      11. Final simplification38.0%

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

      Reproduce

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