ab-angle->ABCF B

Percentage Accurate: 54.1% → 65.4%
Time: 20.1s
Alternatives: 22
Speedup: 23.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 65.4% accurate, 0.3× 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(angle\_m \cdot 0.005555555555555556\right)\\ t_1 := {b}^{2} - {a}^{2}\\ t_2 := \sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right)\\ t_3 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\\ t_4 := t\_2 \cdot 0\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+293}:\\ \;\;\;\;t\_3 \cdot \left(2 \cdot \left(a \cdot \mathsf{fma}\left(a, t\_2, t\_4\right) - {b}^{2} \cdot t\_2\right)\right)\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\cos \left({e}^{\log t\_0}\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, t\_4 - b \cdot t\_2, {a}^{2} \cdot t\_2\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_3 \cdot \left(2 \cdot \left(\sin \left(angle\_m \cdot {\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\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 (* angle_m 0.005555555555555556)))
        (t_1 (- (pow b 2.0) (pow a 2.0)))
        (t_2 (sin (* PI (* angle_m -0.005555555555555556))))
        (t_3 (cos (expm1 (log1p t_0))))
        (t_4 (* t_2 0.0)))
   (*
    angle_s
    (if (<= t_1 -1e+293)
      (* t_3 (* 2.0 (- (* a (fma a t_2 t_4)) (* (pow b 2.0) t_2))))
      (if (<= t_1 INFINITY)
        (*
         (cos (pow E (log t_0)))
         (* 2.0 (fma b (- t_4 (* b t_2)) (* (pow a 2.0) t_2))))
        (*
         t_3
         (*
          2.0
          (*
           (sin (* angle_m (pow (cbrt (* PI -0.005555555555555556)) 3.0)))
           (* (- a 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 t_0 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double t_1 = pow(b, 2.0) - pow(a, 2.0);
	double t_2 = sin((((double) M_PI) * (angle_m * -0.005555555555555556)));
	double t_3 = cos(expm1(log1p(t_0)));
	double t_4 = t_2 * 0.0;
	double tmp;
	if (t_1 <= -1e+293) {
		tmp = t_3 * (2.0 * ((a * fma(a, t_2, t_4)) - (pow(b, 2.0) * t_2)));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = cos(pow(((double) M_E), log(t_0))) * (2.0 * fma(b, (t_4 - (b * t_2)), (pow(a, 2.0) * t_2)));
	} else {
		tmp = t_3 * (2.0 * (sin((angle_m * pow(cbrt((((double) M_PI) * -0.005555555555555556)), 3.0))) * ((a - 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)
	t_0 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	t_1 = Float64((b ^ 2.0) - (a ^ 2.0))
	t_2 = sin(Float64(pi * Float64(angle_m * -0.005555555555555556)))
	t_3 = cos(expm1(log1p(t_0)))
	t_4 = Float64(t_2 * 0.0)
	tmp = 0.0
	if (t_1 <= -1e+293)
		tmp = Float64(t_3 * Float64(2.0 * Float64(Float64(a * fma(a, t_2, t_4)) - Float64((b ^ 2.0) * t_2))));
	elseif (t_1 <= Inf)
		tmp = Float64(cos((exp(1) ^ log(t_0))) * Float64(2.0 * fma(b, Float64(t_4 - Float64(b * t_2)), Float64((a ^ 2.0) * t_2))));
	else
		tmp = Float64(t_3 * Float64(2.0 * Float64(sin(Float64(angle_m * (cbrt(Float64(pi * -0.005555555555555556)) ^ 3.0))) * Float64(Float64(a - b) * 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_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(Pi * N[(angle$95$m * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$3 = N[Cos[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$2 * 0.0), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$1, -1e+293], N[(t$95$3 * N[(2.0 * N[(N[(a * N[(a * t$95$2 + t$95$4), $MachinePrecision]), $MachinePrecision] - N[(N[Power[b, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[Cos[N[Power[E, N[Log[t$95$0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(b * N[(t$95$4 - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[Power[a, 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$3 * N[(2.0 * N[(N[Sin[N[(angle$95$m * N[Power[N[Power[N[(Pi * -0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a - b), $MachinePrecision] * N[(b + a), $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(angle\_m \cdot 0.005555555555555556\right)\\
t_1 := {b}^{2} - {a}^{2}\\
t_2 := \sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right)\\
t_3 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\\
t_4 := t\_2 \cdot 0\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+293}:\\
\;\;\;\;t\_3 \cdot \left(2 \cdot \left(a \cdot \mathsf{fma}\left(a, t\_2, t\_4\right) - {b}^{2} \cdot t\_2\right)\right)\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\cos \left({e}^{\log t\_0}\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, t\_4 - b \cdot t\_2, {a}^{2} \cdot t\_2\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_3 \cdot \left(2 \cdot \left(\sin \left(angle\_m \cdot {\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\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))) < -9.9999999999999992e292

    1. Initial program 47.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. Simplified49.4%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt33.4%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod45.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/45.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times42.9%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative42.9%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative42.9%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval42.9%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval42.9%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times45.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/42.9%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/40.7%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod18.6%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt47.6%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u38.5%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine40.7%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr40.7%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define38.5%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified38.5%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow238.5%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow238.5%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares38.5%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr38.5%

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

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(-1 \cdot \left({b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}\right) \]
    11. Step-by-step derivation
      1. +-commutative60.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right) + -1 \cdot \left({b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}\right) \]
      2. mul-1-neg60.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right) + \color{blue}{\left(-{b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right)\right) \]
      3. unsub-neg60.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right) - {b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
    12. Simplified60.6%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(a \cdot \mathsf{fma}\left(a, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0\right) - \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {b}^{2}\right)}\right) \]

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

    1. Initial program 58.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. Simplified57.7%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt28.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod50.4%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/51.9%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative52.5%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative52.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval52.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval52.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times51.9%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/52.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/51.6%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod31.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt58.9%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u53.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine52.7%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr52.7%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define53.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified53.2%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow253.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow253.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares53.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr53.2%

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

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right)\right) + {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
    11. Step-by-step derivation
      1. fma-define56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
      2. +-commutative56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \color{blue}{\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) + -1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      3. mul-1-neg56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) + \color{blue}{\left(-b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      4. unsub-neg56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \color{blue}{\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      5. associate-*r*56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(a + -1 \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      6. distribute-rgt1-in56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot a\right)} - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      7. metadata-eval56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{0} \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      8. mul0-lft56.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{0} - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      9. associate-*r*56.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
    12. Simplified56.3%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)}\right) \]
    13. Step-by-step derivation
      1. expm1-log1p-u62.8%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      2. rem-exp-log34.1%

        \[\leadsto \cos \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      3. *-un-lft-identity34.1%

        \[\leadsto \cos \left(e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      4. exp-prod35.7%

        \[\leadsto \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
    14. Applied egg-rr35.7%

      \[\leadsto \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]

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

    1. Initial program 0.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. Simplified0.0%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine0.0%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified0.0%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-cube-cbrt62.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{\pi}{-180}} \cdot \sqrt[3]{\frac{\pi}{-180}}\right) \cdot \sqrt[3]{\frac{\pi}{-180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. pow362.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \color{blue}{{\left(\sqrt[3]{\frac{\pi}{-180}}\right)}^{3}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. div-inv62.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot {\left(\sqrt[3]{\color{blue}{\pi \cdot \frac{1}{-180}}}\right)}^{3}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. metadata-eval62.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot {\left(\sqrt[3]{\pi \cdot \color{blue}{-0.005555555555555556}}\right)}^{3}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    11. Applied egg-rr62.3%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \color{blue}{{\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq -1 \cdot 10^{+293}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(a \cdot \mathsf{fma}\left(a, \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right), \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right) \cdot 0\right) - {b}^{2} \cdot \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right)\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq \infty:\\ \;\;\;\;\cos \left({e}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right) \cdot 0 - b \cdot \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right), {a}^{2} \cdot \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot {\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 65.9% accurate, 0.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \frac{angle\_m}{180}\\ t_1 := \sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right)\\ t_2 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\ t_3 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\ t_4 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_3\right)\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_2 \leq 5 \cdot 10^{-162}:\\ \;\;\;\;t\_4 \cdot \left(2 \cdot \left(a \cdot \mathsf{fma}\left(a, t\_1, t\_1 \cdot 0\right) - {b}^{2} \cdot t\_1\right)\right)\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\left(2 \cdot \cos t\_3\right) \cdot \mathsf{fma}\left({a}^{2}, t\_1, b \cdot \left(b \cdot \left(-t\_1\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_4 \cdot \left(2 \cdot \left(\sin \left(angle\_m \cdot {\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\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 (/ angle_m 180.0)))
        (t_1 (sin (* PI (* angle_m -0.005555555555555556))))
        (t_2 (* (* (* 2.0 (- (pow b 2.0) (pow a 2.0))) (sin t_0)) (cos t_0)))
        (t_3 (* PI (* angle_m 0.005555555555555556)))
        (t_4 (cos (expm1 (log1p t_3)))))
   (*
    angle_s
    (if (<= t_2 5e-162)
      (* t_4 (* 2.0 (- (* a (fma a t_1 (* t_1 0.0))) (* (pow b 2.0) t_1))))
      (if (<= t_2 INFINITY)
        (* (* 2.0 (cos t_3)) (fma (pow a 2.0) t_1 (* b (* b (- t_1)))))
        (*
         t_4
         (*
          2.0
          (*
           (sin (* angle_m (pow (cbrt (* PI -0.005555555555555556)) 3.0)))
           (* (- a 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 t_0 = ((double) M_PI) * (angle_m / 180.0);
	double t_1 = sin((((double) M_PI) * (angle_m * -0.005555555555555556)));
	double t_2 = ((2.0 * (pow(b, 2.0) - pow(a, 2.0))) * sin(t_0)) * cos(t_0);
	double t_3 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double t_4 = cos(expm1(log1p(t_3)));
	double tmp;
	if (t_2 <= 5e-162) {
		tmp = t_4 * (2.0 * ((a * fma(a, t_1, (t_1 * 0.0))) - (pow(b, 2.0) * t_1)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = (2.0 * cos(t_3)) * fma(pow(a, 2.0), t_1, (b * (b * -t_1)));
	} else {
		tmp = t_4 * (2.0 * (sin((angle_m * pow(cbrt((((double) M_PI) * -0.005555555555555556)), 3.0))) * ((a - 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)
	t_0 = Float64(pi * Float64(angle_m / 180.0))
	t_1 = sin(Float64(pi * Float64(angle_m * -0.005555555555555556)))
	t_2 = Float64(Float64(Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))) * sin(t_0)) * cos(t_0))
	t_3 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	t_4 = cos(expm1(log1p(t_3)))
	tmp = 0.0
	if (t_2 <= 5e-162)
		tmp = Float64(t_4 * Float64(2.0 * Float64(Float64(a * fma(a, t_1, Float64(t_1 * 0.0))) - Float64((b ^ 2.0) * t_1))));
	elseif (t_2 <= Inf)
		tmp = Float64(Float64(2.0 * cos(t_3)) * fma((a ^ 2.0), t_1, Float64(b * Float64(b * Float64(-t_1)))));
	else
		tmp = Float64(t_4 * Float64(2.0 * Float64(sin(Float64(angle_m * (cbrt(Float64(pi * -0.005555555555555556)) ^ 3.0))) * Float64(Float64(a - b) * 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_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[N[(Pi * N[(angle$95$m * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Cos[N[(Exp[N[Log[1 + t$95$3], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$2, 5e-162], N[(t$95$4 * N[(2.0 * N[(N[(a * N[(a * t$95$1 + N[(t$95$1 * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[b, 2.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(2.0 * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] * N[(N[Power[a, 2.0], $MachinePrecision] * t$95$1 + N[(b * N[(b * (-t$95$1)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(2.0 * N[(N[Sin[N[(angle$95$m * N[Power[N[Power[N[(Pi * -0.005555555555555556), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a - b), $MachinePrecision] * N[(b + a), $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 \frac{angle\_m}{180}\\
t_1 := \sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right)\\
t_2 := \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin t\_0\right) \cdot \cos t\_0\\
t_3 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\
t_4 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_3\right)\right)\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_2 \leq 5 \cdot 10^{-162}:\\
\;\;\;\;t\_4 \cdot \left(2 \cdot \left(a \cdot \mathsf{fma}\left(a, t\_1, t\_1 \cdot 0\right) - {b}^{2} \cdot t\_1\right)\right)\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(2 \cdot \cos t\_3\right) \cdot \mathsf{fma}\left({a}^{2}, t\_1, b \cdot \left(b \cdot \left(-t\_1\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \left(2 \cdot \left(\sin \left(angle\_m \cdot {\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 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))))) < 5.00000000000000014e-162

    1. Initial program 58.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. Simplified58.2%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt31.4%

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

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/54.8%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times54.8%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative54.8%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative54.8%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval54.8%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval54.8%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times54.8%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/54.2%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/53.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod30.6%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt59.2%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u56.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine55.2%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr55.2%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define56.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified56.0%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow256.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow256.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares56.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr56.0%

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

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(-1 \cdot \left({b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right)\right)}\right) \]
    11. Step-by-step derivation
      1. +-commutative58.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right) + -1 \cdot \left({b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)}\right) \]
      2. mul-1-neg58.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right) + \color{blue}{\left(-{b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right)\right) \]
      3. unsub-neg58.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(a \cdot \left(a \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + -1 \cdot b\right)\right) - {b}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
    12. Simplified58.5%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(a \cdot \mathsf{fma}\left(a, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0\right) - \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {b}^{2}\right)}\right) \]

    if 5.00000000000000014e-162 < (*.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 52.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. Simplified53.1%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt25.7%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod43.6%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/44.6%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative44.7%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative44.7%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval44.7%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval44.7%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times44.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/44.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/44.6%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod25.8%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt53.2%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u42.4%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine43.4%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr43.4%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define42.4%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified42.4%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow242.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow242.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares42.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr42.4%

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

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right)\right) + {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
    11. Step-by-step derivation
      1. fma-define46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
      2. +-commutative46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \color{blue}{\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) + -1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      3. mul-1-neg46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) + \color{blue}{\left(-b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      4. unsub-neg46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \color{blue}{\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      5. associate-*r*46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(a + -1 \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      6. distribute-rgt1-in46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot a\right)} - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      7. metadata-eval46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{0} \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      8. mul0-lft46.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{0} - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      9. associate-*r*45.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
    12. Simplified44.8%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)}\right) \]
    13. Step-by-step derivation
      1. pow144.8%

        \[\leadsto \color{blue}{{\left(\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right)\right)}^{1}} \]
    14. Applied egg-rr56.3%

      \[\leadsto \color{blue}{{\left(\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \cdot \mathsf{fma}\left(b, -b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2}\right)\right)}^{1}} \]
    15. Step-by-step derivation
      1. unpow156.3%

        \[\leadsto \color{blue}{\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \cdot \mathsf{fma}\left(b, -b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2}\right)} \]
      2. *-commutative56.3%

        \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \cdot \mathsf{fma}\left(b, -b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2}\right) \]
      3. fma-define56.3%

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

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \color{blue}{\left(\sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2} + b \cdot \left(-b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)} \]
      5. distribute-rgt-neg-out56.3%

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

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \color{blue}{\left(\sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2} - b \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)} \]
      7. *-commutative56.3%

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\color{blue}{{a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} - b \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) \]
      8. *-commutative56.3%

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left({a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \color{blue}{\left(angle \cdot \pi\right)}\right) - b \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) \]
      9. fmm-def56.3%

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), -b \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)} \]
    16. Simplified56.0%

      \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left({a}^{2}, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), b \cdot \left(b \cdot \left(-\sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)\right)\right)\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 0.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. Simplified0.0%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine0.0%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified0.0%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-cube-cbrt62.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \color{blue}{\left(\left(\sqrt[3]{\frac{\pi}{-180}} \cdot \sqrt[3]{\frac{\pi}{-180}}\right) \cdot \sqrt[3]{\frac{\pi}{-180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. pow362.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \color{blue}{{\left(\sqrt[3]{\frac{\pi}{-180}}\right)}^{3}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. div-inv62.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot {\left(\sqrt[3]{\color{blue}{\pi \cdot \frac{1}{-180}}}\right)}^{3}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. metadata-eval62.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot {\left(\sqrt[3]{\pi \cdot \color{blue}{-0.005555555555555556}}\right)}^{3}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    11. Applied egg-rr62.3%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \color{blue}{{\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq 5 \cdot 10^{-162}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(a \cdot \mathsf{fma}\left(a, \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right), \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right) \cdot 0\right) - {b}^{2} \cdot \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right)\right)\\ \mathbf{elif}\;\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) \leq \infty:\\ \;\;\;\;\left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left({a}^{2}, \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot {\left(\sqrt[3]{\pi \cdot -0.005555555555555556}\right)}^{3}\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 63.7% accurate, 0.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := {b}^{2} - {a}^{2}\\ t_1 := 2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+214}:\\ \;\;\;\;t\_1 \cdot \cos \left(angle\_m \cdot \left(\pi \cdot \sqrt[3]{1.7146776406035666 \cdot 10^{-7}}\right)\right)\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \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 (- (pow b 2.0) (pow a 2.0)))
        (t_1 (* 2.0 (* (* (- a b) (+ b a)) (sin (* angle_m (/ PI -180.0)))))))
   (*
    angle_s
    (if (<= t_0 (- INFINITY))
      (* (* a 0.011111111111111112) (* (* PI angle_m) (- b a)))
      (if (<= t_0 5e+214)
        (* t_1 (cos (* angle_m (* PI (cbrt 1.7146776406035666e-7)))))
        (if (<= t_0 INFINITY)
          (*
           0.011111111111111112
           (-
            (* b (+ (* angle_m (* PI (- a a))) (* angle_m (* b PI))))
            (* (pow a 2.0) (* PI angle_m))))
          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 = pow(b, 2.0) - pow(a, 2.0);
	double t_1 = 2.0 * (((a - b) * (b + a)) * sin((angle_m * (((double) M_PI) / -180.0))));
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (b - a));
	} else if (t_0 <= 5e+214) {
		tmp = t_1 * cos((angle_m * (((double) M_PI) * cbrt(1.7146776406035666e-7))));
	} else if (t_0 <= ((double) INFINITY)) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (((double) M_PI) * (a - a))) + (angle_m * (b * ((double) M_PI))))) - (pow(a, 2.0) * (((double) M_PI) * angle_m)));
	} else {
		tmp = t_1;
	}
	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 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double t_1 = 2.0 * (((a - b) * (b + a)) * Math.sin((angle_m * (Math.PI / -180.0))));
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (b - a));
	} else if (t_0 <= 5e+214) {
		tmp = t_1 * Math.cos((angle_m * (Math.PI * Math.cbrt(1.7146776406035666e-7))));
	} else if (t_0 <= Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (Math.PI * (a - a))) + (angle_m * (b * Math.PI)))) - (Math.pow(a, 2.0) * (Math.PI * angle_m)));
	} else {
		tmp = 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 = Float64((b ^ 2.0) - (a ^ 2.0))
	t_1 = Float64(2.0 * Float64(Float64(Float64(a - b) * Float64(b + a)) * sin(Float64(angle_m * Float64(pi / -180.0)))))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * Float64(b - a)));
	elseif (t_0 <= 5e+214)
		tmp = Float64(t_1 * cos(Float64(angle_m * Float64(pi * cbrt(1.7146776406035666e-7)))));
	elseif (t_0 <= Inf)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * Float64(Float64(angle_m * Float64(pi * Float64(a - a))) + Float64(angle_m * Float64(b * pi)))) - Float64((a ^ 2.0) * Float64(pi * angle_m))));
	else
		tmp = 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[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+214], N[(t$95$1 * N[Cos[N[(angle$95$m * N[(Pi * N[Power[1.7146776406035666e-7, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(0.011111111111111112 * N[(N[(b * N[(N[(angle$95$m * N[(Pi * N[(a - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]), $MachinePrecision]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+214}:\\
\;\;\;\;t\_1 \cdot \cos \left(angle\_m \cdot \left(\pi \cdot \sqrt[3]{1.7146776406035666 \cdot 10^{-7}}\right)\right)\\

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


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

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*45.9%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 52.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares52.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*74.3%

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.99999999999999953e214

    1. Initial program 61.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. Simplified60.9%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt28.5%

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

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/56.3%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times56.3%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/56.4%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/56.7%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod32.3%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt61.3%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u54.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine54.7%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr54.7%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define54.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified54.7%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares54.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr54.7%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-cbrt-cube53.3%

        \[\leadsto \cos \color{blue}{\left(\sqrt[3]{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. pow1/345.4%

        \[\leadsto \cos \color{blue}{\left({\left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{0.3333333333333333}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. expm1-log1p-u45.2%

        \[\leadsto \cos \left({\left(\left(\color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{0.3333333333333333}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. expm1-log1p-u44.8%

        \[\leadsto \cos \left({\left(\left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{0.3333333333333333}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      5. expm1-log1p-u45.0%

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

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

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

      \[\leadsto \color{blue}{\cos \left(angle \cdot \left(\pi \cdot \sqrt[3]{1.7146776406035666 \cdot 10^{-7}}\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]

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

    1. Initial program 52.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. Step-by-step derivation
      1. associate-*l*52.6%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 61.2%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares61.2%

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

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

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

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

    1. Initial program 0.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. Simplified0.0%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine0.0%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified0.0%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.2%

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

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

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

Alternative 4: 63.9% accurate, 0.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\\ t_1 := {b}^{2} - {a}^{2}\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+214}:\\ \;\;\;\;\cos \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot t\_0\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \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 (* 2.0 (* (* (- a b) (+ b a)) (sin (* angle_m (/ PI -180.0))))))
        (t_1 (- (pow b 2.0) (pow a 2.0))))
   (*
    angle_s
    (if (<= t_1 (- INFINITY))
      (* (* a 0.011111111111111112) (* (* PI angle_m) (- b a)))
      (if (<= t_1 5e+214)
        (* (cos (* PI (* angle_m 0.005555555555555556))) t_0)
        (if (<= t_1 INFINITY)
          (*
           0.011111111111111112
           (-
            (* b (+ (* angle_m (* PI (- a a))) (* angle_m (* b PI))))
            (* (pow a 2.0) (* PI angle_m))))
          t_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 = 2.0 * (((a - b) * (b + a)) * sin((angle_m * (((double) M_PI) / -180.0))));
	double t_1 = pow(b, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (b - a));
	} else if (t_1 <= 5e+214) {
		tmp = cos((((double) M_PI) * (angle_m * 0.005555555555555556))) * t_0;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (((double) M_PI) * (a - a))) + (angle_m * (b * ((double) M_PI))))) - (pow(a, 2.0) * (((double) M_PI) * angle_m)));
	} else {
		tmp = t_0;
	}
	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 = 2.0 * (((a - b) * (b + a)) * Math.sin((angle_m * (Math.PI / -180.0))));
	double t_1 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (b - a));
	} else if (t_1 <= 5e+214) {
		tmp = Math.cos((Math.PI * (angle_m * 0.005555555555555556))) * t_0;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (Math.PI * (a - a))) + (angle_m * (b * Math.PI)))) - (Math.pow(a, 2.0) * (Math.PI * angle_m)));
	} else {
		tmp = t_0;
	}
	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 = 2.0 * (((a - b) * (b + a)) * math.sin((angle_m * (math.pi / -180.0))))
	t_1 = math.pow(b, 2.0) - math.pow(a, 2.0)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (b - a))
	elif t_1 <= 5e+214:
		tmp = math.cos((math.pi * (angle_m * 0.005555555555555556))) * t_0
	elif t_1 <= math.inf:
		tmp = 0.011111111111111112 * ((b * ((angle_m * (math.pi * (a - a))) + (angle_m * (b * math.pi)))) - (math.pow(a, 2.0) * (math.pi * angle_m)))
	else:
		tmp = t_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 = Float64(2.0 * Float64(Float64(Float64(a - b) * Float64(b + a)) * sin(Float64(angle_m * Float64(pi / -180.0)))))
	t_1 = Float64((b ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * Float64(b - a)));
	elseif (t_1 <= 5e+214)
		tmp = Float64(cos(Float64(pi * Float64(angle_m * 0.005555555555555556))) * t_0);
	elseif (t_1 <= Inf)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * Float64(Float64(angle_m * Float64(pi * Float64(a - a))) + Float64(angle_m * Float64(b * pi)))) - Float64((a ^ 2.0) * Float64(pi * angle_m))));
	else
		tmp = t_0;
	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 = 2.0 * (((a - b) * (b + a)) * sin((angle_m * (pi / -180.0))));
	t_1 = (b ^ 2.0) - (a ^ 2.0);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (a * 0.011111111111111112) * ((pi * angle_m) * (b - a));
	elseif (t_1 <= 5e+214)
		tmp = cos((pi * (angle_m * 0.005555555555555556))) * t_0;
	elseif (t_1 <= Inf)
		tmp = 0.011111111111111112 * ((b * ((angle_m * (pi * (a - a))) + (angle_m * (b * pi)))) - ((a ^ 2.0) * (pi * angle_m)));
	else
		tmp = t_0;
	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[(2.0 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $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[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+214], N[(N[Cos[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * t$95$0), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(0.011111111111111112 * N[(N[(b * N[(N[(angle$95$m * N[(Pi * N[(a - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]), $MachinePrecision]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+214}:\\
\;\;\;\;\cos \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right) \cdot t\_0\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


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

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*45.9%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 52.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares52.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*74.3%

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.99999999999999953e214

    1. Initial program 61.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. Simplified60.9%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt28.5%

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

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/56.3%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times56.3%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/56.4%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/56.7%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod32.3%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt61.3%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u54.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine54.7%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr54.7%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define54.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified54.7%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares54.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr54.7%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. expm1-log1p-u61.4%

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

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

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

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

    1. Initial program 52.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. Step-by-step derivation
      1. associate-*l*52.6%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 61.2%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares61.2%

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

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

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

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

    1. Initial program 0.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. Simplified0.0%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine0.0%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified0.0%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.2%

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

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

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

Alternative 5: 64.0% accurate, 0.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := angle\_m \cdot \frac{\pi}{-180}\\ t_1 := {b}^{2} - {a}^{2}\\ t_2 := 2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin t\_0\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+214}:\\ \;\;\;\;t\_2 \cdot \cos t\_0\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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 -180.0)))
        (t_1 (- (pow b 2.0) (pow a 2.0)))
        (t_2 (* 2.0 (* (* (- a b) (+ b a)) (sin t_0)))))
   (*
    angle_s
    (if (<= t_1 (- INFINITY))
      (* (* a 0.011111111111111112) (* (* PI angle_m) (- b a)))
      (if (<= t_1 5e+214)
        (* t_2 (cos t_0))
        (if (<= t_1 INFINITY)
          (*
           0.011111111111111112
           (-
            (* b (+ (* angle_m (* PI (- a a))) (* angle_m (* b PI))))
            (* (pow a 2.0) (* PI angle_m))))
          t_2))))))
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) / -180.0);
	double t_1 = pow(b, 2.0) - pow(a, 2.0);
	double t_2 = 2.0 * (((a - b) * (b + a)) * sin(t_0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (b - a));
	} else if (t_1 <= 5e+214) {
		tmp = t_2 * cos(t_0);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (((double) M_PI) * (a - a))) + (angle_m * (b * ((double) M_PI))))) - (pow(a, 2.0) * (((double) M_PI) * angle_m)));
	} else {
		tmp = t_2;
	}
	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 / -180.0);
	double t_1 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double t_2 = 2.0 * (((a - b) * (b + a)) * Math.sin(t_0));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (b - a));
	} else if (t_1 <= 5e+214) {
		tmp = t_2 * Math.cos(t_0);
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (Math.PI * (a - a))) + (angle_m * (b * Math.PI)))) - (Math.pow(a, 2.0) * (Math.PI * angle_m)));
	} else {
		tmp = t_2;
	}
	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 / -180.0)
	t_1 = math.pow(b, 2.0) - math.pow(a, 2.0)
	t_2 = 2.0 * (((a - b) * (b + a)) * math.sin(t_0))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (b - a))
	elif t_1 <= 5e+214:
		tmp = t_2 * math.cos(t_0)
	elif t_1 <= math.inf:
		tmp = 0.011111111111111112 * ((b * ((angle_m * (math.pi * (a - a))) + (angle_m * (b * math.pi)))) - (math.pow(a, 2.0) * (math.pi * angle_m)))
	else:
		tmp = t_2
	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(angle_m * Float64(pi / -180.0))
	t_1 = Float64((b ^ 2.0) - (a ^ 2.0))
	t_2 = Float64(2.0 * Float64(Float64(Float64(a - b) * Float64(b + a)) * sin(t_0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * Float64(b - a)));
	elseif (t_1 <= 5e+214)
		tmp = Float64(t_2 * cos(t_0));
	elseif (t_1 <= Inf)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * Float64(Float64(angle_m * Float64(pi * Float64(a - a))) + Float64(angle_m * Float64(b * pi)))) - Float64((a ^ 2.0) * Float64(pi * angle_m))));
	else
		tmp = t_2;
	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 / -180.0);
	t_1 = (b ^ 2.0) - (a ^ 2.0);
	t_2 = 2.0 * (((a - b) * (b + a)) * sin(t_0));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (a * 0.011111111111111112) * ((pi * angle_m) * (b - a));
	elseif (t_1 <= 5e+214)
		tmp = t_2 * cos(t_0);
	elseif (t_1 <= Inf)
		tmp = 0.011111111111111112 * ((b * ((angle_m * (pi * (a - a))) + (angle_m * (b * pi)))) - ((a ^ 2.0) * (pi * angle_m)));
	else
		tmp = t_2;
	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[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$1, (-Infinity)], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+214], N[(t$95$2 * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(0.011111111111111112 * N[(N[(b * N[(N[(angle$95$m * N[(Pi * N[(a - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]), $MachinePrecision]]]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+214}:\\
\;\;\;\;t\_2 \cdot \cos t\_0\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


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

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*45.9%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 52.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares52.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*74.3%

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.99999999999999953e214

    1. Initial program 61.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. Simplified60.9%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares54.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    5. Applied egg-rr60.9%

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

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

    1. Initial program 52.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. Step-by-step derivation
      1. associate-*l*52.6%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 61.2%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares61.2%

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

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

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

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

    1. Initial program 0.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. Simplified0.0%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine0.0%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified0.0%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.2%

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

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

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

Alternative 6: 64.0% accurate, 0.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := {b}^{2} - {a}^{2}\\ t_1 := \left(a - b\right) \cdot \left(b + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+214}:\\ \;\;\;\;2 \cdot \left(\left(t\_1 \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{elif}\;t\_0 \leq \infty:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t\_1 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\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 (- (pow b 2.0) (pow a 2.0))) (t_1 (* (- a b) (+ b a))))
   (*
    angle_s
    (if (<= t_0 (- INFINITY))
      (* (* a 0.011111111111111112) (* (* PI angle_m) (- b a)))
      (if (<= t_0 5e+214)
        (*
         2.0
         (*
          (* t_1 (sin (* -0.005555555555555556 (* PI angle_m))))
          (cos (* 0.005555555555555556 (* PI angle_m)))))
        (if (<= t_0 INFINITY)
          (*
           0.011111111111111112
           (-
            (* b (+ (* angle_m (* PI (- a a))) (* angle_m (* b PI))))
            (* (pow a 2.0) (* PI angle_m))))
          (* 2.0 (* t_1 (sin (* angle_m (/ PI -180.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 = pow(b, 2.0) - pow(a, 2.0);
	double t_1 = (a - b) * (b + a);
	double tmp;
	if (t_0 <= -((double) INFINITY)) {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (b - a));
	} else if (t_0 <= 5e+214) {
		tmp = 2.0 * ((t_1 * sin((-0.005555555555555556 * (((double) M_PI) * angle_m)))) * cos((0.005555555555555556 * (((double) M_PI) * angle_m))));
	} else if (t_0 <= ((double) INFINITY)) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (((double) M_PI) * (a - a))) + (angle_m * (b * ((double) M_PI))))) - (pow(a, 2.0) * (((double) M_PI) * angle_m)));
	} else {
		tmp = 2.0 * (t_1 * sin((angle_m * (((double) M_PI) / -180.0))));
	}
	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 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double t_1 = (a - b) * (b + a);
	double tmp;
	if (t_0 <= -Double.POSITIVE_INFINITY) {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (b - a));
	} else if (t_0 <= 5e+214) {
		tmp = 2.0 * ((t_1 * Math.sin((-0.005555555555555556 * (Math.PI * angle_m)))) * Math.cos((0.005555555555555556 * (Math.PI * angle_m))));
	} else if (t_0 <= Double.POSITIVE_INFINITY) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (Math.PI * (a - a))) + (angle_m * (b * Math.PI)))) - (Math.pow(a, 2.0) * (Math.PI * angle_m)));
	} else {
		tmp = 2.0 * (t_1 * Math.sin((angle_m * (Math.PI / -180.0))));
	}
	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 = math.pow(b, 2.0) - math.pow(a, 2.0)
	t_1 = (a - b) * (b + a)
	tmp = 0
	if t_0 <= -math.inf:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (b - a))
	elif t_0 <= 5e+214:
		tmp = 2.0 * ((t_1 * math.sin((-0.005555555555555556 * (math.pi * angle_m)))) * math.cos((0.005555555555555556 * (math.pi * angle_m))))
	elif t_0 <= math.inf:
		tmp = 0.011111111111111112 * ((b * ((angle_m * (math.pi * (a - a))) + (angle_m * (b * math.pi)))) - (math.pow(a, 2.0) * (math.pi * angle_m)))
	else:
		tmp = 2.0 * (t_1 * math.sin((angle_m * (math.pi / -180.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 = Float64((b ^ 2.0) - (a ^ 2.0))
	t_1 = Float64(Float64(a - b) * Float64(b + a))
	tmp = 0.0
	if (t_0 <= Float64(-Inf))
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * Float64(b - a)));
	elseif (t_0 <= 5e+214)
		tmp = Float64(2.0 * Float64(Float64(t_1 * sin(Float64(-0.005555555555555556 * Float64(pi * angle_m)))) * cos(Float64(0.005555555555555556 * Float64(pi * angle_m)))));
	elseif (t_0 <= Inf)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * Float64(Float64(angle_m * Float64(pi * Float64(a - a))) + Float64(angle_m * Float64(b * pi)))) - Float64((a ^ 2.0) * Float64(pi * angle_m))));
	else
		tmp = Float64(2.0 * Float64(t_1 * sin(Float64(angle_m * Float64(pi / -180.0)))));
	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 = (b ^ 2.0) - (a ^ 2.0);
	t_1 = (a - b) * (b + a);
	tmp = 0.0;
	if (t_0 <= -Inf)
		tmp = (a * 0.011111111111111112) * ((pi * angle_m) * (b - a));
	elseif (t_0 <= 5e+214)
		tmp = 2.0 * ((t_1 * sin((-0.005555555555555556 * (pi * angle_m)))) * cos((0.005555555555555556 * (pi * angle_m))));
	elseif (t_0 <= Inf)
		tmp = 0.011111111111111112 * ((b * ((angle_m * (pi * (a - a))) + (angle_m * (b * pi)))) - ((a ^ 2.0) * (pi * angle_m)));
	else
		tmp = 2.0 * (t_1 * sin((angle_m * (pi / -180.0))));
	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[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$0, (-Infinity)], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+214], N[(2.0 * N[(N[(t$95$1 * N[Sin[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, Infinity], N[(0.011111111111111112 * N[(N[(b * N[(N[(angle$95$m * N[(Pi * N[(a - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $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 := {b}^{2} - {a}^{2}\\
t_1 := \left(a - b\right) \cdot \left(b + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\

\mathbf{elif}\;t\_0 \leq 5 \cdot 10^{+214}:\\
\;\;\;\;2 \cdot \left(\left(t\_1 \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\

\mathbf{elif}\;t\_0 \leq \infty:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_1 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\\


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

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*45.9%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 52.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares52.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*74.3%

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

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

    if -inf.0 < (-.f64 (pow.f64 b #s(literal 2 binary64)) (pow.f64 a #s(literal 2 binary64))) < 4.99999999999999953e214

    1. Initial program 61.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. Simplified60.9%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt28.5%

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

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/56.3%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval56.5%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times56.3%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/56.4%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/56.7%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod32.3%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt61.3%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u54.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine54.7%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr54.7%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define54.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified54.7%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow254.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares54.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr54.7%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Taylor expanded in angle around inf 60.6%

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

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

    1. Initial program 52.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. Step-by-step derivation
      1. associate-*l*52.6%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 61.2%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares61.2%

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

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

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

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

    1. Initial program 0.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. Simplified0.0%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine0.0%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr0.0%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define0.0%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified0.0%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow20.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.2%

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

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

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

Alternative 7: 60.5% accurate, 0.7× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\\ t_1 := \cos t\_0\\ t_2 := \left(a - b\right) \cdot \left(b + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+207}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin t\_0\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 (expm1 (log1p (* PI (* angle_m 0.005555555555555556)))))
        (t_1 (cos t_0))
        (t_2 (* (- a b) (+ b a))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e-126)
      (*
       0.011111111111111112
       (+
        (* a (- (* angle_m (* PI (- b b))) (* a (* PI angle_m))))
        (* angle_m (* (pow b 2.0) PI))))
      (if (<= (/ angle_m 180.0) 5e+152)
        (* t_1 (* 2.0 (* t_2 (sin (* angle_m (/ PI -180.0))))))
        (if (<= (/ angle_m 180.0) 1e+207)
          (* t_1 (* 2.0 (* t_2 (sin (/ (* PI angle_m) 180.0)))))
          (* t_1 (* 2.0 (* t_2 (sin t_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 = expm1(log1p((((double) M_PI) * (angle_m * 0.005555555555555556))));
	double t_1 = cos(t_0);
	double t_2 = (a - b) * (b + a);
	double tmp;
	if ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (((double) M_PI) * (b - b))) - (a * (((double) M_PI) * angle_m)))) + (angle_m * (pow(b, 2.0) * ((double) M_PI))));
	} else if ((angle_m / 180.0) <= 5e+152) {
		tmp = t_1 * (2.0 * (t_2 * sin((angle_m * (((double) M_PI) / -180.0)))));
	} else if ((angle_m / 180.0) <= 1e+207) {
		tmp = t_1 * (2.0 * (t_2 * sin(((((double) M_PI) * angle_m) / 180.0))));
	} else {
		tmp = t_1 * (2.0 * (t_2 * sin(t_0)));
	}
	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 = Math.expm1(Math.log1p((Math.PI * (angle_m * 0.005555555555555556))));
	double t_1 = Math.cos(t_0);
	double t_2 = (a - b) * (b + a);
	double tmp;
	if ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (Math.PI * (b - b))) - (a * (Math.PI * angle_m)))) + (angle_m * (Math.pow(b, 2.0) * Math.PI)));
	} else if ((angle_m / 180.0) <= 5e+152) {
		tmp = t_1 * (2.0 * (t_2 * Math.sin((angle_m * (Math.PI / -180.0)))));
	} else if ((angle_m / 180.0) <= 1e+207) {
		tmp = t_1 * (2.0 * (t_2 * Math.sin(((Math.PI * angle_m) / 180.0))));
	} else {
		tmp = t_1 * (2.0 * (t_2 * Math.sin(t_0)));
	}
	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 = math.expm1(math.log1p((math.pi * (angle_m * 0.005555555555555556))))
	t_1 = math.cos(t_0)
	t_2 = (a - b) * (b + a)
	tmp = 0
	if (angle_m / 180.0) <= 1e-126:
		tmp = 0.011111111111111112 * ((a * ((angle_m * (math.pi * (b - b))) - (a * (math.pi * angle_m)))) + (angle_m * (math.pow(b, 2.0) * math.pi)))
	elif (angle_m / 180.0) <= 5e+152:
		tmp = t_1 * (2.0 * (t_2 * math.sin((angle_m * (math.pi / -180.0)))))
	elif (angle_m / 180.0) <= 1e+207:
		tmp = t_1 * (2.0 * (t_2 * math.sin(((math.pi * angle_m) / 180.0))))
	else:
		tmp = t_1 * (2.0 * (t_2 * math.sin(t_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 = expm1(log1p(Float64(pi * Float64(angle_m * 0.005555555555555556))))
	t_1 = cos(t_0)
	t_2 = Float64(Float64(a - b) * Float64(b + a))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e-126)
		tmp = Float64(0.011111111111111112 * Float64(Float64(a * Float64(Float64(angle_m * Float64(pi * Float64(b - b))) - Float64(a * Float64(pi * angle_m)))) + Float64(angle_m * Float64((b ^ 2.0) * pi))));
	elseif (Float64(angle_m / 180.0) <= 5e+152)
		tmp = Float64(t_1 * Float64(2.0 * Float64(t_2 * sin(Float64(angle_m * Float64(pi / -180.0))))));
	elseif (Float64(angle_m / 180.0) <= 1e+207)
		tmp = Float64(t_1 * Float64(2.0 * Float64(t_2 * sin(Float64(Float64(pi * angle_m) / 180.0)))));
	else
		tmp = Float64(t_1 * Float64(2.0 * Float64(t_2 * sin(t_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[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]}, Block[{t$95$1 = N[Cos[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e-126], N[(0.011111111111111112 * N[(N[(a * N[(N[(angle$95$m * N[(Pi * N[(b - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(N[Power[b, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+152], N[(t$95$1 * N[(2.0 * N[(t$95$2 * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+207], N[(t$95$1 * N[(2.0 * N[(t$95$2 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(2.0 * N[(t$95$2 * N[Sin[t$95$0], $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{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\\
t_1 := \cos t\_0\\
t_2 := \left(a - b\right) \cdot \left(b + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-126}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+152}:\\
\;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+207}:\\
\;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin t\_0\right)\right)\\


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

    1. Initial program 57.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. Step-by-step derivation
      1. associate-*l*57.1%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 58.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.4%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares60.5%

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

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

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

    if 9.9999999999999995e-127 < (/.f64 angle #s(literal 180 binary64)) < 5e152

    1. Initial program 57.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. Simplified55.8%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod55.8%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/58.6%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times58.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times58.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/57.3%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/56.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod53.9%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt56.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u63.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine63.9%

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

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define63.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified63.9%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow263.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow263.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares73.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr73.2%

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

    if 5e152 < (/.f64 angle #s(literal 180 binary64)) < 1e207

    1. Initial program 18.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. Simplified20.1%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod11.7%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt18.4%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u21.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine21.3%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr21.3%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define21.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified21.2%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow221.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow221.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares21.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr21.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. sqrt-unprod0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{\left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      13. sqrt-unprod27.5%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      14. add-sqr-sqrt41.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      15. *-commutative41.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      16. associate-*l/48.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    11. Applied egg-rr48.9%

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

    if 1e207 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 18.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. Simplified17.1%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod29.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt23.6%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine20.3%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr20.3%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified20.3%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow220.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow220.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares25.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr25.8%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod29.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt23.6%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine20.3%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    11. Applied egg-rr39.9%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    12. Step-by-step derivation
      1. expm1-define20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    13. Simplified39.9%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification62.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\right)\right) + angle \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+207}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.5% accurate, 0.7× 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(angle\_m \cdot 0.005555555555555556\right)\\ t_1 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\\ t_2 := \left(a - b\right) \cdot \left(b + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+207}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(e^{\log t\_0}\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 (* angle_m 0.005555555555555556)))
        (t_1 (cos (expm1 (log1p t_0))))
        (t_2 (* (- a b) (+ b a))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e-126)
      (*
       0.011111111111111112
       (+
        (* a (- (* angle_m (* PI (- b b))) (* a (* PI angle_m))))
        (* angle_m (* (pow b 2.0) PI))))
      (if (<= (/ angle_m 180.0) 5e+152)
        (* t_1 (* 2.0 (* t_2 (sin (* angle_m (/ PI -180.0))))))
        (if (<= (/ angle_m 180.0) 1e+207)
          (* t_1 (* 2.0 (* t_2 (sin (/ (* PI angle_m) 180.0)))))
          (* t_1 (* 2.0 (* t_2 (sin (exp (log t_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 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double t_1 = cos(expm1(log1p(t_0)));
	double t_2 = (a - b) * (b + a);
	double tmp;
	if ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (((double) M_PI) * (b - b))) - (a * (((double) M_PI) * angle_m)))) + (angle_m * (pow(b, 2.0) * ((double) M_PI))));
	} else if ((angle_m / 180.0) <= 5e+152) {
		tmp = t_1 * (2.0 * (t_2 * sin((angle_m * (((double) M_PI) / -180.0)))));
	} else if ((angle_m / 180.0) <= 1e+207) {
		tmp = t_1 * (2.0 * (t_2 * sin(((((double) M_PI) * angle_m) / 180.0))));
	} else {
		tmp = t_1 * (2.0 * (t_2 * sin(exp(log(t_0)))));
	}
	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 = Math.PI * (angle_m * 0.005555555555555556);
	double t_1 = Math.cos(Math.expm1(Math.log1p(t_0)));
	double t_2 = (a - b) * (b + a);
	double tmp;
	if ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (Math.PI * (b - b))) - (a * (Math.PI * angle_m)))) + (angle_m * (Math.pow(b, 2.0) * Math.PI)));
	} else if ((angle_m / 180.0) <= 5e+152) {
		tmp = t_1 * (2.0 * (t_2 * Math.sin((angle_m * (Math.PI / -180.0)))));
	} else if ((angle_m / 180.0) <= 1e+207) {
		tmp = t_1 * (2.0 * (t_2 * Math.sin(((Math.PI * angle_m) / 180.0))));
	} else {
		tmp = t_1 * (2.0 * (t_2 * Math.sin(Math.exp(Math.log(t_0)))));
	}
	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 = math.pi * (angle_m * 0.005555555555555556)
	t_1 = math.cos(math.expm1(math.log1p(t_0)))
	t_2 = (a - b) * (b + a)
	tmp = 0
	if (angle_m / 180.0) <= 1e-126:
		tmp = 0.011111111111111112 * ((a * ((angle_m * (math.pi * (b - b))) - (a * (math.pi * angle_m)))) + (angle_m * (math.pow(b, 2.0) * math.pi)))
	elif (angle_m / 180.0) <= 5e+152:
		tmp = t_1 * (2.0 * (t_2 * math.sin((angle_m * (math.pi / -180.0)))))
	elif (angle_m / 180.0) <= 1e+207:
		tmp = t_1 * (2.0 * (t_2 * math.sin(((math.pi * angle_m) / 180.0))))
	else:
		tmp = t_1 * (2.0 * (t_2 * math.sin(math.exp(math.log(t_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 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	t_1 = cos(expm1(log1p(t_0)))
	t_2 = Float64(Float64(a - b) * Float64(b + a))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e-126)
		tmp = Float64(0.011111111111111112 * Float64(Float64(a * Float64(Float64(angle_m * Float64(pi * Float64(b - b))) - Float64(a * Float64(pi * angle_m)))) + Float64(angle_m * Float64((b ^ 2.0) * pi))));
	elseif (Float64(angle_m / 180.0) <= 5e+152)
		tmp = Float64(t_1 * Float64(2.0 * Float64(t_2 * sin(Float64(angle_m * Float64(pi / -180.0))))));
	elseif (Float64(angle_m / 180.0) <= 1e+207)
		tmp = Float64(t_1 * Float64(2.0 * Float64(t_2 * sin(Float64(Float64(pi * angle_m) / 180.0)))));
	else
		tmp = Float64(t_1 * Float64(2.0 * Float64(t_2 * sin(exp(log(t_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[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Cos[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e-126], N[(0.011111111111111112 * N[(N[(a * N[(N[(angle$95$m * N[(Pi * N[(b - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(N[Power[b, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+152], N[(t$95$1 * N[(2.0 * N[(t$95$2 * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+207], N[(t$95$1 * N[(2.0 * N[(t$95$2 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(2.0 * N[(t$95$2 * N[Sin[N[Exp[N[Log[t$95$0], $MachinePrecision]], $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(angle\_m \cdot 0.005555555555555556\right)\\
t_1 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\\
t_2 := \left(a - b\right) \cdot \left(b + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-126}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+152}:\\
\;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+207}:\\
\;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_2 \cdot \sin \left(e^{\log t\_0}\right)\right)\right)\\


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

    1. Initial program 57.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. Step-by-step derivation
      1. associate-*l*57.1%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 58.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.4%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares60.5%

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

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

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

    if 9.9999999999999995e-127 < (/.f64 angle #s(literal 180 binary64)) < 5e152

    1. Initial program 57.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. Simplified55.8%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod55.8%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/58.6%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times58.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times58.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/57.3%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/56.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod53.9%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt56.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u63.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine63.9%

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

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define63.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified63.9%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow263.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow263.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares73.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr73.2%

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

    if 5e152 < (/.f64 angle #s(literal 180 binary64)) < 1e207

    1. Initial program 18.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. Simplified20.1%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod11.7%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt18.4%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u21.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine21.3%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr21.3%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define21.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified21.2%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow221.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow221.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares21.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr21.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. sqrt-unprod0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{\left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      13. sqrt-unprod27.5%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      14. add-sqr-sqrt41.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      15. *-commutative41.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      16. associate-*l/48.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    11. Applied egg-rr48.9%

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

    if 1e207 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 18.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. Simplified17.1%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod29.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt23.6%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine20.3%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr20.3%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified20.3%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow220.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow220.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares25.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr25.8%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-exp-log0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(e^{\log \left(angle \cdot \frac{\pi}{-180}\right)}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. add-sqr-sqrt0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. sqrt-unprod0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\sqrt{\left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      5. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      6. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      8. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      10. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      11. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      13. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      14. sqrt-unprod39.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      15. add-sqr-sqrt39.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      16. div-inv39.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      17. metadata-eval39.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    11. Applied egg-rr39.9%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification62.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\right)\right) + angle \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+207}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 62.0% accurate, 0.7× 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 -\infty:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\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)) (- INFINITY))
    (* (* a 0.011111111111111112) (* (* PI angle_m) (- b a)))
    (*
     (cos (expm1 (log1p (* PI (* angle_m 0.005555555555555556)))))
     (* 2.0 (* (* (- a b) (+ b a)) (sin (* angle_m (/ PI -180.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)) <= -((double) INFINITY)) {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (b - a));
	} else {
		tmp = cos(expm1(log1p((((double) M_PI) * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * sin((angle_m * (((double) M_PI) / -180.0)))));
	}
	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)) <= -Double.POSITIVE_INFINITY) {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (b - a));
	} else {
		tmp = Math.cos(Math.expm1(Math.log1p((Math.PI * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * Math.sin((angle_m * (Math.PI / -180.0)))));
	}
	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)) <= -math.inf:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (b - a))
	else:
		tmp = math.cos(math.expm1(math.log1p((math.pi * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * math.sin((angle_m * (math.pi / -180.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)) <= Float64(-Inf))
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * Float64(b - a)));
	else
		tmp = Float64(cos(expm1(log1p(Float64(pi * Float64(angle_m * 0.005555555555555556))))) * Float64(2.0 * Float64(Float64(Float64(a - b) * Float64(b + a)) * sin(Float64(angle_m * Float64(pi / -180.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], (-Infinity)], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $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}^{2} - {a}^{2} \leq -\infty:\\
\;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\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))) < -inf.0

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*45.9%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 52.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares52.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*74.3%

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

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

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

    1. Initial program 53.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. Simplified52.9%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt26.2%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod46.4%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/47.7%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times47.7%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/47.8%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/47.5%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod28.1%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt54.1%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u48.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine48.4%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr48.4%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define48.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified48.9%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow248.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow248.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares53.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr53.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.8%

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

Alternative 10: 62.1% accurate, 0.7× 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 -\infty:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\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)) (- INFINITY))
    (* (* a 0.011111111111111112) (* (* PI angle_m) (- b a)))
    (*
     (cos (expm1 (log1p (* PI (* angle_m 0.005555555555555556)))))
     (*
      2.0
      (*
       (* (- a b) (+ b a))
       (sin (* -0.005555555555555556 (* PI angle_m)))))))))
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)) <= -((double) INFINITY)) {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (b - a));
	} else {
		tmp = cos(expm1(log1p((((double) M_PI) * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * sin((-0.005555555555555556 * (((double) M_PI) * angle_m)))));
	}
	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)) <= -Double.POSITIVE_INFINITY) {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (b - a));
	} else {
		tmp = Math.cos(Math.expm1(Math.log1p((Math.PI * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * Math.sin((-0.005555555555555556 * (Math.PI * angle_m)))));
	}
	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)) <= -math.inf:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (b - a))
	else:
		tmp = math.cos(math.expm1(math.log1p((math.pi * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * math.sin((-0.005555555555555556 * (math.pi * angle_m)))))
	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)) <= Float64(-Inf))
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * Float64(b - a)));
	else
		tmp = Float64(cos(expm1(log1p(Float64(pi * Float64(angle_m * 0.005555555555555556))))) * Float64(2.0 * Float64(Float64(Float64(a - b) * Float64(b + a)) * sin(Float64(-0.005555555555555556 * Float64(pi * angle_m))))));
	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], (-Infinity)], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Cos[N[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $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}^{2} - {a}^{2} \leq -\infty:\\
\;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\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))) < -inf.0

    1. Initial program 45.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*45.9%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 52.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow252.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares52.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*74.3%

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

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

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

    1. Initial program 53.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. Simplified52.9%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt26.2%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod46.4%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/47.7%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval48.3%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times47.7%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/47.8%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/47.5%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod28.1%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt54.1%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u48.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine48.4%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr48.4%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define48.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified48.9%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow248.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow248.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares53.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr53.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Taylor expanded in angle around inf 53.0%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)}\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.6%

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

Alternative 11: 60.0% 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 := \sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right)\\ t_1 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a \leq 4.2 \cdot 10^{-103}:\\ \;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot \mathsf{fma}\left({a}^{2}, t\_0, b \cdot \left(b \cdot \left(-t\_0\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+173}:\\ \;\;\;\;\cos \left({e}^{\log t\_1}\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\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 (sin (* PI (* angle_m -0.005555555555555556))))
        (t_1 (* PI (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= a 4.2e-103)
      (* (* 2.0 (cos t_1)) (fma (pow a 2.0) t_0 (* b (* b (- t_0)))))
      (if (<= a 1.55e+173)
        (*
         (cos (pow E (log t_1)))
         (* 2.0 (* (* (- a b) (+ b a)) (sin (* angle_m (/ PI -180.0))))))
        (* (* a 0.011111111111111112) (* (* PI angle_m) (- 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 = sin((((double) M_PI) * (angle_m * -0.005555555555555556)));
	double t_1 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double tmp;
	if (a <= 4.2e-103) {
		tmp = (2.0 * cos(t_1)) * fma(pow(a, 2.0), t_0, (b * (b * -t_0)));
	} else if (a <= 1.55e+173) {
		tmp = cos(pow(((double) M_E), log(t_1))) * (2.0 * (((a - b) * (b + a)) * sin((angle_m * (((double) M_PI) / -180.0)))));
	} else {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (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 = sin(Float64(pi * Float64(angle_m * -0.005555555555555556)))
	t_1 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (a <= 4.2e-103)
		tmp = Float64(Float64(2.0 * cos(t_1)) * fma((a ^ 2.0), t_0, Float64(b * Float64(b * Float64(-t_0)))));
	elseif (a <= 1.55e+173)
		tmp = Float64(cos((exp(1) ^ log(t_1))) * Float64(2.0 * Float64(Float64(Float64(a - b) * Float64(b + a)) * sin(Float64(angle_m * Float64(pi / -180.0))))));
	else
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * 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_] := Block[{t$95$0 = N[Sin[N[(Pi * N[(angle$95$m * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a, 4.2e-103], N[(N[(2.0 * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] * N[(N[Power[a, 2.0], $MachinePrecision] * t$95$0 + N[(b * N[(b * (-t$95$0)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+173], N[(N[Cos[N[Power[E, N[Log[t$95$1], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $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 := \sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right)\\
t_1 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a \leq 4.2 \cdot 10^{-103}:\\
\;\;\;\;\left(2 \cdot \cos t\_1\right) \cdot \mathsf{fma}\left({a}^{2}, t\_0, b \cdot \left(b \cdot \left(-t\_0\right)\right)\right)\\

\mathbf{elif}\;a \leq 1.55 \cdot 10^{+173}:\\
\;\;\;\;\cos \left({e}^{\log t\_1}\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 4.20000000000000009e-103

    1. Initial program 54.4%

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

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt30.2%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod48.3%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/50.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative50.1%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative50.1%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval50.1%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval50.1%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times50.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/50.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/49.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod26.4%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt55.2%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u48.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine47.8%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr47.8%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define48.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified48.2%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow248.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow248.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.3%

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

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(b \cdot \left(-1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right)\right) + {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
    11. Step-by-step derivation
      1. fma-define55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\mathsf{fma}\left(b, -1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) + \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
      2. +-commutative55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \color{blue}{\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) + -1 \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      3. mul-1-neg55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) + \color{blue}{\left(-b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      4. unsub-neg55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \color{blue}{\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(a + -1 \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      5. associate-*r*55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(a + -1 \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      6. distribute-rgt1-in55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{\left(\left(-1 + 1\right) \cdot a\right)} - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      7. metadata-eval55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\color{blue}{0} \cdot a\right) - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      8. mul0-lft55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \color{blue}{0} - b \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      9. associate-*r*55.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)}, {a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
    12. Simplified55.0%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)}\right) \]
    13. Step-by-step derivation
      1. pow155.0%

        \[\leadsto \color{blue}{{\left(\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right)\right)}^{1}} \]
    14. Applied egg-rr60.7%

      \[\leadsto \color{blue}{{\left(\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \cdot \mathsf{fma}\left(b, -b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2}\right)\right)}^{1}} \]
    15. Step-by-step derivation
      1. unpow160.7%

        \[\leadsto \color{blue}{\left(\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right) \cdot \mathsf{fma}\left(b, -b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2}\right)} \]
      2. *-commutative60.7%

        \[\leadsto \color{blue}{\left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \cdot \mathsf{fma}\left(b, -b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right), \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2}\right) \]
      3. fma-define59.6%

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

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \color{blue}{\left(\sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2} + b \cdot \left(-b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)} \]
      5. distribute-rgt-neg-out59.6%

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

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \color{blue}{\left(\sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot {a}^{2} - b \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)} \]
      7. *-commutative59.6%

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\color{blue}{{a}^{2} \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} - b \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right) \]
      8. *-commutative59.6%

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

        \[\leadsto \left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \color{blue}{\mathsf{fma}\left({a}^{2}, \sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right), -b \cdot \left(b \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)} \]
    16. Simplified60.2%

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

    if 4.20000000000000009e-103 < a < 1.55e173

    1. Initial program 53.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. Simplified53.2%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt24.4%

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

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/46.6%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times46.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative46.6%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative46.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval46.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval46.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times46.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/45.2%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/45.2%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod33.8%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt53.2%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u50.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine50.4%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr50.4%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define50.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified50.7%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow250.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow250.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares50.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr50.8%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. expm1-log1p-u53.2%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      2. rem-exp-log32.9%

        \[\leadsto \cos \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      3. *-un-lft-identity32.9%

        \[\leadsto \cos \left(e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      4. exp-prod35.6%

        \[\leadsto \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
    11. Applied egg-rr36.5%

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

    if 1.55e173 < a

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l*38.0%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 28.0%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow228.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow228.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*58.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 4.2 \cdot 10^{-103}:\\ \;\;\;\;\left(2 \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left({a}^{2}, \sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right), b \cdot \left(b \cdot \left(-\sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right)\right)\right)\right)\\ \mathbf{elif}\;a \leq 1.55 \cdot 10^{+173}:\\ \;\;\;\;\cos \left({e}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\right) \cdot \left(b - a\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.5% 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 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\\ t_1 := \left(a - b\right) \cdot \left(b + a\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;t\_0 \cdot \left(2 \cdot \left(t\_1 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+205}:\\ \;\;\;\;t\_0 \cdot \left(2 \cdot \left(t\_1 \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0 \cdot \left(2 \cdot \left(t\_1 \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\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 (cos (expm1 (log1p (* PI (* angle_m 0.005555555555555556))))))
        (t_1 (* (- a b) (+ b a))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e-126)
      (*
       0.011111111111111112
       (+
        (* a (- (* angle_m (* PI (- b b))) (* a (* PI angle_m))))
        (* angle_m (* (pow b 2.0) PI))))
      (if (<= (/ angle_m 180.0) 5e+152)
        (* t_0 (* 2.0 (* t_1 (sin (* angle_m (/ PI -180.0))))))
        (if (<= (/ angle_m 180.0) 5e+205)
          (* t_0 (* 2.0 (* t_1 (sin (/ (* PI angle_m) 180.0)))))
          (*
           t_0
           (*
            2.0
            (* t_1 (sin (* -0.005555555555555556 (* PI angle_m))))))))))))
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 = cos(expm1(log1p((((double) M_PI) * (angle_m * 0.005555555555555556)))));
	double t_1 = (a - b) * (b + a);
	double tmp;
	if ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (((double) M_PI) * (b - b))) - (a * (((double) M_PI) * angle_m)))) + (angle_m * (pow(b, 2.0) * ((double) M_PI))));
	} else if ((angle_m / 180.0) <= 5e+152) {
		tmp = t_0 * (2.0 * (t_1 * sin((angle_m * (((double) M_PI) / -180.0)))));
	} else if ((angle_m / 180.0) <= 5e+205) {
		tmp = t_0 * (2.0 * (t_1 * sin(((((double) M_PI) * angle_m) / 180.0))));
	} else {
		tmp = t_0 * (2.0 * (t_1 * sin((-0.005555555555555556 * (((double) M_PI) * angle_m)))));
	}
	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 = Math.cos(Math.expm1(Math.log1p((Math.PI * (angle_m * 0.005555555555555556)))));
	double t_1 = (a - b) * (b + a);
	double tmp;
	if ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (Math.PI * (b - b))) - (a * (Math.PI * angle_m)))) + (angle_m * (Math.pow(b, 2.0) * Math.PI)));
	} else if ((angle_m / 180.0) <= 5e+152) {
		tmp = t_0 * (2.0 * (t_1 * Math.sin((angle_m * (Math.PI / -180.0)))));
	} else if ((angle_m / 180.0) <= 5e+205) {
		tmp = t_0 * (2.0 * (t_1 * Math.sin(((Math.PI * angle_m) / 180.0))));
	} else {
		tmp = t_0 * (2.0 * (t_1 * Math.sin((-0.005555555555555556 * (Math.PI * angle_m)))));
	}
	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 = math.cos(math.expm1(math.log1p((math.pi * (angle_m * 0.005555555555555556)))))
	t_1 = (a - b) * (b + a)
	tmp = 0
	if (angle_m / 180.0) <= 1e-126:
		tmp = 0.011111111111111112 * ((a * ((angle_m * (math.pi * (b - b))) - (a * (math.pi * angle_m)))) + (angle_m * (math.pow(b, 2.0) * math.pi)))
	elif (angle_m / 180.0) <= 5e+152:
		tmp = t_0 * (2.0 * (t_1 * math.sin((angle_m * (math.pi / -180.0)))))
	elif (angle_m / 180.0) <= 5e+205:
		tmp = t_0 * (2.0 * (t_1 * math.sin(((math.pi * angle_m) / 180.0))))
	else:
		tmp = t_0 * (2.0 * (t_1 * math.sin((-0.005555555555555556 * (math.pi * angle_m)))))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = cos(expm1(log1p(Float64(pi * Float64(angle_m * 0.005555555555555556)))))
	t_1 = Float64(Float64(a - b) * Float64(b + a))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e-126)
		tmp = Float64(0.011111111111111112 * Float64(Float64(a * Float64(Float64(angle_m * Float64(pi * Float64(b - b))) - Float64(a * Float64(pi * angle_m)))) + Float64(angle_m * Float64((b ^ 2.0) * pi))));
	elseif (Float64(angle_m / 180.0) <= 5e+152)
		tmp = Float64(t_0 * Float64(2.0 * Float64(t_1 * sin(Float64(angle_m * Float64(pi / -180.0))))));
	elseif (Float64(angle_m / 180.0) <= 5e+205)
		tmp = Float64(t_0 * Float64(2.0 * Float64(t_1 * sin(Float64(Float64(pi * angle_m) / 180.0)))));
	else
		tmp = Float64(t_0 * Float64(2.0 * Float64(t_1 * sin(Float64(-0.005555555555555556 * Float64(pi * angle_m))))));
	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[Cos[N[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e-126], N[(0.011111111111111112 * N[(N[(a * N[(N[(angle$95$m * N[(Pi * N[(b - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(N[Power[b, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+152], N[(t$95$0 * N[(2.0 * N[(t$95$1 * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+205], N[(t$95$0 * N[(2.0 * N[(t$95$1 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(2.0 * N[(t$95$1 * N[Sin[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $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 := \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\\
t_1 := \left(a - b\right) \cdot \left(b + a\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 10^{-126}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+152}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \left(t\_1 \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+205}:\\
\;\;\;\;t\_0 \cdot \left(2 \cdot \left(t\_1 \cdot \sin \left(\frac{\pi \cdot angle\_m}{180}\right)\right)\right)\\

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


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

    1. Initial program 57.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. Step-by-step derivation
      1. associate-*l*57.1%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 58.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.4%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares60.5%

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

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

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

    if 9.9999999999999995e-127 < (/.f64 angle #s(literal 180 binary64)) < 5e152

    1. Initial program 57.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. Simplified55.8%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod55.8%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/58.6%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times58.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval58.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times58.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/57.3%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/56.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod53.9%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt56.0%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u63.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine63.9%

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

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define63.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified63.9%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow263.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow263.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares73.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr73.2%

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

    if 5e152 < (/.f64 angle #s(literal 180 binary64)) < 5.0000000000000002e205

    1. Initial program 18.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. Simplified20.1%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod11.7%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt18.4%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u21.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine21.3%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr21.3%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define21.2%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified21.2%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow221.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow221.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares21.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr21.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. sqrt-unprod0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{\left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      13. sqrt-unprod27.5%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      14. add-sqr-sqrt41.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      15. *-commutative41.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      16. associate-*l/48.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    11. Applied egg-rr48.9%

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

    if 5.0000000000000002e205 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 18.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. Simplified17.1%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod0.0%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval0.0%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/0.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod29.0%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt23.6%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine20.3%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr20.3%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define20.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified20.3%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow220.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow220.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares25.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr25.8%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Taylor expanded in angle around inf 32.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \color{blue}{\left(\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification61.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\right)\right) + angle \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+205}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 59.0% accurate, 1.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}\;\frac{angle\_m}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 8.5 \cdot 10^{+18}:\\ \;\;\;\;\left(2 \cdot \cos \left(angle\_m \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left({a}^{2} - {b}^{2}\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 (<= (/ angle_m 180.0) 1e-126)
    (*
     0.011111111111111112
     (+
      (* a (- (* angle_m (* PI (- b b))) (* a (* PI angle_m))))
      (* angle_m (* (pow b 2.0) PI))))
    (if (<= (/ angle_m 180.0) 8.5e+18)
      (*
       (* 2.0 (cos (* angle_m (* PI (cbrt -1.7146776406035666e-7)))))
       (* (sin (* PI (* angle_m -0.005555555555555556))) (* (- a b) (+ b a))))
      (*
       2.0
       (*
        (cos (* -0.005555555555555556 (* PI angle_m)))
        (*
         (sin (* 0.005555555555555556 (* PI angle_m)))
         (- (pow a 2.0) (pow b 2.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 ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (((double) M_PI) * (b - b))) - (a * (((double) M_PI) * angle_m)))) + (angle_m * (pow(b, 2.0) * ((double) M_PI))));
	} else if ((angle_m / 180.0) <= 8.5e+18) {
		tmp = (2.0 * cos((angle_m * (((double) M_PI) * cbrt(-1.7146776406035666e-7))))) * (sin((((double) M_PI) * (angle_m * -0.005555555555555556))) * ((a - b) * (b + a)));
	} else {
		tmp = 2.0 * (cos((-0.005555555555555556 * (((double) M_PI) * angle_m))) * (sin((0.005555555555555556 * (((double) M_PI) * angle_m))) * (pow(a, 2.0) - pow(b, 2.0))));
	}
	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 ((angle_m / 180.0) <= 1e-126) {
		tmp = 0.011111111111111112 * ((a * ((angle_m * (Math.PI * (b - b))) - (a * (Math.PI * angle_m)))) + (angle_m * (Math.pow(b, 2.0) * Math.PI)));
	} else if ((angle_m / 180.0) <= 8.5e+18) {
		tmp = (2.0 * Math.cos((angle_m * (Math.PI * Math.cbrt(-1.7146776406035666e-7))))) * (Math.sin((Math.PI * (angle_m * -0.005555555555555556))) * ((a - b) * (b + a)));
	} else {
		tmp = 2.0 * (Math.cos((-0.005555555555555556 * (Math.PI * angle_m))) * (Math.sin((0.005555555555555556 * (Math.PI * angle_m))) * (Math.pow(a, 2.0) - Math.pow(b, 2.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(angle_m / 180.0) <= 1e-126)
		tmp = Float64(0.011111111111111112 * Float64(Float64(a * Float64(Float64(angle_m * Float64(pi * Float64(b - b))) - Float64(a * Float64(pi * angle_m)))) + Float64(angle_m * Float64((b ^ 2.0) * pi))));
	elseif (Float64(angle_m / 180.0) <= 8.5e+18)
		tmp = Float64(Float64(2.0 * cos(Float64(angle_m * Float64(pi * cbrt(-1.7146776406035666e-7))))) * Float64(sin(Float64(pi * Float64(angle_m * -0.005555555555555556))) * Float64(Float64(a - b) * Float64(b + a))));
	else
		tmp = Float64(2.0 * Float64(cos(Float64(-0.005555555555555556 * Float64(pi * angle_m))) * Float64(sin(Float64(0.005555555555555556 * Float64(pi * angle_m))) * Float64((a ^ 2.0) - (b ^ 2.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[(angle$95$m / 180.0), $MachinePrecision], 1e-126], N[(0.011111111111111112 * N[(N[(a * N[(N[(angle$95$m * N[(Pi * N[(b - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(N[Power[b, 2.0], $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 8.5e+18], N[(N[(2.0 * N[Cos[N[(angle$95$m * N[(Pi * N[Power[-1.7146776406035666e-7, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle$95$m * -0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[N[(-0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Power[a, 2.0], $MachinePrecision] - N[Power[b, 2.0], $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}\;\frac{angle\_m}{180} \leq 10^{-126}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\_m\right)\right) + angle\_m \cdot \left({b}^{2} \cdot \pi\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 8.5 \cdot 10^{+18}:\\
\;\;\;\;\left(2 \cdot \cos \left(angle\_m \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \left(angle\_m \cdot -0.005555555555555556\right)\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 9.9999999999999995e-127

    1. Initial program 57.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. Step-by-step derivation
      1. associate-*l*57.1%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 58.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.4%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares60.5%

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

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

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

    if 9.9999999999999995e-127 < (/.f64 angle #s(literal 180 binary64)) < 8.5e18

    1. Initial program 77.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. Simplified77.9%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt0.0%

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

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/77.9%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times77.9%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative77.9%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative77.9%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval77.9%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval77.9%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times77.9%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/77.9%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/77.9%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod77.9%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt77.9%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u77.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine77.7%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr77.7%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define77.7%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified77.7%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow277.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow277.7%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares92.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr92.4%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. add-cbrt-cube92.4%

        \[\leadsto \cos \color{blue}{\left(\sqrt[3]{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. pow1/392.4%

        \[\leadsto \cos \color{blue}{\left({\left(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{0.3333333333333333}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. expm1-log1p-u92.4%

        \[\leadsto \cos \left({\left(\left(\color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{0.3333333333333333}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. expm1-log1p-u92.4%

        \[\leadsto \cos \left({\left(\left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{0.3333333333333333}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      5. expm1-log1p-u92.4%

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

        \[\leadsto \cos \left({\color{blue}{\left({\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}^{3}\right)}}^{0.3333333333333333}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    11. Applied egg-rr92.4%

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

      \[\leadsto \color{blue}{2 \cdot \left(\cos \left(-1 \cdot \left(angle \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)\right) \cdot \left(\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right)} \]
    13. Step-by-step derivation
      1. associate-*r*92.5%

        \[\leadsto \color{blue}{\left(2 \cdot \cos \left(-1 \cdot \left(angle \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)\right)\right) \cdot \left(\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)} \]
      2. mul-1-neg92.5%

        \[\leadsto \left(2 \cdot \cos \color{blue}{\left(-angle \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)}\right) \cdot \left(\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right) \]
      3. cos-neg92.5%

        \[\leadsto \left(2 \cdot \color{blue}{\cos \left(angle \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)}\right) \cdot \left(\sin \left(-0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right) \]
      4. associate-*r*92.5%

        \[\leadsto \left(2 \cdot \cos \left(angle \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)\right) \cdot \left(\sin \color{blue}{\left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right) \]
    14. Simplified92.5%

      \[\leadsto \color{blue}{\left(2 \cdot \cos \left(angle \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)\right) \cdot \left(\sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)} \]

    if 8.5e18 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 26.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. Simplified24.8%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-exp-log0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(e^{\log \left(angle \cdot \frac{\pi}{-180}\right)}\right)} \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      2. add-sqr-sqrt0.0%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      3. sqrt-unprod25.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\sqrt{\left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      4. associate-*r/25.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      5. associate-*r/25.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      6. frac-times23.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      7. *-commutative23.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      8. *-commutative23.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      9. metadata-eval23.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      10. metadata-eval23.8%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      11. frac-times25.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      12. associate-*r/25.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      13. associate-*r/25.4%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      14. sqrt-unprod42.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      15. add-sqr-sqrt42.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      16. div-inv42.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
      17. metadata-eval42.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(e^{\log \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)}\right) \cdot \left(\left(a + b\right) \cdot \left(a - b\right)\right)\right)\right) \]
    5. Applied egg-rr31.8%

      \[\leadsto \cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Taylor expanded in angle around inf 40.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{-126}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\pi \cdot \left(b - b\right)\right) - a \cdot \left(\pi \cdot angle\right)\right) + angle \cdot \left({b}^{2} \cdot \pi\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 8.5 \cdot 10^{+18}:\\ \;\;\;\;\left(2 \cdot \cos \left(angle \cdot \left(\pi \cdot \sqrt[3]{-1.7146776406035666 \cdot 10^{-7}}\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot -0.005555555555555556\right)\right) \cdot \left(\left(a - b\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(-0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 58.9% accurate, 1.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}\;a \leq 1.55 \cdot 10^{+173}:\\ \;\;\;\;\cos \left({e}^{\log \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)}\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\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 (<= a 1.55e+173)
    (*
     (cos (pow E (log (* PI (* angle_m 0.005555555555555556)))))
     (* 2.0 (* (* (- a b) (+ b a)) (sin (* angle_m (/ PI -180.0))))))
    (* (* a 0.011111111111111112) (* (* PI angle_m) (- 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 (a <= 1.55e+173) {
		tmp = cos(pow(((double) M_E), log((((double) M_PI) * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * sin((angle_m * (((double) M_PI) / -180.0)))));
	} else {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (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 (a <= 1.55e+173) {
		tmp = Math.cos(Math.pow(Math.E, Math.log((Math.PI * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * Math.sin((angle_m * (Math.PI / -180.0)))));
	} else {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (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 a <= 1.55e+173:
		tmp = math.cos(math.pow(math.e, math.log((math.pi * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * math.sin((angle_m * (math.pi / -180.0)))))
	else:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (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 (a <= 1.55e+173)
		tmp = Float64(cos((exp(1) ^ log(Float64(pi * Float64(angle_m * 0.005555555555555556))))) * Float64(2.0 * Float64(Float64(Float64(a - b) * Float64(b + a)) * sin(Float64(angle_m * Float64(pi / -180.0))))));
	else
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * 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 (a <= 1.55e+173)
		tmp = cos((2.71828182845904523536 ^ log((pi * (angle_m * 0.005555555555555556))))) * (2.0 * (((a - b) * (b + a)) * sin((angle_m * (pi / -180.0)))));
	else
		tmp = (a * 0.011111111111111112) * ((pi * angle_m) * (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[a, 1.55e+173], N[(N[Cos[N[Power[E, N[Log[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(angle$95$m * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $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}\;a \leq 1.55 \cdot 10^{+173}:\\
\;\;\;\;\cos \left({e}^{\log \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)}\right) \cdot \left(2 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \sin \left(angle\_m \cdot \frac{\pi}{-180}\right)\right)\right)\\

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


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

    1. Initial program 54.1%

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

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt28.7%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod47.4%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/49.1%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative49.2%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative49.2%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval49.2%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval49.2%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times49.1%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/48.7%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/48.0%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod28.3%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt54.7%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u48.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine48.4%

        \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    5. Applied egg-rr48.4%

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define48.9%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified48.9%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow248.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow248.9%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.2%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.2%

      \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    10. Step-by-step derivation
      1. expm1-log1p-u59.3%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      2. rem-exp-log32.6%

        \[\leadsto \cos \color{blue}{\left(e^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      3. *-un-lft-identity32.6%

        \[\leadsto \cos \left(e^{\color{blue}{1 \cdot \log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right) \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
      4. exp-prod33.5%

        \[\leadsto \cos \color{blue}{\left({\left(e^{1}\right)}^{\log \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)} \cdot \left(2 \cdot \mathsf{fma}\left(b, \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot 0 - b \cdot \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right), \sin \left(\left(-0.005555555555555556 \cdot angle\right) \cdot \pi\right) \cdot {a}^{2}\right)\right) \]
    11. Applied egg-rr32.9%

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

    if 1.55e173 < a

    1. Initial program 38.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. Step-by-step derivation
      1. associate-*l*38.0%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 28.0%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow228.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow228.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*58.3%

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

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

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

Alternative 15: 59.7% accurate, 1.8× 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}^{2} \leq 2 \cdot 10^{+255}:\\ \;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\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 (<= (pow a 2.0) 2e+255)
    (*
     0.011111111111111112
     (-
      (* b (+ (* angle_m (* PI (- a a))) (* angle_m (* b PI))))
      (* (pow a 2.0) (* PI angle_m))))
    (* (* a 0.011111111111111112) (* (* PI angle_m) (- 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(a, 2.0) <= 2e+255) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (((double) M_PI) * (a - a))) + (angle_m * (b * ((double) M_PI))))) - (pow(a, 2.0) * (((double) M_PI) * angle_m)));
	} else {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (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(a, 2.0) <= 2e+255) {
		tmp = 0.011111111111111112 * ((b * ((angle_m * (Math.PI * (a - a))) + (angle_m * (b * Math.PI)))) - (Math.pow(a, 2.0) * (Math.PI * angle_m)));
	} else {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (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(a, 2.0) <= 2e+255:
		tmp = 0.011111111111111112 * ((b * ((angle_m * (math.pi * (a - a))) + (angle_m * (b * math.pi)))) - (math.pow(a, 2.0) * (math.pi * angle_m)))
	else:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (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 ((a ^ 2.0) <= 2e+255)
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * Float64(Float64(angle_m * Float64(pi * Float64(a - a))) + Float64(angle_m * Float64(b * pi)))) - Float64((a ^ 2.0) * Float64(pi * angle_m))));
	else
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * 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 ((a ^ 2.0) <= 2e+255)
		tmp = 0.011111111111111112 * ((b * ((angle_m * (pi * (a - a))) + (angle_m * (b * pi)))) - ((a ^ 2.0) * (pi * angle_m)));
	else
		tmp = (a * 0.011111111111111112) * ((pi * angle_m) * (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[Power[a, 2.0], $MachinePrecision], 2e+255], N[(0.011111111111111112 * N[(N[(b * N[(N[(angle$95$m * N[(Pi * N[(a - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[a, 2.0], $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $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}\;{a}^{2} \leq 2 \cdot 10^{+255}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a - a\right)\right) + angle\_m \cdot \left(b \cdot \pi\right)\right) - {a}^{2} \cdot \left(\pi \cdot angle\_m\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999998e255

    1. Initial program 58.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. Step-by-step derivation
      1. associate-*l*58.2%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 58.0%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow258.0%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares58.0%

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

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

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

    if 1.99999999999999998e255 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 37.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. Step-by-step derivation
      1. associate-*l*37.6%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 42.8%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow242.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow242.8%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares55.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*61.9%

        \[\leadsto \left(0.011111111111111112 \cdot a\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right)} \]
    11. Simplified61.9%

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

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

Alternative 16: 58.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}\;{a}^{2} \leq 2 \cdot 10^{+296}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\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 (<= (pow a 2.0) 2e+296)
    (* 0.011111111111111112 (* angle_m (* PI (* (- b a) (+ b a)))))
    (* (* a 0.011111111111111112) (* (* PI angle_m) (- 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(a, 2.0) <= 2e+296) {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((b - a) * (b + a))));
	} else {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (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(a, 2.0) <= 2e+296) {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((b - a) * (b + a))));
	} else {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (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(a, 2.0) <= 2e+296:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((b - a) * (b + a))))
	else:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (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 ((a ^ 2.0) <= 2e+296)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(b - a) * Float64(b + a)))));
	else
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * 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 ((a ^ 2.0) <= 2e+296)
		tmp = 0.011111111111111112 * (angle_m * (pi * ((b - a) * (b + a))));
	else
		tmp = (a * 0.011111111111111112) * ((pi * angle_m) * (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[Power[a, 2.0], $MachinePrecision], 2e+296], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $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}\;{a}^{2} \leq 2 \cdot 10^{+296}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999996e296

    1. Initial program 58.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. Step-by-step derivation
      1. associate-*l*58.0%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 58.4%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow258.4%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares58.4%

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

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

    if 1.99999999999999996e296 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 34.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*34.5%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 39.2%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares53.9%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*66.2%

        \[\leadsto \left(0.011111111111111112 \cdot a\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right)} \]
    11. Simplified66.2%

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

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

Alternative 17: 56.2% accurate, 23.3× 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 3.25 \cdot 10^{+150}:\\ \;\;\;\;-0.011111111111111112 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \left(\pi \cdot angle\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot 0.011111111111111112\right) \cdot \left(\left(\pi \cdot angle\_m\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 (<= a 3.25e+150)
    (* -0.011111111111111112 (* (* (- a b) (+ b a)) (* PI angle_m)))
    (* (* a 0.011111111111111112) (* (* PI angle_m) (- 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 (a <= 3.25e+150) {
		tmp = -0.011111111111111112 * (((a - b) * (b + a)) * (((double) M_PI) * angle_m));
	} else {
		tmp = (a * 0.011111111111111112) * ((((double) M_PI) * angle_m) * (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 (a <= 3.25e+150) {
		tmp = -0.011111111111111112 * (((a - b) * (b + a)) * (Math.PI * angle_m));
	} else {
		tmp = (a * 0.011111111111111112) * ((Math.PI * angle_m) * (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 a <= 3.25e+150:
		tmp = -0.011111111111111112 * (((a - b) * (b + a)) * (math.pi * angle_m))
	else:
		tmp = (a * 0.011111111111111112) * ((math.pi * angle_m) * (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 (a <= 3.25e+150)
		tmp = Float64(-0.011111111111111112 * Float64(Float64(Float64(a - b) * Float64(b + a)) * Float64(pi * angle_m)));
	else
		tmp = Float64(Float64(a * 0.011111111111111112) * Float64(Float64(pi * angle_m) * 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 (a <= 3.25e+150)
		tmp = -0.011111111111111112 * (((a - b) * (b + a)) * (pi * angle_m));
	else
		tmp = (a * 0.011111111111111112) * ((pi * angle_m) * (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[a, 3.25e+150], N[(-0.011111111111111112 * N[(N[(N[(a - b), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 0.011111111111111112), $MachinePrecision] * N[(N[(Pi * angle$95$m), $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}\;a \leq 3.25 \cdot 10^{+150}:\\
\;\;\;\;-0.011111111111111112 \cdot \left(\left(\left(a - b\right) \cdot \left(b + a\right)\right) \cdot \left(\pi \cdot angle\_m\right)\right)\\

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


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

    1. Initial program 54.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. Simplified54.5%

      \[\leadsto \color{blue}{\cos \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right)} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. add-sqr-sqrt28.5%

        \[\leadsto \cos \color{blue}{\left(\sqrt{angle \cdot \frac{\pi}{-180}} \cdot \sqrt{angle \cdot \frac{\pi}{-180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      2. sqrt-unprod47.8%

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

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180}} \cdot \left(angle \cdot \frac{\pi}{-180}\right)}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      4. associate-*r/49.5%

        \[\leadsto \cos \left(\sqrt{\frac{angle \cdot \pi}{-180} \cdot \color{blue}{\frac{angle \cdot \pi}{-180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      5. frac-times49.6%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      6. *-commutative49.6%

        \[\leadsto \cos \left(\sqrt{\frac{\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(angle \cdot \pi\right)}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      7. *-commutative49.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \color{blue}{\left(\pi \cdot angle\right)}}{-180 \cdot -180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      8. metadata-eval49.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{32400}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      9. metadata-eval49.6%

        \[\leadsto \cos \left(\sqrt{\frac{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}{\color{blue}{180 \cdot 180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      10. frac-times49.5%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\frac{\pi \cdot angle}{180} \cdot \frac{\pi \cdot angle}{180}}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      11. associate-*r/49.2%

        \[\leadsto \cos \left(\sqrt{\color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \frac{\pi \cdot angle}{180}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      12. associate-*r/48.4%

        \[\leadsto \cos \left(\sqrt{\left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}}\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      13. sqrt-unprod28.6%

        \[\leadsto \cos \color{blue}{\left(\sqrt{\pi \cdot \frac{angle}{180}} \cdot \sqrt{\pi \cdot \frac{angle}{180}}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      14. add-sqr-sqrt55.2%

        \[\leadsto \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      15. expm1-log1p-u49.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
      16. expm1-undefine48.9%

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

      \[\leadsto \cos \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    6. Step-by-step derivation
      1. expm1-define49.3%

        \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    7. Simplified49.3%

      \[\leadsto \cos \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left({a}^{2} - {b}^{2}\right)\right)\right) \]
    8. Step-by-step derivation
      1. unpow249.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(\color{blue}{a \cdot a} - {b}^{2}\right)\right)\right) \]
      2. unpow249.3%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(a \cdot a - \color{blue}{b \cdot b}\right)\right)\right) \]
      3. difference-of-squares51.6%

        \[\leadsto \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \left(2 \cdot \left(\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \color{blue}{\left(\left(a + b\right) \cdot \left(a - b\right)\right)}\right)\right) \]
    9. Applied egg-rr51.6%

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

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

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

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

    if 3.25000000000000016e150 < a

    1. Initial program 35.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. Step-by-step derivation
      1. associate-*l*35.6%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 29.3%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow229.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares45.3%

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

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

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

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

        \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot a\right) \cdot \left(angle \cdot \left(\pi \cdot \left(b - a\right)\right)\right)} \]
      2. associate-*r*57.8%

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

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

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

Alternative 18: 45.0% accurate, 26.2× 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 1.32 \cdot 10^{-45}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\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 1.32e-45)
    (* 0.011111111111111112 (* angle_m (* PI (* b (- b a)))))
    (* 0.011111111111111112 (* a (* (* PI angle_m) (- 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 (a <= 1.32e-45) {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * (b * (b - a))));
	} else {
		tmp = 0.011111111111111112 * (a * ((((double) M_PI) * angle_m) * (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 (a <= 1.32e-45) {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * (b * (b - a))));
	} else {
		tmp = 0.011111111111111112 * (a * ((Math.PI * angle_m) * (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 a <= 1.32e-45:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * (b * (b - a))))
	else:
		tmp = 0.011111111111111112 * (a * ((math.pi * angle_m) * (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 (a <= 1.32e-45)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(b * Float64(b - a)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(a * Float64(Float64(pi * angle_m) * 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 (a <= 1.32e-45)
		tmp = 0.011111111111111112 * (angle_m * (pi * (b * (b - a))));
	else
		tmp = 0.011111111111111112 * (a * ((pi * angle_m) * (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[a, 1.32e-45], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(b * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(a * N[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - 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 \begin{array}{l}
\mathbf{if}\;a \leq 1.32 \cdot 10^{-45}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 1.32000000000000005e-45

    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. Step-by-step derivation
      1. associate-*l*55.5%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 58.3%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow258.3%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares60.5%

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

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

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

    if 1.32000000000000005e-45 < a

    1. Initial program 44.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. Step-by-step derivation
      1. associate-*l*44.3%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in angle around 0 42.5%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    6. Step-by-step derivation
      1. unpow242.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\color{blue}{b \cdot b} - {a}^{2}\right)\right)\right) \]
      2. unpow242.5%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares49.3%

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

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

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

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

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

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

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

Alternative 19: 41.6% accurate, 38.1× 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(\left(\pi \cdot angle\_m\right) \cdot \left(b - 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) (- b 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) * (b - 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) * (b - 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) * (b - 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(Float64(pi * angle_m) * Float64(b - 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) * (b - 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[(N[(Pi * angle$95$m), $MachinePrecision] * N[(b - 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(\left(\pi \cdot angle\_m\right) \cdot \left(b - a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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. Step-by-step derivation
    1. associate-*l*52.2%

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in angle around 0 53.6%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
    3. difference-of-squares57.3%

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

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(a \cdot \left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right)\right)} \]
  12. Final simplification39.8%

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

Alternative 20: 21.4% accurate, 46.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(angle\_m \cdot \left(\pi \cdot \left(b \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 (* angle_m (* PI (* b 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 * (angle_m * (((double) M_PI) * (b * 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 * (angle_m * (Math.PI * (b * 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 * (angle_m * (math.pi * (b * 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(angle_m * Float64(pi * Float64(b * 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 * (angle_m * (pi * (b * 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[(angle$95$m * N[(Pi * N[(b * 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(angle\_m \cdot \left(\pi \cdot \left(b \cdot a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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. Step-by-step derivation
    1. associate-*l*52.2%

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in angle around 0 53.6%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
    3. difference-of-squares57.3%

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

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

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

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

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

Alternative 21: 21.4% accurate, 46.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(angle\_m \cdot \left(a \cdot \left(b \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 (* angle_m (* a (* b 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 * (angle_m * (a * (b * ((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 * (angle_m * (a * (b * 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 * (angle_m * (a * (b * 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(angle_m * Float64(a * Float64(b * 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 * (angle_m * (a * (b * 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[(angle$95$m * N[(a * N[(b * 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(angle\_m \cdot \left(a \cdot \left(b \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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. Step-by-step derivation
    1. associate-*l*52.2%

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in angle around 0 53.6%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
    3. difference-of-squares57.3%

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(a \cdot \left(b \cdot \pi\right)\right)}\right) \]
  10. Step-by-step derivation
    1. *-commutative19.7%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right) \]
  11. Simplified19.7%

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

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

Alternative 22: 20.4% accurate, 46.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(angle\_m \cdot \left(b \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 (* angle_m (* b 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 * (angle_m * (b * ((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 * (angle_m * (b * 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 * (angle_m * (b * 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(angle_m * Float64(b * 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 * (angle_m * (b * 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[(angle$95$m * N[(b * 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(angle\_m \cdot \left(b \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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. Step-by-step derivation
    1. associate-*l*52.2%

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in angle around 0 53.6%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
    3. difference-of-squares57.3%

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

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

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

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)} \]
  10. Step-by-step derivation
    1. *-commutative19.4%

      \[\leadsto 0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot b\right)}\right)\right) \]
  11. Simplified19.4%

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

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

Reproduce

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