ab-angle->ABCF B

Percentage Accurate: 54.2% → 60.1%
Time: 27.9s
Alternatives: 14
Speedup: 5.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 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.2% 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: 60.1% accurate, 0.5× 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(b + a\right) \cdot \left(b - a\right)\right)\\ t_1 := \pi \cdot \frac{angle_m}{180}\\ t_2 := {b}^{2} - {a}^{2}\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;t_2 \leq 10^{+306}:\\ \;\;\;\;\left(t_0 \cdot \sin t_1\right) \cdot \cos \left(\frac{angle_m}{180} \cdot {\left({\left(\sqrt[3]{\sqrt{\pi}}\right)}^{3}\right)}^{2}\right)\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos t_1\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a))))
        (t_1 (* PI (/ angle_m 180.0)))
        (t_2 (- (pow b 2.0) (pow a 2.0))))
   (*
    angle_s
    (if (<= t_2 1e+306)
      (*
       (* t_0 (sin t_1))
       (cos (* (/ angle_m 180.0) (pow (pow (cbrt (sqrt PI)) 3.0) 2.0))))
      (if (<= t_2 INFINITY)
        (*
         (pow
          (*
           (sqrt (sin (* 0.005555555555555556 (* PI angle_m))))
           (* b (sqrt 2.0)))
          2.0)
         (cos t_1))
        (*
         (* t_0 (sin (* (/ angle_m 180.0) (cbrt (pow PI 3.0)))))
         (cos (expm1 (log1p (* PI (* angle_m 0.005555555555555556)))))))))))
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 * ((b + a) * (b - a));
	double t_1 = ((double) M_PI) * (angle_m / 180.0);
	double t_2 = pow(b, 2.0) - pow(a, 2.0);
	double tmp;
	if (t_2 <= 1e+306) {
		tmp = (t_0 * sin(t_1)) * cos(((angle_m / 180.0) * pow(pow(cbrt(sqrt(((double) M_PI))), 3.0), 2.0)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = pow((sqrt(sin((0.005555555555555556 * (((double) M_PI) * angle_m)))) * (b * sqrt(2.0))), 2.0) * cos(t_1);
	} else {
		tmp = (t_0 * sin(((angle_m / 180.0) * cbrt(pow(((double) M_PI), 3.0))))) * cos(expm1(log1p((((double) M_PI) * (angle_m * 0.005555555555555556)))));
	}
	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 * ((b + a) * (b - a));
	double t_1 = Math.PI * (angle_m / 180.0);
	double t_2 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double tmp;
	if (t_2 <= 1e+306) {
		tmp = (t_0 * Math.sin(t_1)) * Math.cos(((angle_m / 180.0) * Math.pow(Math.pow(Math.cbrt(Math.sqrt(Math.PI)), 3.0), 2.0)));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = Math.pow((Math.sqrt(Math.sin((0.005555555555555556 * (Math.PI * angle_m)))) * (b * Math.sqrt(2.0))), 2.0) * Math.cos(t_1);
	} else {
		tmp = (t_0 * Math.sin(((angle_m / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0))))) * Math.cos(Math.expm1(Math.log1p((Math.PI * (angle_m * 0.005555555555555556)))));
	}
	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(b + a) * Float64(b - a)))
	t_1 = Float64(pi * Float64(angle_m / 180.0))
	t_2 = Float64((b ^ 2.0) - (a ^ 2.0))
	tmp = 0.0
	if (t_2 <= 1e+306)
		tmp = Float64(Float64(t_0 * sin(t_1)) * cos(Float64(Float64(angle_m / 180.0) * ((cbrt(sqrt(pi)) ^ 3.0) ^ 2.0))));
	elseif (t_2 <= Inf)
		tmp = Float64((Float64(sqrt(sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) * Float64(b * sqrt(2.0))) ^ 2.0) * cos(t_1));
	else
		tmp = Float64(Float64(t_0 * sin(Float64(Float64(angle_m / 180.0) * cbrt((pi ^ 3.0))))) * cos(expm1(log1p(Float64(pi * Float64(angle_m * 0.005555555555555556))))));
	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[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$2, 1e+306], N[(N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Power[N[Power[N[Sqrt[Pi], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[Power[N[(N[Sqrt[N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_1 := \pi \cdot \frac{angle_m}{180}\\
t_2 := {b}^{2} - {a}^{2}\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;t_2 \leq 10^{+306}:\\
\;\;\;\;\left(t_0 \cdot \sin t_1\right) \cdot \cos \left(\frac{angle_m}{180} \cdot {\left({\left(\sqrt[3]{\sqrt{\pi}}\right)}^{3}\right)}^{2}\right)\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos t_1\\

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 1.00000000000000002e306

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

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. add-cube-cbrt57.0%

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

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

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

    if 1.00000000000000002e306 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < +inf.0

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

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

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

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

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

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. associate-*r*47.1%

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

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

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

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

        \[\leadsto \left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified49.1%

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

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

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

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

        \[\leadsto {\left(\sqrt{\left(2 \cdot {b}^{2}\right) \cdot \color{blue}{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. sqrt-prod18.4%

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

        \[\leadsto {\left(\sqrt{\color{blue}{{b}^{2} \cdot 2}} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      7. sqrt-prod18.4%

        \[\leadsto {\left(\color{blue}{\left(\sqrt{{b}^{2}} \cdot \sqrt{2}\right)} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. unpow218.4%

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

        \[\leadsto {\left(\left(\color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      10. add-sqr-sqrt19.5%

        \[\leadsto {\left(\left(\color{blue}{b} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. rem-log-exp48.3%

        \[\leadsto {\left(\left(b \cdot \sqrt{2}\right) \cdot \sqrt{\color{blue}{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    8. Applied egg-rr48.3%

      \[\leadsto \color{blue}{{\left(\left(b \cdot \sqrt{2}\right) \cdot \sqrt{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    9. Step-by-step derivation
      1. *-commutative48.3%

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

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

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

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

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

    if +inf.0 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    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. Step-by-step derivation
      1. unpow20.0%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. div-inv69.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq 10^{+306}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot {\left({\left(\sqrt[3]{\sqrt{\pi}}\right)}^{3}\right)}^{2}\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \]

Alternative 2: 60.0% accurate, 0.5× 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(b + a\right) \cdot \left(b - a\right)\right)\\ t_1 := {b}^{2} - {a}^{2}\\ t_2 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;t_1 \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t_2\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle_m}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_2\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a))))
        (t_1 (- (pow b 2.0) (pow a 2.0)))
        (t_2 (* PI (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= t_1 2e+266)
      (* (* t_0 (expm1 (log1p (sin t_2)))) (cos (/ angle_m (/ 180.0 PI))))
      (if (<= t_1 INFINITY)
        (*
         (pow
          (*
           (sqrt (sin (* 0.005555555555555556 (* PI angle_m))))
           (* b (sqrt 2.0)))
          2.0)
         (cos (* PI (/ angle_m 180.0))))
        (*
         (* t_0 (sin (* (/ angle_m 180.0) (cbrt (pow PI 3.0)))))
         (cos (expm1 (log1p 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 = 2.0 * ((b + a) * (b - a));
	double t_1 = pow(b, 2.0) - pow(a, 2.0);
	double t_2 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double tmp;
	if (t_1 <= 2e+266) {
		tmp = (t_0 * expm1(log1p(sin(t_2)))) * cos((angle_m / (180.0 / ((double) M_PI))));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = pow((sqrt(sin((0.005555555555555556 * (((double) M_PI) * angle_m)))) * (b * sqrt(2.0))), 2.0) * cos((((double) M_PI) * (angle_m / 180.0)));
	} else {
		tmp = (t_0 * sin(((angle_m / 180.0) * cbrt(pow(((double) M_PI), 3.0))))) * cos(expm1(log1p(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 = 2.0 * ((b + a) * (b - a));
	double t_1 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double t_2 = Math.PI * (angle_m * 0.005555555555555556);
	double tmp;
	if (t_1 <= 2e+266) {
		tmp = (t_0 * Math.expm1(Math.log1p(Math.sin(t_2)))) * Math.cos((angle_m / (180.0 / Math.PI)));
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = Math.pow((Math.sqrt(Math.sin((0.005555555555555556 * (Math.PI * angle_m)))) * (b * Math.sqrt(2.0))), 2.0) * Math.cos((Math.PI * (angle_m / 180.0)));
	} else {
		tmp = (t_0 * Math.sin(((angle_m / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.0))))) * Math.cos(Math.expm1(Math.log1p(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(2.0 * Float64(Float64(b + a) * Float64(b - a)))
	t_1 = Float64((b ^ 2.0) - (a ^ 2.0))
	t_2 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (t_1 <= 2e+266)
		tmp = Float64(Float64(t_0 * expm1(log1p(sin(t_2)))) * cos(Float64(angle_m / Float64(180.0 / pi))));
	elseif (t_1 <= Inf)
		tmp = Float64((Float64(sqrt(sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) * Float64(b * sqrt(2.0))) ^ 2.0) * cos(Float64(pi * Float64(angle_m / 180.0))));
	else
		tmp = Float64(Float64(t_0 * sin(Float64(Float64(angle_m / 180.0) * cbrt((pi ^ 3.0))))) * cos(expm1(log1p(t_2))));
	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[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $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[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$1, 2e+266], N[(N[(t$95$0 * N[(Exp[N[Log[1 + N[Sin[t$95$2], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle$95$m / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[Power[N[(N[Sqrt[N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Cos[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Exp[N[Log[1 + t$95$2], $MachinePrecision]] - 1), $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_1 := {b}^{2} - {a}^{2}\\
t_2 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+266}:\\
\;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t_2\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle_m}{180}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \sin \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_2\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 2.0000000000000001e266

    1. Initial program 56.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. Step-by-step derivation
      1. unpow256.4%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. associate-*r/54.9%

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt[3]{{\pi}^{3}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\frac{angle}{\frac{180}{\pi}}\right)} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube58.1%

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

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

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

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

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

    if 2.0000000000000001e266 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < +inf.0

    1. Initial program 46.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. unpow246.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. associate-*r*47.0%

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

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

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

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

        \[\leadsto \left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified48.7%

      \[\leadsto \color{blue}{\left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.0%

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

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

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

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{b}^{2} \cdot 2}} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      7. sqrt-prod16.2%

        \[\leadsto {\left(\color{blue}{\left(\sqrt{{b}^{2}} \cdot \sqrt{2}\right)} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. unpow216.2%

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

        \[\leadsto {\left(\left(\color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      10. add-sqr-sqrt17.3%

        \[\leadsto {\left(\left(\color{blue}{b} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. rem-log-exp44.0%

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

      \[\leadsto \color{blue}{{\left(\left(b \cdot \sqrt{2}\right) \cdot \sqrt{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    9. Step-by-step derivation
      1. *-commutative44.0%

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

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

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

        \[\leadsto {\left(\sqrt{\sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    10. Simplified42.7%

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

    if +inf.0 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    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. Step-by-step derivation
      1. unpow20.0%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. div-inv69.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot \cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \]

Alternative 3: 60.0% accurate, 0.5× 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(b + a\right) \cdot \left(b - a\right)\right)\\ t_1 := {b}^{2} - {a}^{2}\\ t_2 := \pi \cdot \frac{angle_m}{180}\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;t_1 \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos t_2\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \sin t_2\right) \cdot \cos \left(\frac{angle_m}{180} \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a))))
        (t_1 (- (pow b 2.0) (pow a 2.0)))
        (t_2 (* PI (/ angle_m 180.0))))
   (*
    angle_s
    (if (<= t_1 2e+266)
      (*
       (* t_0 (expm1 (log1p (sin (* PI (* angle_m 0.005555555555555556))))))
       (cos (/ angle_m (/ 180.0 PI))))
      (if (<= t_1 INFINITY)
        (*
         (pow
          (*
           (sqrt (sin (* 0.005555555555555556 (* PI angle_m))))
           (* b (sqrt 2.0)))
          2.0)
         (cos t_2))
        (*
         (* t_0 (sin t_2))
         (cos (* (/ angle_m 180.0) (pow (cbrt (pow PI 1.5)) 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 t_0 = 2.0 * ((b + a) * (b - a));
	double t_1 = pow(b, 2.0) - pow(a, 2.0);
	double t_2 = ((double) M_PI) * (angle_m / 180.0);
	double tmp;
	if (t_1 <= 2e+266) {
		tmp = (t_0 * expm1(log1p(sin((((double) M_PI) * (angle_m * 0.005555555555555556)))))) * cos((angle_m / (180.0 / ((double) M_PI))));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = pow((sqrt(sin((0.005555555555555556 * (((double) M_PI) * angle_m)))) * (b * sqrt(2.0))), 2.0) * cos(t_2);
	} else {
		tmp = (t_0 * sin(t_2)) * cos(((angle_m / 180.0) * pow(cbrt(pow(((double) M_PI), 1.5)), 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 t_0 = 2.0 * ((b + a) * (b - a));
	double t_1 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double t_2 = Math.PI * (angle_m / 180.0);
	double tmp;
	if (t_1 <= 2e+266) {
		tmp = (t_0 * Math.expm1(Math.log1p(Math.sin((Math.PI * (angle_m * 0.005555555555555556)))))) * Math.cos((angle_m / (180.0 / Math.PI)));
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = Math.pow((Math.sqrt(Math.sin((0.005555555555555556 * (Math.PI * angle_m)))) * (b * Math.sqrt(2.0))), 2.0) * Math.cos(t_2);
	} else {
		tmp = (t_0 * Math.sin(t_2)) * Math.cos(((angle_m / 180.0) * Math.pow(Math.cbrt(Math.pow(Math.PI, 1.5)), 2.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(b + a) * Float64(b - a)))
	t_1 = Float64((b ^ 2.0) - (a ^ 2.0))
	t_2 = Float64(pi * Float64(angle_m / 180.0))
	tmp = 0.0
	if (t_1 <= 2e+266)
		tmp = Float64(Float64(t_0 * expm1(log1p(sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))))) * cos(Float64(angle_m / Float64(180.0 / pi))));
	elseif (t_1 <= Inf)
		tmp = Float64((Float64(sqrt(sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) * Float64(b * sqrt(2.0))) ^ 2.0) * cos(t_2));
	else
		tmp = Float64(Float64(t_0 * sin(t_2)) * cos(Float64(Float64(angle_m / 180.0) * (cbrt((pi ^ 1.5)) ^ 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_] := Block[{t$95$0 = N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $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[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$1, 2e+266], N[(N[(t$95$0 * N[(Exp[N[Log[1 + N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle$95$m / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[Power[N[(N[Sqrt[N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Power[N[Power[Pi, 1.5], $MachinePrecision], 1/3], $MachinePrecision], 2.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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_1 := {b}^{2} - {a}^{2}\\
t_2 := \pi \cdot \frac{angle_m}{180}\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+266}:\\
\;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos t_2\\

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \sin t_2\right) \cdot \cos \left(\frac{angle_m}{180} \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 2.0000000000000001e266

    1. Initial program 56.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. Step-by-step derivation
      1. unpow256.4%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. associate-*r/54.9%

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt[3]{{\pi}^{3}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\frac{angle}{\frac{180}{\pi}}\right)} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube58.1%

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

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

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

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

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

    if 2.0000000000000001e266 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < +inf.0

    1. Initial program 46.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. unpow246.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. associate-*r*47.0%

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

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

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

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

        \[\leadsto \left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified48.7%

      \[\leadsto \color{blue}{\left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.0%

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

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

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

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{b}^{2} \cdot 2}} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      7. sqrt-prod16.2%

        \[\leadsto {\left(\color{blue}{\left(\sqrt{{b}^{2}} \cdot \sqrt{2}\right)} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. unpow216.2%

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

        \[\leadsto {\left(\left(\color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      10. add-sqr-sqrt17.3%

        \[\leadsto {\left(\left(\color{blue}{b} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. rem-log-exp44.0%

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

      \[\leadsto \color{blue}{{\left(\left(b \cdot \sqrt{2}\right) \cdot \sqrt{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    9. Step-by-step derivation
      1. *-commutative44.0%

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

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

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

        \[\leadsto {\left(\sqrt{\sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    10. Simplified42.7%

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

    if +inf.0 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    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. Step-by-step derivation
      1. unpow20.0%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. add-cbrt-cube50.6%

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left({\left({\left({\pi}^{\left(3 \cdot 0.3333333333333333\right)} \cdot \color{blue}{{\pi}^{0.5}}\right)}^{0.3333333333333333}\right)}^{2} \cdot \frac{angle}{180}\right) \]
      7. pow-prod-up50.6%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left({\left({\left({\pi}^{\left(\color{blue}{1} + 0.5\right)}\right)}^{0.3333333333333333}\right)}^{2} \cdot \frac{angle}{180}\right) \]
      9. metadata-eval50.6%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left({\left({\left({\pi}^{\color{blue}{1.5}}\right)}^{0.3333333333333333}\right)}^{2} \cdot \frac{angle}{180}\right) \]
    7. Applied egg-rr50.6%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left({\color{blue}{\left({\left({\pi}^{1.5}\right)}^{0.3333333333333333}\right)}}^{2} \cdot \frac{angle}{180}\right) \]
    8. Step-by-step derivation
      1. unpow1/375.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot {\left(\sqrt[3]{{\pi}^{1.5}}\right)}^{2}\right)\\ \end{array} \]

Alternative 4: 59.9% accurate, 0.5× 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(b + a\right) \cdot \left(b - a\right)\right)\\ t_1 := {b}^{2} - {a}^{2}\\ t_2 := \pi \cdot \frac{angle_m}{180}\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;t_1 \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos t_2\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \sin t_2\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a))))
        (t_1 (- (pow b 2.0) (pow a 2.0)))
        (t_2 (* PI (/ angle_m 180.0))))
   (*
    angle_s
    (if (<= t_1 2e+266)
      (*
       (* t_0 (expm1 (log1p (sin (* PI (* angle_m 0.005555555555555556))))))
       (cos (/ angle_m (/ 180.0 PI))))
      (if (<= t_1 INFINITY)
        (*
         (pow
          (*
           (sqrt (sin (* 0.005555555555555556 (* PI angle_m))))
           (* b (sqrt 2.0)))
          2.0)
         (cos t_2))
        (*
         (* t_0 (sin t_2))
         (cos (* (/ angle_m 180.0) (cbrt (pow PI 3.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 * ((b + a) * (b - a));
	double t_1 = pow(b, 2.0) - pow(a, 2.0);
	double t_2 = ((double) M_PI) * (angle_m / 180.0);
	double tmp;
	if (t_1 <= 2e+266) {
		tmp = (t_0 * expm1(log1p(sin((((double) M_PI) * (angle_m * 0.005555555555555556)))))) * cos((angle_m / (180.0 / ((double) M_PI))));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = pow((sqrt(sin((0.005555555555555556 * (((double) M_PI) * angle_m)))) * (b * sqrt(2.0))), 2.0) * cos(t_2);
	} else {
		tmp = (t_0 * sin(t_2)) * cos(((angle_m / 180.0) * cbrt(pow(((double) M_PI), 3.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 * ((b + a) * (b - a));
	double t_1 = Math.pow(b, 2.0) - Math.pow(a, 2.0);
	double t_2 = Math.PI * (angle_m / 180.0);
	double tmp;
	if (t_1 <= 2e+266) {
		tmp = (t_0 * Math.expm1(Math.log1p(Math.sin((Math.PI * (angle_m * 0.005555555555555556)))))) * Math.cos((angle_m / (180.0 / Math.PI)));
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = Math.pow((Math.sqrt(Math.sin((0.005555555555555556 * (Math.PI * angle_m)))) * (b * Math.sqrt(2.0))), 2.0) * Math.cos(t_2);
	} else {
		tmp = (t_0 * Math.sin(t_2)) * Math.cos(((angle_m / 180.0) * Math.cbrt(Math.pow(Math.PI, 3.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(b + a) * Float64(b - a)))
	t_1 = Float64((b ^ 2.0) - (a ^ 2.0))
	t_2 = Float64(pi * Float64(angle_m / 180.0))
	tmp = 0.0
	if (t_1 <= 2e+266)
		tmp = Float64(Float64(t_0 * expm1(log1p(sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))))) * cos(Float64(angle_m / Float64(180.0 / pi))));
	elseif (t_1 <= Inf)
		tmp = Float64((Float64(sqrt(sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))) * Float64(b * sqrt(2.0))) ^ 2.0) * cos(t_2));
	else
		tmp = Float64(Float64(t_0 * sin(t_2)) * cos(Float64(Float64(angle_m / 180.0) * cbrt((pi ^ 3.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[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $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[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[t$95$1, 2e+266], N[(N[(t$95$0 * N[(Exp[N[Log[1 + N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle$95$m / N[(180.0 / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[Power[N[(N[Sqrt[N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(b * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[Sin[t$95$2], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_1 := {b}^{2} - {a}^{2}\\
t_2 := \pi \cdot \frac{angle_m}{180}\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+266}:\\
\;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos t_2\\

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \sin t_2\right) \cdot \cos \left(\frac{angle_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 2.0000000000000001e266

    1. Initial program 56.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. Step-by-step derivation
      1. unpow256.4%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. associate-*r/54.9%

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt[3]{{\pi}^{3}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\frac{angle}{\frac{180}{\pi}}\right)} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube58.1%

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

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

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

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

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

    if 2.0000000000000001e266 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < +inf.0

    1. Initial program 46.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. unpow246.9%

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

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

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

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

      \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    5. Step-by-step derivation
      1. associate-*r*47.0%

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

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

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

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

        \[\leadsto \left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Simplified48.7%

      \[\leadsto \color{blue}{\left(\left(2 \cdot {b}^{2}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.0%

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

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

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

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

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

        \[\leadsto {\left(\sqrt{\color{blue}{{b}^{2} \cdot 2}} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      7. sqrt-prod16.2%

        \[\leadsto {\left(\color{blue}{\left(\sqrt{{b}^{2}} \cdot \sqrt{2}\right)} \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      8. unpow216.2%

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

        \[\leadsto {\left(\left(\color{blue}{\left(\sqrt{b} \cdot \sqrt{b}\right)} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      10. add-sqr-sqrt17.3%

        \[\leadsto {\left(\left(\color{blue}{b} \cdot \sqrt{2}\right) \cdot \sqrt{\log \left(e^{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      11. rem-log-exp44.0%

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

      \[\leadsto \color{blue}{{\left(\left(b \cdot \sqrt{2}\right) \cdot \sqrt{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    9. Step-by-step derivation
      1. *-commutative44.0%

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

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

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

        \[\leadsto {\left(\sqrt{\sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    10. Simplified42.7%

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

    if +inf.0 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    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. Step-by-step derivation
      1. unpow20.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} - {a}^{2} \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)\\ \mathbf{elif}\;{b}^{2} - {a}^{2} \leq \infty:\\ \;\;\;\;{\left(\sqrt{\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)} \cdot \left(b \cdot \sqrt{2}\right)\right)}^{2} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\\ \end{array} \]

Alternative 5: 57.8% accurate, 1.0× 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(b + a\right) \cdot \left(b - a\right)\right)\\ t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle_m}{180} \leq 10^{+49}:\\ \;\;\;\;\cos \left(\pi \cdot \frac{angle_m}{180}\right) \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+190}:\\ \;\;\;\;t_0 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t_1\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a))))
        (t_1 (* PI (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e+49)
      (*
       (cos (* PI (/ angle_m 180.0)))
       (* t_0 (sin (* 0.005555555555555556 (* PI angle_m)))))
      (if (<= (/ angle_m 180.0) 2e+190)
        (* t_0 (sin (pow (cbrt t_1) 3.0)))
        (*
         (* t_0 (expm1 (log1p (sin t_1))))
         (cos (/ angle_m (/ 180.0 PI)))))))))
angle_m = fabs(angle);
angle_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = 2.0 * ((b + a) * (b - a));
	double t_1 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = cos((((double) M_PI) * (angle_m / 180.0))) * (t_0 * sin((0.005555555555555556 * (((double) M_PI) * angle_m))));
	} else if ((angle_m / 180.0) <= 2e+190) {
		tmp = t_0 * sin(pow(cbrt(t_1), 3.0));
	} else {
		tmp = (t_0 * expm1(log1p(sin(t_1)))) * cos((angle_m / (180.0 / ((double) M_PI))));
	}
	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 * ((b + a) * (b - a));
	double t_1 = Math.PI * (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = Math.cos((Math.PI * (angle_m / 180.0))) * (t_0 * Math.sin((0.005555555555555556 * (Math.PI * angle_m))));
	} else if ((angle_m / 180.0) <= 2e+190) {
		tmp = t_0 * Math.sin(Math.pow(Math.cbrt(t_1), 3.0));
	} else {
		tmp = (t_0 * Math.expm1(Math.log1p(Math.sin(t_1)))) * Math.cos((angle_m / (180.0 / Math.PI)));
	}
	return angle_s * tmp;
}
angle_m = abs(angle)
angle_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(2.0 * Float64(Float64(b + a) * Float64(b - a)))
	t_1 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e+49)
		tmp = Float64(cos(Float64(pi * Float64(angle_m / 180.0))) * Float64(t_0 * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))));
	elseif (Float64(angle_m / 180.0) <= 2e+190)
		tmp = Float64(t_0 * sin((cbrt(t_1) ^ 3.0)));
	else
		tmp = Float64(Float64(t_0 * expm1(log1p(sin(t_1)))) * cos(Float64(angle_m / Float64(180.0 / pi))));
	end
	return Float64(angle_s * tmp)
end
angle_m = N[Abs[angle], $MachinePrecision]
angle_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+49], N[(N[Cos[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+190], N[(t$95$0 * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[(Exp[N[Log[1 + N[Sin[t$95$1], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle$95$m / N[(180.0 / Pi), $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle_m}{180} \leq 10^{+49}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle_m}{180}\right) \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+190}:\\
\;\;\;\;t_0 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin t_1\right)\right)\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < 9.99999999999999946e48

    1. Initial program 53.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. Step-by-step derivation
      1. unpow253.8%

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle 180) < 2.0000000000000001e190

    1. Initial program 35.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. Step-by-step derivation
      1. unpow235.8%

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \pi\right)\right) \cdot 1 \]
      3. metadata-eval33.4%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi\right)\right) \cdot 1 \]
      5. associate-*r*29.3%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot 1 \]
      6. add-cube-cbrt46.0%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)} \cdot \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right) \cdot \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}\right) \cdot 1 \]
      7. pow350.1%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(angle \cdot \pi\right) \cdot 0.005555555555555556}}\right)}^{3}\right)\right) \cdot 1 \]
      9. *-commutative50.1%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556}\right)}^{3}\right)\right) \cdot 1 \]
      10. associate-*r*45.2%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}\right)}^{3}\right)\right) \cdot 1 \]
    6. Applied egg-rr45.2%

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

    if 2.0000000000000001e190 < (/.f64 angle 180)

    1. Initial program 31.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. unpow231.6%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. associate-*r/36.1%

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt[3]{{\pi}^{3}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\frac{angle}{\frac{180}{\pi}}\right)} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube47.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+49}:\\ \;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+190}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \cdot \cos \left(\frac{angle}{\frac{180}{\pi}}\right)\\ \end{array} \]

Alternative 6: 56.3% accurate, 1.4× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ t_1 := \pi \cdot \frac{angle_m}{180}\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+83}:\\ \;\;\;\;\cos t_1 \cdot \left(t_0 \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+204}:\\ \;\;\;\;t_0 \cdot \left|\sin \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left(t_0 \cdot \sin t_1\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a)))) (t_1 (* PI (/ angle_m 180.0))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 5e+83)
      (* (cos t_1) (* t_0 (* 0.005555555555555556 (* PI angle_m))))
      (if (<= (/ angle_m 180.0) 5e+204)
        (* t_0 (fabs (sin (* angle_m (* PI 0.005555555555555556)))))
        (* (* t_0 (sin t_1)) (cos (/ angle_m (/ 180.0 PI)))))))))
angle_m = fabs(angle);
angle_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = 2.0 * ((b + a) * (b - a));
	double t_1 = ((double) M_PI) * (angle_m / 180.0);
	double tmp;
	if ((angle_m / 180.0) <= 5e+83) {
		tmp = cos(t_1) * (t_0 * (0.005555555555555556 * (((double) M_PI) * angle_m)));
	} else if ((angle_m / 180.0) <= 5e+204) {
		tmp = t_0 * fabs(sin((angle_m * (((double) M_PI) * 0.005555555555555556))));
	} else {
		tmp = (t_0 * sin(t_1)) * cos((angle_m / (180.0 / ((double) M_PI))));
	}
	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 * ((b + a) * (b - a));
	double t_1 = Math.PI * (angle_m / 180.0);
	double tmp;
	if ((angle_m / 180.0) <= 5e+83) {
		tmp = Math.cos(t_1) * (t_0 * (0.005555555555555556 * (Math.PI * angle_m)));
	} else if ((angle_m / 180.0) <= 5e+204) {
		tmp = t_0 * Math.abs(Math.sin((angle_m * (Math.PI * 0.005555555555555556))));
	} else {
		tmp = (t_0 * Math.sin(t_1)) * Math.cos((angle_m / (180.0 / Math.PI)));
	}
	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 * ((b + a) * (b - a))
	t_1 = math.pi * (angle_m / 180.0)
	tmp = 0
	if (angle_m / 180.0) <= 5e+83:
		tmp = math.cos(t_1) * (t_0 * (0.005555555555555556 * (math.pi * angle_m)))
	elif (angle_m / 180.0) <= 5e+204:
		tmp = t_0 * math.fabs(math.sin((angle_m * (math.pi * 0.005555555555555556))))
	else:
		tmp = (t_0 * math.sin(t_1)) * math.cos((angle_m / (180.0 / math.pi)))
	return angle_s * tmp
angle_m = abs(angle)
angle_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(2.0 * Float64(Float64(b + a) * Float64(b - a)))
	t_1 = Float64(pi * Float64(angle_m / 180.0))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 5e+83)
		tmp = Float64(cos(t_1) * Float64(t_0 * Float64(0.005555555555555556 * Float64(pi * angle_m))));
	elseif (Float64(angle_m / 180.0) <= 5e+204)
		tmp = Float64(t_0 * abs(sin(Float64(angle_m * Float64(pi * 0.005555555555555556)))));
	else
		tmp = Float64(Float64(t_0 * sin(t_1)) * cos(Float64(angle_m / Float64(180.0 / pi))));
	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 * ((b + a) * (b - a));
	t_1 = pi * (angle_m / 180.0);
	tmp = 0.0;
	if ((angle_m / 180.0) <= 5e+83)
		tmp = cos(t_1) * (t_0 * (0.005555555555555556 * (pi * angle_m)));
	elseif ((angle_m / 180.0) <= 5e+204)
		tmp = t_0 * abs(sin((angle_m * (pi * 0.005555555555555556))));
	else
		tmp = (t_0 * sin(t_1)) * cos((angle_m / (180.0 / pi)));
	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[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+83], N[(N[Cos[t$95$1], $MachinePrecision] * N[(t$95$0 * N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+204], N[(t$95$0 * N[Abs[N[Sin[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(angle$95$m / N[(180.0 / Pi), $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_1 := \pi \cdot \frac{angle_m}{180}\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+83}:\\
\;\;\;\;\cos t_1 \cdot \left(t_0 \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 5 \cdot 10^{+204}:\\
\;\;\;\;t_0 \cdot \left|\sin \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right|\\

\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot \sin t_1\right) \cdot \cos \left(\frac{angle_m}{\frac{180}{\pi}}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < 5.00000000000000029e83

    1. Initial program 53.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. Step-by-step derivation
      1. unpow253.4%

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

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

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

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

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

    if 5.00000000000000029e83 < (/.f64 angle 180) < 5.00000000000000008e204

    1. Initial program 32.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. unpow232.2%

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)}\right) \cdot 1 \]
      2. div-inv24.0%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(angle \cdot \color{blue}{0.005555555555555556}\right) \cdot \pi\right)\right) \cdot 1 \]
      4. *-commutative24.0%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi\right)\right) \cdot 1 \]
      5. associate-*r*24.8%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot 1 \]
      6. add-sqr-sqrt31.0%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left({\left(\sqrt{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{2}\right)}\right) \cdot 1 \]
      8. *-commutative31.7%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt{\color{blue}{\left(angle \cdot \pi\right) \cdot 0.005555555555555556}}\right)}^{2}\right)\right) \cdot 1 \]
      9. *-commutative31.7%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556}\right)}^{2}\right)\right) \cdot 1 \]
      10. associate-*r*30.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt{\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}\right)}^{2}\right)\right) \cdot 1 \]
    6. Applied egg-rr30.9%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}\right) \cdot 1 \]
    7. Step-by-step derivation
      1. rem-square-sqrt15.5%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(\sqrt{\sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)} \cdot \sqrt{\sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}\right)}\right) \cdot 1 \]
      2. sqrt-unprod49.6%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{\color{blue}{{\sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}^{2}}}\right) \cdot 1 \]
      4. unpow249.6%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)} \cdot \sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}}^{2}}\right) \cdot 1 \]
      5. add-sqr-sqrt49.7%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}^{2}}\right) \cdot 1 \]
      6. *-commutative49.7%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)}^{2}}\right) \cdot 1 \]
      7. associate-*r*49.8%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)}}^{2}}\right) \cdot 1 \]
      8. metadata-eval49.8%

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(angle \cdot \frac{\pi}{180}\right)}}^{2}}\right) \cdot 1 \]
      11. div-inv49.8%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \left(angle \cdot \left(\pi \cdot \color{blue}{0.005555555555555556}\right)\right)}^{2}}\right) \cdot 1 \]
    8. Applied egg-rr49.8%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sqrt{{\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}^{2}}}\right) \cdot 1 \]
    9. Step-by-step derivation
      1. unpow249.8%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{\color{blue}{\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}}\right) \cdot 1 \]
      2. rem-sqrt-square49.8%

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

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

    if 5.00000000000000008e204 < (/.f64 angle 180)

    1. Initial program 41.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. unpow241.2%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. associate-*r/34.5%

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\sqrt[3]{{\pi}^{3}} \cdot \frac{angle}{180}\right)\right) \cdot \cos \color{blue}{\left(\frac{angle}{\frac{180}{\pi}}\right)} \]
    8. Step-by-step derivation
      1. rem-cbrt-cube54.9%

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

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

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

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

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

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

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

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

Alternative 7: 57.5% accurate, 1.5× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle_m}{180} \leq 10^{+49}:\\ \;\;\;\;\cos \left(\pi \cdot \frac{angle_m}{180}\right) \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 4 \cdot 10^{+152}:\\ \;\;\;\;t_0 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_1\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a))))
        (t_1 (* PI (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 1e+49)
      (*
       (cos (* PI (/ angle_m 180.0)))
       (* t_0 (sin (* 0.005555555555555556 (* PI angle_m)))))
      (if (<= (/ angle_m 180.0) 4e+152)
        (* t_0 (sin (pow (cbrt t_1) 3.0)))
        (* t_0 (sin (expm1 (log1p 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 = 2.0 * ((b + a) * (b - a));
	double t_1 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = cos((((double) M_PI) * (angle_m / 180.0))) * (t_0 * sin((0.005555555555555556 * (((double) M_PI) * angle_m))));
	} else if ((angle_m / 180.0) <= 4e+152) {
		tmp = t_0 * sin(pow(cbrt(t_1), 3.0));
	} else {
		tmp = t_0 * sin(expm1(log1p(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 = 2.0 * ((b + a) * (b - a));
	double t_1 = Math.PI * (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 1e+49) {
		tmp = Math.cos((Math.PI * (angle_m / 180.0))) * (t_0 * Math.sin((0.005555555555555556 * (Math.PI * angle_m))));
	} else if ((angle_m / 180.0) <= 4e+152) {
		tmp = t_0 * Math.sin(Math.pow(Math.cbrt(t_1), 3.0));
	} else {
		tmp = t_0 * Math.sin(Math.expm1(Math.log1p(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(2.0 * Float64(Float64(b + a) * Float64(b - a)))
	t_1 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e+49)
		tmp = Float64(cos(Float64(pi * Float64(angle_m / 180.0))) * Float64(t_0 * sin(Float64(0.005555555555555556 * Float64(pi * angle_m)))));
	elseif (Float64(angle_m / 180.0) <= 4e+152)
		tmp = Float64(t_0 * sin((cbrt(t_1) ^ 3.0)));
	else
		tmp = Float64(t_0 * sin(expm1(log1p(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[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+49], N[(N[Cos[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 4e+152], N[(t$95$0 * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[Sin[N[(Exp[N[Log[1 + t$95$1], $MachinePrecision]] - 1), $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
t_1 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle_m}{180} \leq 10^{+49}:\\
\;\;\;\;\cos \left(\pi \cdot \frac{angle_m}{180}\right) \cdot \left(t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 4 \cdot 10^{+152}:\\
\;\;\;\;t_0 \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_1\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < 9.99999999999999946e48

    1. Initial program 53.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. Step-by-step derivation
      1. unpow253.8%

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

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

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

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

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

    if 9.99999999999999946e48 < (/.f64 angle 180) < 4.0000000000000002e152

    1. Initial program 42.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. unpow242.1%

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \pi\right)\right) \cdot 1 \]
      3. metadata-eval33.4%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi\right)\right) \cdot 1 \]
      5. associate-*r*34.5%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot 1 \]
      6. add-cube-cbrt42.4%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)} \cdot \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right) \cdot \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}\right) \cdot 1 \]
      7. pow347.2%

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(angle \cdot \pi\right) \cdot 0.005555555555555556}}\right)}^{3}\right)\right) \cdot 1 \]
      9. *-commutative47.2%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556}\right)}^{3}\right)\right) \cdot 1 \]
      10. associate-*r*47.3%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}\right)}^{3}\right)\right) \cdot 1 \]
    6. Applied egg-rr47.3%

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

    if 4.0000000000000002e152 < (/.f64 angle 180)

    1. Initial program 27.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. unpow227.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+49}:\\ \;\;\;\;\cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 4 \cdot 10^{+152}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \]

Alternative 8: 55.7% accurate, 1.5× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\\ t_1 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle_m}{180} \leq 4 \cdot 10^{+152}:\\ \;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_0\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (* angle_m 0.005555555555555556)))
        (t_1 (* 2.0 (* (+ b a) (- b a)))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 4e+152)
      (* t_1 (sin (pow (cbrt t_0) 3.0)))
      (* t_1 (sin (expm1 (log1p 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 = 2.0 * ((b + a) * (b - a));
	double tmp;
	if ((angle_m / 180.0) <= 4e+152) {
		tmp = t_1 * sin(pow(cbrt(t_0), 3.0));
	} else {
		tmp = t_1 * sin(expm1(log1p(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 = 2.0 * ((b + a) * (b - a));
	double tmp;
	if ((angle_m / 180.0) <= 4e+152) {
		tmp = t_1 * Math.sin(Math.pow(Math.cbrt(t_0), 3.0));
	} else {
		tmp = t_1 * Math.sin(Math.expm1(Math.log1p(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 = Float64(2.0 * Float64(Float64(b + a) * Float64(b - a)))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 4e+152)
		tmp = Float64(t_1 * sin((cbrt(t_0) ^ 3.0)));
	else
		tmp = Float64(t_1 * sin(expm1(log1p(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[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 4e+152], N[(t$95$1 * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle_m}{180} \leq 4 \cdot 10^{+152}:\\
\;\;\;\;t_1 \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t_0\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle 180) < 4.0000000000000002e152

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi\right)\right) \cdot 1 \]
      5. associate-*r*55.4%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot 1 \]
      6. add-cube-cbrt54.5%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)} \cdot \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right) \cdot \sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}\right) \cdot 1 \]
      7. pow355.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right)}\right) \cdot 1 \]
      8. *-commutative55.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(angle \cdot \pi\right) \cdot 0.005555555555555556}}\right)}^{3}\right)\right) \cdot 1 \]
      9. *-commutative55.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556}\right)}^{3}\right)\right) \cdot 1 \]
      10. associate-*r*56.5%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\color{blue}{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}}\right)}^{3}\right)\right) \cdot 1 \]
    6. Applied egg-rr56.5%

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

    if 4.0000000000000002e152 < (/.f64 angle 180)

    1. Initial program 27.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. unpow227.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 4 \cdot 10^{+152}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \]

Alternative 9: 56.3% accurate, 1.9× 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(b + a\right) \cdot \left(b - a\right)\right)\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 10^{+290}:\\ \;\;\;\;t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 2.0 (* (+ b a) (- b a)))))
   (*
    angle_s
    (if (<= (pow b 2.0) 1e+290)
      (* t_0 (sin (* 0.005555555555555556 (* PI angle_m))))
      (* t_0 (* PI (* angle_m 0.005555555555555556)))))))
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 * ((b + a) * (b - a));
	double tmp;
	if (pow(b, 2.0) <= 1e+290) {
		tmp = t_0 * sin((0.005555555555555556 * (((double) M_PI) * angle_m)));
	} else {
		tmp = t_0 * (((double) M_PI) * (angle_m * 0.005555555555555556));
	}
	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 * ((b + a) * (b - a));
	double tmp;
	if (Math.pow(b, 2.0) <= 1e+290) {
		tmp = t_0 * Math.sin((0.005555555555555556 * (Math.PI * angle_m)));
	} else {
		tmp = t_0 * (Math.PI * (angle_m * 0.005555555555555556));
	}
	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 * ((b + a) * (b - a))
	tmp = 0
	if math.pow(b, 2.0) <= 1e+290:
		tmp = t_0 * math.sin((0.005555555555555556 * (math.pi * angle_m)))
	else:
		tmp = t_0 * (math.pi * (angle_m * 0.005555555555555556))
	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(b + a) * Float64(b - a)))
	tmp = 0.0
	if ((b ^ 2.0) <= 1e+290)
		tmp = Float64(t_0 * sin(Float64(0.005555555555555556 * Float64(pi * angle_m))));
	else
		tmp = Float64(t_0 * Float64(pi * Float64(angle_m * 0.005555555555555556)));
	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 * ((b + a) * (b - a));
	tmp = 0.0;
	if ((b ^ 2.0) <= 1e+290)
		tmp = t_0 * sin((0.005555555555555556 * (pi * angle_m)));
	else
		tmp = t_0 * (pi * (angle_m * 0.005555555555555556));
	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[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 1e+290], N[(t$95$0 * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(Pi * N[(angle$95$m * 0.005555555555555556), $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 := 2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 10^{+290}:\\
\;\;\;\;t_0 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\pi \cdot \left(angle_m \cdot 0.005555555555555556\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b 2) < 1.00000000000000006e290

    1. Initial program 56.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. Step-by-step derivation
      1. unpow256.4%

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{1} \]
    5. Taylor expanded in angle around inf 56.6%

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

    if 1.00000000000000006e290 < (pow.f64 b 2)

    1. Initial program 36.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. Step-by-step derivation
      1. unpow236.4%

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot 1 \]
    6. Step-by-step derivation
      1. associate-*r*51.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}\right) \cdot 1 \]
      2. *-commutative51.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\color{blue}{\left(angle \cdot 0.005555555555555556\right)} \cdot \pi\right)\right) \cdot 1 \]
      3. *-commutative51.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right) \cdot 1 \]
      4. *-commutative51.9%

        \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right) \cdot 1 \]
    7. Simplified51.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 10^{+290}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\ \end{array} \]

Alternative 10: 56.3% accurate, 2.0× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ angle_s \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left|\sin \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right|\right) \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (* 2.0 (* (+ b a) (- b a)))
   (fabs (sin (* angle_m (* PI 0.005555555555555556)))))))
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 * ((2.0 * ((b + a) * (b - a))) * fabs(sin((angle_m * (((double) M_PI) * 0.005555555555555556)))));
}
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 * ((2.0 * ((b + a) * (b - a))) * Math.abs(Math.sin((angle_m * (Math.PI * 0.005555555555555556)))));
}
angle_m = math.fabs(angle)
angle_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((2.0 * ((b + a) * (b - a))) * math.fabs(math.sin((angle_m * (math.pi * 0.005555555555555556)))))
angle_m = abs(angle)
angle_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(2.0 * Float64(Float64(b + a) * Float64(b - a))) * abs(sin(Float64(angle_m * Float64(pi * 0.005555555555555556))))))
end
angle_m = abs(angle);
angle_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((2.0 * ((b + a) * (b - a))) * abs(sin((angle_m * (pi * 0.005555555555555556)))));
end
angle_m = N[Abs[angle], $MachinePrecision]
angle_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Abs[N[Sin[N[(angle$95$m * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
angle_s = \mathsf{copysign}\left(1, angle\right)

\\
angle_s \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left|\sin \left(angle_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right|\right)
\end{array}
Derivation
  1. Initial program 50.8%

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

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

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)}\right) \cdot 1 \]
    2. div-inv52.7%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \pi\right)\right) \cdot 1 \]
    3. metadata-eval52.7%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\left(angle \cdot \color{blue}{0.005555555555555556}\right) \cdot \pi\right)\right) \cdot 1 \]
    4. *-commutative52.7%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi\right)\right) \cdot 1 \]
    5. associate-*r*53.3%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot 1 \]
    6. add-sqr-sqrt26.1%

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left({\left(\sqrt{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{2}\right)}\right) \cdot 1 \]
    8. *-commutative26.2%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt{\color{blue}{\left(angle \cdot \pi\right) \cdot 0.005555555555555556}}\right)}^{2}\right)\right) \cdot 1 \]
    9. *-commutative26.2%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left({\left(\sqrt{\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556}\right)}^{2}\right)\right) \cdot 1 \]
    10. associate-*r*26.1%

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

    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \color{blue}{\left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}\right) \cdot 1 \]
  7. Step-by-step derivation
    1. rem-square-sqrt22.7%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(\sqrt{\sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)} \cdot \sqrt{\sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}\right)}\right) \cdot 1 \]
    2. sqrt-unprod21.5%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sqrt{\sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right) \cdot \sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}}\right) \cdot 1 \]
    3. pow221.5%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{\color{blue}{{\sin \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)}^{2}}}\right) \cdot 1 \]
    4. unpow221.5%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)} \cdot \sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}}^{2}}\right) \cdot 1 \]
    5. add-sqr-sqrt31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}}^{2}}\right) \cdot 1 \]
    6. *-commutative31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \left(\pi \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)}^{2}}\right) \cdot 1 \]
    7. associate-*r*31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(\left(\pi \cdot 0.005555555555555556\right) \cdot angle\right)}}^{2}}\right) \cdot 1 \]
    8. metadata-eval31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \left(\left(\pi \cdot \color{blue}{\frac{1}{180}}\right) \cdot angle\right)}^{2}}\right) \cdot 1 \]
    9. div-inv31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \left(\color{blue}{\frac{\pi}{180}} \cdot angle\right)}^{2}}\right) \cdot 1 \]
    10. *-commutative31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \color{blue}{\left(angle \cdot \frac{\pi}{180}\right)}}^{2}}\right) \cdot 1 \]
    11. div-inv31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \left(angle \cdot \color{blue}{\left(\pi \cdot \frac{1}{180}\right)}\right)}^{2}}\right) \cdot 1 \]
    12. metadata-eval31.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{{\sin \left(angle \cdot \left(\pi \cdot \color{blue}{0.005555555555555556}\right)\right)}^{2}}\right) \cdot 1 \]
  8. Applied egg-rr31.4%

    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\sqrt{{\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}^{2}}}\right) \cdot 1 \]
  9. Step-by-step derivation
    1. unpow231.4%

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sqrt{\color{blue}{\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)}}\right) \cdot 1 \]
    2. rem-sqrt-square37.6%

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

    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left|\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right|}\right) \cdot 1 \]
  11. Final simplification37.6%

    \[\leadsto \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left|\sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right| \]

