ab-angle->ABCF B

Percentage Accurate: 53.7% → 67.5%
Time: 1.2min
Alternatives: 14
Speedup: 32.2×

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

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

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

Alternative 1: 67.5% accurate, 0.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ 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.011111111111111112\right)\\ t_1 := {b\_m}^{2} - {a\_m}^{2}\\ t_2 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+105}:\\ \;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b\_m, a\_m\right)\right)}^{2}\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(2 \cdot \left(\sqrt{{\sin t\_2}^{2}} \cdot {\left(\sqrt[3]{\cos t\_2}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+294}:\\ \;\;\;\;\sqrt{{\left(t\_1 \cdot \sin \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;t\_1 \cdot \sqrt{{\sin t\_0}^{2}}\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (* PI (* angle_m 0.011111111111111112)))
        (t_1 (- (pow b_m 2.0) (pow a_m 2.0)))
        (t_2 (* PI (* angle_m 0.005555555555555556))))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 5e+21)
      (*
       (+ b_m a_m)
       (* (- b_m a_m) (sin (* 2.0 (* 0.005555555555555556 (* angle_m PI))))))
      (if (<= (/ angle_m 180.0) 2e+105)
        (* (sin (expm1 (log1p t_0))) (pow (hypot b_m a_m) 2.0))
        (if (<= (/ angle_m 180.0) 2e+266)
          (*
           (* (+ b_m a_m) (- b_m a_m))
           (* 2.0 (* (sqrt (pow (sin t_2) 2.0)) (pow (cbrt (cos t_2)) 3.0))))
          (if (<= (/ angle_m 180.0) 4e+294)
            (sqrt
             (pow
              (* t_1 (sin (* (* angle_m 0.005555555555555556) (* 2.0 PI))))
              2.0))
            (* t_1 (sqrt (pow (sin t_0) 2.0))))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m * 0.011111111111111112);
	double t_1 = pow(b_m, 2.0) - pow(a_m, 2.0);
	double t_2 = ((double) M_PI) * (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 5e+21) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((2.0 * (0.005555555555555556 * (angle_m * ((double) M_PI))))));
	} else if ((angle_m / 180.0) <= 2e+105) {
		tmp = sin(expm1(log1p(t_0))) * pow(hypot(b_m, a_m), 2.0);
	} else if ((angle_m / 180.0) <= 2e+266) {
		tmp = ((b_m + a_m) * (b_m - a_m)) * (2.0 * (sqrt(pow(sin(t_2), 2.0)) * pow(cbrt(cos(t_2)), 3.0)));
	} else if ((angle_m / 180.0) <= 4e+294) {
		tmp = sqrt(pow((t_1 * sin(((angle_m * 0.005555555555555556) * (2.0 * ((double) M_PI))))), 2.0));
	} else {
		tmp = t_1 * sqrt(pow(sin(t_0), 2.0));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.PI * (angle_m * 0.011111111111111112);
	double t_1 = Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0);
	double t_2 = Math.PI * (angle_m * 0.005555555555555556);
	double tmp;
	if ((angle_m / 180.0) <= 5e+21) {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((2.0 * (0.005555555555555556 * (angle_m * Math.PI)))));
	} else if ((angle_m / 180.0) <= 2e+105) {
		tmp = Math.sin(Math.expm1(Math.log1p(t_0))) * Math.pow(Math.hypot(b_m, a_m), 2.0);
	} else if ((angle_m / 180.0) <= 2e+266) {
		tmp = ((b_m + a_m) * (b_m - a_m)) * (2.0 * (Math.sqrt(Math.pow(Math.sin(t_2), 2.0)) * Math.pow(Math.cbrt(Math.cos(t_2)), 3.0)));
	} else if ((angle_m / 180.0) <= 4e+294) {
		tmp = Math.sqrt(Math.pow((t_1 * Math.sin(((angle_m * 0.005555555555555556) * (2.0 * Math.PI)))), 2.0));
	} else {
		tmp = t_1 * Math.sqrt(Math.pow(Math.sin(t_0), 2.0));
	}
	return angle_s * tmp;
}
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = Float64(pi * Float64(angle_m * 0.011111111111111112))
	t_1 = Float64((b_m ^ 2.0) - (a_m ^ 2.0))
	t_2 = Float64(pi * Float64(angle_m * 0.005555555555555556))
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 5e+21)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * pi))))));
	elseif (Float64(angle_m / 180.0) <= 2e+105)
		tmp = Float64(sin(expm1(log1p(t_0))) * (hypot(b_m, a_m) ^ 2.0));
	elseif (Float64(angle_m / 180.0) <= 2e+266)
		tmp = Float64(Float64(Float64(b_m + a_m) * Float64(b_m - a_m)) * Float64(2.0 * Float64(sqrt((sin(t_2) ^ 2.0)) * (cbrt(cos(t_2)) ^ 3.0))));
	elseif (Float64(angle_m / 180.0) <= 4e+294)
		tmp = sqrt((Float64(t_1 * sin(Float64(Float64(angle_m * 0.005555555555555556) * Float64(2.0 * pi)))) ^ 2.0));
	else
		tmp = Float64(t_1 * sqrt((sin(t_0) ^ 2.0)));
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+21], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+105], N[(N[Sin[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[b$95$m ^ 2 + a$95$m ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+266], N[(N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sqrt[N[Power[N[Sin[t$95$2], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[Power[N[Power[N[Cos[t$95$2], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 4e+294], N[Sqrt[N[Power[N[(t$95$1 * N[Sin[N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[Sqrt[N[Power[N[Sin[t$95$0], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
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.011111111111111112\right)\\
t_1 := {b\_m}^{2} - {a\_m}^{2}\\
t_2 := \pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+21}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+105}:\\
\;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b\_m, a\_m\right)\right)}^{2}\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+266}:\\
\;\;\;\;\left(\left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\right) \cdot \left(2 \cdot \left(\sqrt{{\sin t\_2}^{2}} \cdot {\left(\sqrt[3]{\cos t\_2}\right)}^{3}\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \sqrt{{\sin t\_0}^{2}}\\


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e21 < (/.f64 angle 180) < 1.9999999999999999e105

    1. Initial program 25.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. associate-*l*25.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left({b}^{2} + {a}^{2}\right)} \]
      2. associate-*l*27.4%

        \[\leadsto \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \cdot \left({b}^{2} + {a}^{2}\right) \]
      3. rem-square-sqrt27.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \color{blue}{\left(\sqrt{{b}^{2} + {a}^{2}} \cdot \sqrt{{b}^{2} + {a}^{2}}\right)} \]
      4. unpow227.4%

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

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

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(b, a\right)} \cdot \sqrt{{b}^{2} + {a}^{2}}\right) \]
      7. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{\color{blue}{b \cdot b} + {a}^{2}}\right) \]
      8. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{b \cdot b + \color{blue}{a \cdot a}}\right) \]
      9. hypot-undefine27.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \color{blue}{\mathsf{hypot}\left(b, a\right)}\right) \]
      10. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \color{blue}{{\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}} \]
    10. Simplified27.4%

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}} \]
    11. Step-by-step derivation
      1. expm1-log1p-u38.7%

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
      2. expm1-undefine31.7%

        \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    12. Applied egg-rr31.7%

      \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    13. Step-by-step derivation
      1. expm1-define38.7%

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    14. Simplified38.7%

      \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]

    if 1.9999999999999999e105 < (/.f64 angle 180) < 2.0000000000000001e266

    1. Initial program 28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e266 < (/.f64 angle 180) < 4.00000000000000027e294

    1. Initial program 28.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000027e294 < (/.f64 angle 180)

    1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      4. associate-*r*3.5%

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

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sin \left(2 \cdot \color{blue}{\left(\left(\pi \cdot angle\right) \cdot 0.005555555555555556\right)}\right) \]
      6. *-commutative3.5%

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\left(2 \cdot 0.005555555555555556\right) \cdot \left(angle \cdot \pi\right)\right)} \]
      9. metadata-eval3.5%

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sqrt{{\sin \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.011111111111111112\right)}^{2}} \]
      6. associate-*l*60.5%

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sqrt{{\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}}^{2}} \]
    10. Applied egg-rr60.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+105}:\\ \;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+266}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sqrt{{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}^{2}} \cdot {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 4 \cdot 10^{+294}:\\ \;\;\;\;\sqrt{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\left({b}^{2} - {a}^{2}\right) \cdot \sqrt{{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 65.3% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_1 \cdot \left(\mathsf{hypot}\left(b\_m, a\_m\right) \cdot \left(\mathsf{hypot}\left(b\_m, a\_m\right) \cdot t\_3\right)\right)\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) < 9.9999999999999997e106

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999997e106 < (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))

    1. Initial program 40.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. associate-*l*41.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\color{blue}{\left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \mathsf{hypot}\left(b, a\right)\right) \cdot \mathsf{hypot}\left(b, a\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
  3. Recombined 2 regimes into one program.
  4. Final simplification39.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \cdot \cos \left(\frac{angle}{180} \cdot \pi\right) \leq 10^{+107}:\\ \;\;\;\;\mathsf{fma}\left(a, \mathsf{fma}\left(a \cdot -2, \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right), 0\right), 2 \cdot \left({b}^{2} \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \cos \left({\left(\sqrt{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{2}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.5% accurate, 0.4× speedup?

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+146}:\\
\;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b\_m, a\_m\right)\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a\_m, \mathsf{fma}\left(a\_m \cdot -2, \cos \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right) \cdot t\_1, 0\right), 2 \cdot \left(\left(t\_1 \cdot \cos \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right) \cdot {b\_m}^{2}\right)\right)\\


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e21 < (/.f64 angle 180) < 4.9999999999999999e146

    1. Initial program 32.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left({b}^{2} + {a}^{2}\right)} \]
      2. associate-*l*25.6%

        \[\leadsto \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \cdot \left({b}^{2} + {a}^{2}\right) \]
      3. rem-square-sqrt25.6%

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

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\sqrt{\color{blue}{b \cdot b} + {a}^{2}} \cdot \sqrt{{b}^{2} + {a}^{2}}\right) \]
      5. unpow225.6%

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

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(b, a\right)} \cdot \sqrt{{b}^{2} + {a}^{2}}\right) \]
      7. unpow225.6%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{\color{blue}{b \cdot b} + {a}^{2}}\right) \]
      8. unpow225.6%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{b \cdot b + \color{blue}{a \cdot a}}\right) \]
      9. hypot-undefine25.6%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \color{blue}{\mathsf{hypot}\left(b, a\right)}\right) \]
      10. unpow225.6%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \color{blue}{{\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}} \]
    10. Simplified25.6%

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

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
      2. expm1-undefine41.0%

        \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    12. Applied egg-rr41.0%

      \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    13. Step-by-step derivation
      1. expm1-define46.1%

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    14. Simplified46.1%

      \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]

    if 4.9999999999999999e146 < (/.f64 angle 180)

    1. Initial program 22.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right)} \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    12. Step-by-step derivation
      1. add-cbrt-cube33.9%

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

        \[\leadsto \mathsf{fma}\left(a, \mathsf{fma}\left(-2 \cdot a, \cos \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right), 0\right), 2 \cdot \left(\left(\cos \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot {b}^{2}\right)\right) \]
    13. Applied egg-rr33.9%

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

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

Alternative 4: 66.9% accurate, 0.7× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\ t_1 := \left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\\ t_2 := \frac{angle\_m}{180} \cdot \pi\\ t_3 := \cos t\_2\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+105}:\\ \;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b\_m, a\_m\right)\right)}^{2}\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+264}:\\ \;\;\;\;2 \cdot \left(t\_3 \cdot \left(\left({b\_m}^{2} - {a\_m}^{2}\right) \cdot \sqrt{{t\_0}^{2}}\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+281}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(\sin t\_2 \cdot \cos \left(\frac{angle\_m}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t\_3 \cdot \sqrt{{\left(t\_0 \cdot t\_1\right)}^{2}}\right)\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (sin (* PI (* angle_m 0.005555555555555556))))
        (t_1 (* (+ b_m a_m) (- b_m a_m)))
        (t_2 (* (/ angle_m 180.0) PI))
        (t_3 (cos t_2)))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 5e+21)
      (*
       (+ b_m a_m)
       (* (- b_m a_m) (sin (* 2.0 (* 0.005555555555555556 (* angle_m PI))))))
      (if (<= (/ angle_m 180.0) 2e+105)
        (*
         (sin (expm1 (log1p (* PI (* angle_m 0.011111111111111112)))))
         (pow (hypot b_m a_m) 2.0))
        (if (<= (/ angle_m 180.0) 5e+264)
          (*
           2.0
           (* t_3 (* (- (pow b_m 2.0) (pow a_m 2.0)) (sqrt (pow t_0 2.0)))))
          (if (<= (/ angle_m 180.0) 5e+281)
            (*
             t_1
             (*
              2.0
              (* (sin t_2) (cos (* (/ angle_m 180.0) (pow (sqrt PI) 2.0))))))
            (* 2.0 (* t_3 (sqrt (pow (* t_0 t_1) 2.0)))))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = sin((((double) M_PI) * (angle_m * 0.005555555555555556)));
	double t_1 = (b_m + a_m) * (b_m - a_m);
	double t_2 = (angle_m / 180.0) * ((double) M_PI);
	double t_3 = cos(t_2);
	double tmp;
	if ((angle_m / 180.0) <= 5e+21) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((2.0 * (0.005555555555555556 * (angle_m * ((double) M_PI))))));
	} else if ((angle_m / 180.0) <= 2e+105) {
		tmp = sin(expm1(log1p((((double) M_PI) * (angle_m * 0.011111111111111112))))) * pow(hypot(b_m, a_m), 2.0);
	} else if ((angle_m / 180.0) <= 5e+264) {
		tmp = 2.0 * (t_3 * ((pow(b_m, 2.0) - pow(a_m, 2.0)) * sqrt(pow(t_0, 2.0))));
	} else if ((angle_m / 180.0) <= 5e+281) {
		tmp = t_1 * (2.0 * (sin(t_2) * cos(((angle_m / 180.0) * pow(sqrt(((double) M_PI)), 2.0)))));
	} else {
		tmp = 2.0 * (t_3 * sqrt(pow((t_0 * t_1), 2.0)));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.sin((Math.PI * (angle_m * 0.005555555555555556)));
	double t_1 = (b_m + a_m) * (b_m - a_m);
	double t_2 = (angle_m / 180.0) * Math.PI;
	double t_3 = Math.cos(t_2);
	double tmp;
	if ((angle_m / 180.0) <= 5e+21) {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((2.0 * (0.005555555555555556 * (angle_m * Math.PI)))));
	} else if ((angle_m / 180.0) <= 2e+105) {
		tmp = Math.sin(Math.expm1(Math.log1p((Math.PI * (angle_m * 0.011111111111111112))))) * Math.pow(Math.hypot(b_m, a_m), 2.0);
	} else if ((angle_m / 180.0) <= 5e+264) {
		tmp = 2.0 * (t_3 * ((Math.pow(b_m, 2.0) - Math.pow(a_m, 2.0)) * Math.sqrt(Math.pow(t_0, 2.0))));
	} else if ((angle_m / 180.0) <= 5e+281) {
		tmp = t_1 * (2.0 * (Math.sin(t_2) * Math.cos(((angle_m / 180.0) * Math.pow(Math.sqrt(Math.PI), 2.0)))));
	} else {
		tmp = 2.0 * (t_3 * Math.sqrt(Math.pow((t_0 * t_1), 2.0)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = math.sin((math.pi * (angle_m * 0.005555555555555556)))
	t_1 = (b_m + a_m) * (b_m - a_m)
	t_2 = (angle_m / 180.0) * math.pi
	t_3 = math.cos(t_2)
	tmp = 0
	if (angle_m / 180.0) <= 5e+21:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((2.0 * (0.005555555555555556 * (angle_m * math.pi)))))
	elif (angle_m / 180.0) <= 2e+105:
		tmp = math.sin(math.expm1(math.log1p((math.pi * (angle_m * 0.011111111111111112))))) * math.pow(math.hypot(b_m, a_m), 2.0)
	elif (angle_m / 180.0) <= 5e+264:
		tmp = 2.0 * (t_3 * ((math.pow(b_m, 2.0) - math.pow(a_m, 2.0)) * math.sqrt(math.pow(t_0, 2.0))))
	elif (angle_m / 180.0) <= 5e+281:
		tmp = t_1 * (2.0 * (math.sin(t_2) * math.cos(((angle_m / 180.0) * math.pow(math.sqrt(math.pi), 2.0)))))
	else:
		tmp = 2.0 * (t_3 * math.sqrt(math.pow((t_0 * t_1), 2.0)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))
	t_1 = Float64(Float64(b_m + a_m) * Float64(b_m - a_m))
	t_2 = Float64(Float64(angle_m / 180.0) * pi)
	t_3 = cos(t_2)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 5e+21)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * pi))))));
	elseif (Float64(angle_m / 180.0) <= 2e+105)
		tmp = Float64(sin(expm1(log1p(Float64(pi * Float64(angle_m * 0.011111111111111112))))) * (hypot(b_m, a_m) ^ 2.0));
	elseif (Float64(angle_m / 180.0) <= 5e+264)
		tmp = Float64(2.0 * Float64(t_3 * Float64(Float64((b_m ^ 2.0) - (a_m ^ 2.0)) * sqrt((t_0 ^ 2.0)))));
	elseif (Float64(angle_m / 180.0) <= 5e+281)
		tmp = Float64(t_1 * Float64(2.0 * Float64(sin(t_2) * cos(Float64(Float64(angle_m / 180.0) * (sqrt(pi) ^ 2.0))))));
	else
		tmp = Float64(2.0 * Float64(t_3 * sqrt((Float64(t_0 * t_1) ^ 2.0))));
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+21], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+105], N[(N[Sin[N[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[b$95$m ^ 2 + a$95$m ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+264], N[(2.0 * N[(t$95$3 * N[(N[(N[Power[b$95$m, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+281], N[(t$95$1 * N[(2.0 * N[(N[Sin[t$95$2], $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$3 * N[Sqrt[N[Power[N[(t$95$0 * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\
t_1 := \left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\\
t_2 := \frac{angle\_m}{180} \cdot \pi\\
t_3 := \cos t\_2\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+21}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+105}:\\
\;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b\_m, a\_m\right)\right)}^{2}\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+264}:\\
\;\;\;\;2 \cdot \left(t\_3 \cdot \left(\left({b\_m}^{2} - {a\_m}^{2}\right) \cdot \sqrt{{t\_0}^{2}}\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_3 \cdot \sqrt{{\left(t\_0 \cdot t\_1\right)}^{2}}\right)\\


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e21 < (/.f64 angle 180) < 1.9999999999999999e105

    1. Initial program 25.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. associate-*l*25.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left({b}^{2} + {a}^{2}\right)} \]
      2. associate-*l*27.4%

        \[\leadsto \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \cdot \left({b}^{2} + {a}^{2}\right) \]
      3. rem-square-sqrt27.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \color{blue}{\left(\sqrt{{b}^{2} + {a}^{2}} \cdot \sqrt{{b}^{2} + {a}^{2}}\right)} \]
      4. unpow227.4%

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

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

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(b, a\right)} \cdot \sqrt{{b}^{2} + {a}^{2}}\right) \]
      7. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{\color{blue}{b \cdot b} + {a}^{2}}\right) \]
      8. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{b \cdot b + \color{blue}{a \cdot a}}\right) \]
      9. hypot-undefine27.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \color{blue}{\mathsf{hypot}\left(b, a\right)}\right) \]
      10. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \color{blue}{{\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}} \]
    10. Simplified27.4%

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}} \]
    11. Step-by-step derivation
      1. expm1-log1p-u38.7%

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
      2. expm1-undefine31.7%

        \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    12. Applied egg-rr31.7%

      \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    13. Step-by-step derivation
      1. expm1-define38.7%

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    14. Simplified38.7%

      \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]

    if 1.9999999999999999e105 < (/.f64 angle 180) < 5.00000000000000033e264

    1. Initial program 29.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. associate-*l*29.4%

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

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

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

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

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

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

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

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

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

    if 5.00000000000000033e264 < (/.f64 angle 180) < 5.00000000000000016e281

    1. Initial program 31.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000016e281 < (/.f64 angle 180)

    1. Initial program 5.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 61.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_0 := {b\_m}^{2} - {a\_m}^{2}\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -5 \cdot 10^{+273}:\\
\;\;\;\;0.011111111111111112 \cdot \left(a\_m \cdot \left(angle\_m \cdot \left(\pi \cdot \left(b\_m - b\_m\right)\right) - a\_m \cdot \left(angle\_m \cdot \pi\right)\right) + angle\_m \cdot \left(\pi \cdot {b\_m}^{2}\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;-0.011111111111111112 \cdot \left({a\_m}^{2} \cdot \left(angle\_m \cdot \pi\right)\right) + b\_m \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(b\_m \cdot \pi\right)\right) + 0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(a\_m - a\_m\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)) < -4.99999999999999961e273

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999961e273 < (-.f64 (pow.f64 b 2) (pow.f64 a 2)) < 4.9999999999999996e292

    1. Initial program 56.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot {b}^{2} + \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(-{a}^{2}\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out57.0%

        \[\leadsto \color{blue}{\sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left({b}^{2} + \left(-{a}^{2}\right)\right)} \]
      2. sub-neg57.0%

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

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      4. associate-*r*57.0%

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\left(2 \cdot 0.005555555555555556\right) \cdot \left(angle \cdot \pi\right)\right)} \]
      9. metadata-eval56.7%

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

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

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

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

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

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

    if 4.9999999999999996e292 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 42.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 67.9% accurate, 0.8× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ b_m = \left|b\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\ t_1 := \left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\\ t_2 := \frac{angle\_m}{180} \cdot \pi\\ t_3 := \cos t\_2\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+21}:\\ \;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+105}:\\ \;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b\_m, a\_m\right)\right)}^{2}\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+264}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_3 \cdot \sqrt{{t\_0}^{2}}\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+281}:\\ \;\;\;\;t\_1 \cdot \left(2 \cdot \left(\sin t\_2 \cdot \cos \left(\frac{angle\_m}{180} \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t\_3 \cdot \sqrt{{\left(t\_0 \cdot t\_1\right)}^{2}}\right)\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
b_m = (fabs.f64 b)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b_m angle_m)
 :precision binary64
 (let* ((t_0 (sin (* PI (* angle_m 0.005555555555555556))))
        (t_1 (* (+ b_m a_m) (- b_m a_m)))
        (t_2 (* (/ angle_m 180.0) PI))
        (t_3 (cos t_2)))
   (*
    angle_s
    (if (<= (/ angle_m 180.0) 5e+21)
      (*
       (+ b_m a_m)
       (* (- b_m a_m) (sin (* 2.0 (* 0.005555555555555556 (* angle_m PI))))))
      (if (<= (/ angle_m 180.0) 2e+105)
        (*
         (sin (expm1 (log1p (* PI (* angle_m 0.011111111111111112)))))
         (pow (hypot b_m a_m) 2.0))
        (if (<= (/ angle_m 180.0) 5e+264)
          (* t_1 (* 2.0 (* t_3 (sqrt (pow t_0 2.0)))))
          (if (<= (/ angle_m 180.0) 5e+281)
            (*
             t_1
             (*
              2.0
              (* (sin t_2) (cos (* (/ angle_m 180.0) (pow (sqrt PI) 2.0))))))
            (* 2.0 (* t_3 (sqrt (pow (* t_0 t_1) 2.0)))))))))))