Alternative 11: 55.7% accurate, 2.8× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \left(b + a\right) \cdot \left(b - a\right)\\ t_1 := 2 \cdot t_0\\ angle_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+118}:\\ \;\;\;\;t_1 \cdot \sin \left(\frac{\pi \cdot angle_m}{180}\right)\\ \mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+211}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle_m \cdot \left(\pi \cdot t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* (+ b a) (- b a))) (t_1 (* 2.0 t_0)))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 2e+118)
      (* t_1 (sin (/ (* PI angle_m) 180.0)))
      (if (<= (/ angle_m 180.0) 2e+211)
        (* 0.011111111111111112 (* angle_m (* PI t_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 = (b + a) * (b - a);
	double t_1 = 2.0 * t_0;
	double tmp;
	if ((angle_m / 180.0) <= 2e+118) {
		tmp = t_1 * sin(((((double) M_PI) * angle_m) / 180.0));
	} else if ((angle_m / 180.0) <= 2e+211) {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * t_0));
	} else {
		tmp = 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 = (b + a) * (b - a);
	double t_1 = 2.0 * t_0;
	double tmp;
	if ((angle_m / 180.0) <= 2e+118) {
		tmp = t_1 * Math.sin(((Math.PI * angle_m) / 180.0));
	} else if ((angle_m / 180.0) <= 2e+211) {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * t_0));
	} else {
		tmp = 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 = (b + a) * (b - a)
	t_1 = 2.0 * t_0
	tmp = 0
	if (angle_m / 180.0) <= 2e+118:
		tmp = t_1 * math.sin(((math.pi * angle_m) / 180.0))
	elif (angle_m / 180.0) <= 2e+211:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * t_0))
	else:
		tmp = 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 = Float64(Float64(b + a) * Float64(b - a))
	t_1 = Float64(2.0 * t_0)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 2e+118)
		tmp = Float64(t_1 * sin(Float64(Float64(pi * angle_m) / 180.0)));
	elseif (Float64(angle_m / 180.0) <= 2e+211)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * t_0)));
	else
		tmp = Float64(t_1 * sin(Float64(0.005555555555555556 * Float64(pi * angle_m))));
	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 + a) * (b - a);
	t_1 = 2.0 * t_0;
	tmp = 0.0;
	if ((angle_m / 180.0) <= 2e+118)
		tmp = t_1 * sin(((pi * angle_m) / 180.0));
	elseif ((angle_m / 180.0) <= 2e+211)
		tmp = 0.011111111111111112 * (angle_m * (pi * t_0));
	else
		tmp = t_1 * sin((0.005555555555555556 * (pi * angle_m)));
	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[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(2.0 * t$95$0), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+118], N[(t$95$1 * N[Sin[N[(N[(Pi * angle$95$m), $MachinePrecision] / 180.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+211], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(Pi * angle$95$m), $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 := \left(b + a\right) \cdot \left(b - a\right)\\
t_1 := 2 \cdot t_0\\
angle_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+118}:\\
\;\;\;\;t_1 \cdot \sin \left(\frac{\pi \cdot angle_m}{180}\right)\\

\mathbf{elif}\;\frac{angle_m}{180} \leq 2 \cdot 10^{+211}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle_m \cdot \left(\pi \cdot t_0\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < 1.99999999999999993e118

    1. Initial program 53.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. unpow253.1%

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

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

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

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

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

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

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

    if 1.99999999999999993e118 < (/.f64 angle 180) < 1.9999999999999999e211

    1. Initial program 30.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. unpow230.1%

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

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

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

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

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

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

    if 1.9999999999999999e211 < (/.f64 angle 180)

    1. Initial program 36.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. Step-by-step derivation
      1. unpow236.7%

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

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

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

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

      \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \color{blue}{1} \]
    5. Taylor expanded in angle around inf 44.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 2 \cdot 10^{+118}:\\ \;\;\;\;\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(\frac{\pi \cdot angle}{180}\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+211}:\\ \;\;\;\;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(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\\ \end{array} \]

Alternative 12: 54.4% accurate, 5.4× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ angle_s \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right) \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (* (* 2.0 (* (+ b a) (- b a))) (* 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) {
	return angle_s * ((2.0 * ((b + a) * (b - a))) * (0.005555555555555556 * (((double) M_PI) * angle_m)));
}
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 * ((2.0 * ((b + a) * (b - a))) * (0.005555555555555556 * (Math.PI * angle_m)));
}
angle_m = math.fabs(angle)
angle_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((2.0 * ((b + a) * (b - a))) * (0.005555555555555556 * (math.pi * angle_m)))
angle_m = abs(angle)
angle_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(2.0 * Float64(Float64(b + a) * Float64(b - a))) * Float64(0.005555555555555556 * Float64(pi * angle_m))))
end
angle_m = abs(angle);
angle_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((2.0 * ((b + a) * (b - a))) * (0.005555555555555556 * (pi * angle_m)));
end
angle_m = N[Abs[angle], $MachinePrecision]
angle_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(2.0 * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(0.005555555555555556 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
angle_s = \mathsf{copysign}\left(1, angle\right)

\\
angle_s \cdot \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle_m\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.8%

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

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

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

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

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

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

    \[\leadsto \left(\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right) \cdot 1 \]
  6. Final simplification53.3%

    \[\leadsto \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \]

Alternative 13: 54.4% accurate, 5.5× 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(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\right) \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* angle_m (* PI (* (+ b a) (- b a)))))))
angle_m = fabs(angle);
angle_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (((double) M_PI) * ((b + a) * (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) * (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) * (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(Float64(b + a) * 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) * (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[(N[(b + a), $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)

\\
angle_s \cdot \left(0.011111111111111112 \cdot \left(angle_m \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.8%

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

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

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

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

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

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

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

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

Alternative 14: 54.4% accurate, 5.5× 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(\left(\pi \cdot angle_m\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right) \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* (* PI angle_m) (* (+ b a) (- b a))))))
angle_m = fabs(angle);
angle_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * ((((double) M_PI) * angle_m) * ((b + a) * (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 * ((Math.PI * angle_m) * ((b + a) * (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 * ((math.pi * angle_m) * ((b + a) * (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(Float64(pi * angle_m) * Float64(Float64(b + a) * 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 * ((pi * angle_m) * ((b + a) * (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[(N[(Pi * angle$95$m), $MachinePrecision] * N[(N[(b + a), $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(\left(\pi \cdot angle_m\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.8%

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

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

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

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

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

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

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

      \[\leadsto \left(0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)}\right) \cdot 1 \]
  7. Simplified53.3%

    \[\leadsto \color{blue}{\left(0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \cdot 1 \]
  8. Final simplification53.3%

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

Reproduce

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