a_m = fabs(a);
b_m = fabs(b);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = sin((((double) M_PI) * (angle_m * 0.005555555555555556)));
	double t_1 = (b_m + a_m) * (b_m - a_m);
	double t_2 = (angle_m / 180.0) * ((double) M_PI);
	double t_3 = cos(t_2);
	double tmp;
	if ((angle_m / 180.0) <= 5e+21) {
		tmp = (b_m + a_m) * ((b_m - a_m) * sin((2.0 * (0.005555555555555556 * (angle_m * ((double) M_PI))))));
	} else if ((angle_m / 180.0) <= 2e+105) {
		tmp = sin(expm1(log1p((((double) M_PI) * (angle_m * 0.011111111111111112))))) * pow(hypot(b_m, a_m), 2.0);
	} else if ((angle_m / 180.0) <= 5e+264) {
		tmp = t_1 * (2.0 * (t_3 * sqrt(pow(t_0, 2.0))));
	} else if ((angle_m / 180.0) <= 5e+281) {
		tmp = t_1 * (2.0 * (sin(t_2) * cos(((angle_m / 180.0) * pow(sqrt(((double) M_PI)), 2.0)))));
	} else {
		tmp = 2.0 * (t_3 * sqrt(pow((t_0 * t_1), 2.0)));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
b_m = Math.abs(b);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b_m, double angle_m) {
	double t_0 = Math.sin((Math.PI * (angle_m * 0.005555555555555556)));
	double t_1 = (b_m + a_m) * (b_m - a_m);
	double t_2 = (angle_m / 180.0) * Math.PI;
	double t_3 = Math.cos(t_2);
	double tmp;
	if ((angle_m / 180.0) <= 5e+21) {
		tmp = (b_m + a_m) * ((b_m - a_m) * Math.sin((2.0 * (0.005555555555555556 * (angle_m * Math.PI)))));
	} else if ((angle_m / 180.0) <= 2e+105) {
		tmp = Math.sin(Math.expm1(Math.log1p((Math.PI * (angle_m * 0.011111111111111112))))) * Math.pow(Math.hypot(b_m, a_m), 2.0);
	} else if ((angle_m / 180.0) <= 5e+264) {
		tmp = t_1 * (2.0 * (t_3 * Math.sqrt(Math.pow(t_0, 2.0))));
	} else if ((angle_m / 180.0) <= 5e+281) {
		tmp = t_1 * (2.0 * (Math.sin(t_2) * Math.cos(((angle_m / 180.0) * Math.pow(Math.sqrt(Math.PI), 2.0)))));
	} else {
		tmp = 2.0 * (t_3 * Math.sqrt(Math.pow((t_0 * t_1), 2.0)));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
b_m = math.fabs(b)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b_m, angle_m):
	t_0 = math.sin((math.pi * (angle_m * 0.005555555555555556)))
	t_1 = (b_m + a_m) * (b_m - a_m)
	t_2 = (angle_m / 180.0) * math.pi
	t_3 = math.cos(t_2)
	tmp = 0
	if (angle_m / 180.0) <= 5e+21:
		tmp = (b_m + a_m) * ((b_m - a_m) * math.sin((2.0 * (0.005555555555555556 * (angle_m * math.pi)))))
	elif (angle_m / 180.0) <= 2e+105:
		tmp = math.sin(math.expm1(math.log1p((math.pi * (angle_m * 0.011111111111111112))))) * math.pow(math.hypot(b_m, a_m), 2.0)
	elif (angle_m / 180.0) <= 5e+264:
		tmp = t_1 * (2.0 * (t_3 * math.sqrt(math.pow(t_0, 2.0))))
	elif (angle_m / 180.0) <= 5e+281:
		tmp = t_1 * (2.0 * (math.sin(t_2) * math.cos(((angle_m / 180.0) * math.pow(math.sqrt(math.pi), 2.0)))))
	else:
		tmp = 2.0 * (t_3 * math.sqrt(math.pow((t_0 * t_1), 2.0)))
	return angle_s * tmp
a_m = abs(a)
b_m = abs(b)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b_m, angle_m)
	t_0 = sin(Float64(pi * Float64(angle_m * 0.005555555555555556)))
	t_1 = Float64(Float64(b_m + a_m) * Float64(b_m - a_m))
	t_2 = Float64(Float64(angle_m / 180.0) * pi)
	t_3 = cos(t_2)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 5e+21)
		tmp = Float64(Float64(b_m + a_m) * Float64(Float64(b_m - a_m) * sin(Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * pi))))));
	elseif (Float64(angle_m / 180.0) <= 2e+105)
		tmp = Float64(sin(expm1(log1p(Float64(pi * Float64(angle_m * 0.011111111111111112))))) * (hypot(b_m, a_m) ^ 2.0));
	elseif (Float64(angle_m / 180.0) <= 5e+264)
		tmp = Float64(t_1 * Float64(2.0 * Float64(t_3 * sqrt((t_0 ^ 2.0)))));
	elseif (Float64(angle_m / 180.0) <= 5e+281)
		tmp = Float64(t_1 * Float64(2.0 * Float64(sin(t_2) * cos(Float64(Float64(angle_m / 180.0) * (sqrt(pi) ^ 2.0))))));
	else
		tmp = Float64(2.0 * Float64(t_3 * sqrt((Float64(t_0 * t_1) ^ 2.0))));
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
b_m = N[Abs[b], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b$95$m_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(Pi * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(b$95$m - a$95$m), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, Block[{t$95$3 = N[Cos[t$95$2], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+21], N[(N[(b$95$m + a$95$m), $MachinePrecision] * N[(N[(b$95$m - a$95$m), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+105], N[(N[Sin[N[(Exp[N[Log[1 + N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] * N[Power[N[Sqrt[b$95$m ^ 2 + a$95$m ^ 2], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+264], N[(t$95$1 * N[(2.0 * N[(t$95$3 * N[Sqrt[N[Power[t$95$0, 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 5e+281], N[(t$95$1 * N[(2.0 * N[(N[Sin[t$95$2], $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$3 * N[Sqrt[N[Power[N[(t$95$0 * t$95$1), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]), $MachinePrecision]]]]]
\begin{array}{l}
a_m = \left|a\right|
\\
b_m = \left|b\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \sin \left(\pi \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\\
t_1 := \left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\\
t_2 := \frac{angle\_m}{180} \cdot \pi\\
t_3 := \cos t\_2\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+21}:\\
\;\;\;\;\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+105}:\\
\;\;\;\;\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right) \cdot {\left(\mathsf{hypot}\left(b\_m, a\_m\right)\right)}^{2}\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+264}:\\
\;\;\;\;t\_1 \cdot \left(2 \cdot \left(t\_3 \cdot \sqrt{{t\_0}^{2}}\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_3 \cdot \sqrt{{\left(t\_0 \cdot t\_1\right)}^{2}}\right)\\


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

    1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e21 < (/.f64 angle 180) < 1.9999999999999999e105

    1. Initial program 25.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. associate-*l*25.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) \cdot \left({b}^{2} + {a}^{2}\right)} \]
      2. associate-*l*27.4%

        \[\leadsto \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} \cdot \left({b}^{2} + {a}^{2}\right) \]
      3. rem-square-sqrt27.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \color{blue}{\left(\sqrt{{b}^{2} + {a}^{2}} \cdot \sqrt{{b}^{2} + {a}^{2}}\right)} \]
      4. unpow227.4%

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

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

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\color{blue}{\mathsf{hypot}\left(b, a\right)} \cdot \sqrt{{b}^{2} + {a}^{2}}\right) \]
      7. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{\color{blue}{b \cdot b} + {a}^{2}}\right) \]
      8. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \sqrt{b \cdot b + \color{blue}{a \cdot a}}\right) \]
      9. hypot-undefine27.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \left(\mathsf{hypot}\left(b, a\right) \cdot \color{blue}{\mathsf{hypot}\left(b, a\right)}\right) \]
      10. unpow227.4%

        \[\leadsto \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot \color{blue}{{\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}} \]
    10. Simplified27.4%

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}} \]
    11. Step-by-step derivation
      1. expm1-log1p-u38.7%

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
      2. expm1-undefine31.7%

        \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    12. Applied egg-rr31.7%

      \[\leadsto \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)} - 1\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    13. Step-by-step derivation
      1. expm1-define38.7%

        \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]
    14. Simplified38.7%

      \[\leadsto \sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \]

    if 1.9999999999999999e105 < (/.f64 angle 180) < 5.00000000000000033e264

    1. Initial program 29.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. associate-*l*29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000033e264 < (/.f64 angle 180) < 5.00000000000000016e281

    1. Initial program 31.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000016e281 < (/.f64 angle 180)

    1. Initial program 5.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 67.2% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(b - a\right)\right)}\right) \]
      2. sub-neg54.5%

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \mathsf{fma}\left(angle, \pi \cdot {b}^{2}, a \cdot \color{blue}{\mathsf{fma}\left(angle, -1 \cdot \left(b \cdot \pi\right) + b \cdot \pi, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)}\right) \]
      6. distribute-lft1-in74.7%

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

        \[\leadsto 0.011111111111111112 \cdot \mathsf{fma}\left(angle, \pi \cdot {b}^{2}, a \cdot \mathsf{fma}\left(angle, \color{blue}{0} \cdot \left(b \cdot \pi\right), -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      8. mul0-lft74.7%

        \[\leadsto 0.011111111111111112 \cdot \mathsf{fma}\left(angle, \pi \cdot {b}^{2}, a \cdot \mathsf{fma}\left(angle, \color{blue}{0}, -1 \cdot \left(a \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
      9. mul-1-neg74.7%

        \[\leadsto 0.011111111111111112 \cdot \mathsf{fma}\left(angle, \pi \cdot {b}^{2}, a \cdot \mathsf{fma}\left(angle, 0, \color{blue}{-a \cdot \left(angle \cdot \pi\right)}\right)\right) \]
      10. fma-neg74.7%

        \[\leadsto 0.011111111111111112 \cdot \mathsf{fma}\left(angle, \pi \cdot {b}^{2}, a \cdot \color{blue}{\left(angle \cdot 0 - a \cdot \left(angle \cdot \pi\right)\right)}\right) \]
      11. associate-*r*74.7%

        \[\leadsto 0.011111111111111112 \cdot \mathsf{fma}\left(angle, \pi \cdot {b}^{2}, a \cdot \left(angle \cdot 0 - \color{blue}{\left(a \cdot angle\right) \cdot \pi}\right)\right) \]
    12. Simplified74.7%

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

    if -4.99999999999999961e273 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 60.4% accurate, 3.1× speedup?

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

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{-129}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b\_m \cdot \left(\pi \cdot \left(angle\_m \cdot b\_m\right)\right) - {a\_m}^{2} \cdot \left(angle\_m \cdot \pi\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+73}:\\
\;\;\;\;t\_0 \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle 180) < 1.99999999999999986e-272

    1. Initial program 47.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. associate-*l*47.7%

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999986e-272 < (/.f64 angle 180) < 5.00000000000000027e-129

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(b \cdot \left(angle \cdot \left(b \cdot \pi\right) + angle \cdot \left(\pi \cdot \left(a + -1 \cdot a\right)\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right)} \]
      4. distribute-lft-out83.9%

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

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi + \color{blue}{\left(a + -1 \cdot a\right) \cdot \pi}\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      6. distribute-rgt1-in83.9%

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

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

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

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

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

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

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

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

    if 5.00000000000000027e-129 < (/.f64 angle 180) < 9.99999999999999983e72

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      4. associate-*r*77.7%

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999983e72 < (/.f64 angle 180)

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 60.4% accurate, 3.2× speedup?

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

\\
\begin{array}{l}
t_0 := \left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{-129}:\\
\;\;\;\;0.011111111111111112 \cdot \left(b\_m \cdot \left(\pi \cdot \left(angle\_m \cdot b\_m\right)\right) - {a\_m}^{2} \cdot \left(angle\_m \cdot \pi\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 10^{+73}:\\
\;\;\;\;t\_0 \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < 5.00000000000000027e-129

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(b \cdot \left(angle \cdot \left(b \cdot \pi\right) + angle \cdot \left(\pi \cdot \left(a + -1 \cdot a\right)\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right)} \]
      4. distribute-lft-out59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \color{blue}{\left(angle \cdot \left(b \cdot \pi + \pi \cdot \left(a + -1 \cdot a\right)\right)\right)} - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      5. *-commutative59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi + \color{blue}{\left(a + -1 \cdot a\right) \cdot \pi}\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      6. distribute-rgt1-in59.3%

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

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi + \left(\color{blue}{0} \cdot a\right) \cdot \pi\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      8. mul0-lft59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi + \color{blue}{0} \cdot \pi\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      9. distribute-rgt-out59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(b + 0\right)\right)}\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      10. +-rgt-identity59.3%

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

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

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

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

    if 5.00000000000000027e-129 < (/.f64 angle 180) < 9.99999999999999983e72

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      4. associate-*r*77.7%

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999983e72 < (/.f64 angle 180)

    1. Initial program 25.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 59.6% accurate, 3.4× speedup?

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

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

\mathbf{elif}\;angle\_m \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t\_0 \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right)\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 1.35000000000000005e-122

    1. Initial program 52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(b \cdot \left(angle \cdot \left(b \cdot \pi\right) + angle \cdot \left(\pi \cdot \left(a + -1 \cdot a\right)\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right)} \]
      4. distribute-lft-out59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \color{blue}{\left(angle \cdot \left(b \cdot \pi + \pi \cdot \left(a + -1 \cdot a\right)\right)\right)} - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      5. *-commutative59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi + \color{blue}{\left(a + -1 \cdot a\right) \cdot \pi}\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      6. distribute-rgt1-in59.3%

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

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi + \left(\color{blue}{0} \cdot a\right) \cdot \pi\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      8. mul0-lft59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \left(b \cdot \pi + \color{blue}{0} \cdot \pi\right)\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      9. distribute-rgt-out59.3%

        \[\leadsto 0.011111111111111112 \cdot \left(b \cdot \left(angle \cdot \color{blue}{\left(\pi \cdot \left(b + 0\right)\right)}\right) - {a}^{2} \cdot \left(angle \cdot \pi\right)\right) \]
      10. +-rgt-identity59.3%

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

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

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

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

    if 1.35000000000000005e-122 < angle < 5.2000000000000003e163

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} \]
      4. associate-*r*62.9%

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000003e163 < angle

    1. Initial program 19.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 56.7% accurate, 3.6× speedup?

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

\\
\begin{array}{l}
t_0 := \left(b\_m + a\_m\right) \cdot \left(b\_m - a\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;angle\_m \leq 5.2 \cdot 10^{+163}:\\
\;\;\;\;t\_0 \cdot \sin \left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right)\\

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


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

    1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot {b}^{2} + \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(-{a}^{2}\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-out56.3%

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\right) \cdot \sin \color{blue}{\left(\left(2 \cdot 0.005555555555555556\right) \cdot \left(angle \cdot \pi\right)\right)} \]
      9. metadata-eval56.4%

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

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

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

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

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

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

    if 5.2000000000000003e163 < angle

    1. Initial program 19.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 67.6% accurate, 3.6× speedup?

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

\\
angle\_s \cdot \left(\left(b\_m + a\_m\right) \cdot \left(\left(b\_m - a\_m\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 50.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right) \]
  12. Add Preprocessing

Alternative 13: 54.1% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 54.1% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(b + \left(-a\right)\right)}\right)\right) \]
    3. distribute-lft-in48.9%

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

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left(\left(\pi \cdot \left(b + a\right)\right) \cdot b + \left(\pi \cdot \left(b + a\right)\right) \cdot \left(-a\right)\right)}\right) \]
  10. Step-by-step derivation
    1. distribute-lft-out52.1%

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

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

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

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

Reproduce

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