ab-angle->ABCF B

Percentage Accurate: 54.2% → 65.8%
Time: 47.5s
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: 54.2% accurate, 1.0× speedup?

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

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

Alternative 1: 65.8% accurate, 0.9× speedup?

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

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

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

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

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

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


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

    1. Initial program 47.8%

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

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

        \[\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*47.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. Simplified47.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 48.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. unpow248.0%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares50.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) \]
    7. Applied egg-rr50.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. Taylor expanded in angle around 0 50.1%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-134 < (/.f64 angle 180) < 1.9999999999999999e168

    1. Initial program 70.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*70.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. *-commutative70.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*70.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. Simplified70.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. unpow261.7%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares63.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) \]
    6. Applied egg-rr71.9%

      \[\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. associate-*r/70.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 \cos \color{blue}{\left(\frac{\pi \cdot angle}{180}\right)}\right)\right) \]
      2. *-commutative70.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 \cos \left(\frac{\color{blue}{angle \cdot \pi}}{180}\right)\right)\right) \]
    8. Applied egg-rr70.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 \cos \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. expm1-log1p-u73.4%

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

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

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

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

    if 1.9999999999999999e168 < (/.f64 angle 180) < 9.9999999999999997e267

    1. Initial program 41.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*41.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. *-commutative41.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*41.7%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares31.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) \]
    6. Applied egg-rr46.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. pow146.0%

        \[\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 \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}^{1}} \]
      2. 2-sin46.0%

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

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

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

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

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

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

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

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

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

    if 9.9999999999999997e267 < (/.f64 angle 180) < 1e288

    1. Initial program 20.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*20.0%

        \[\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*20.0%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares41.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) \]
    6. Applied egg-rr20.0%

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

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

    if 1e288 < (/.f64 angle 180)

    1. Initial program 7.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*7.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*7.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. Simplified7.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. unpow235.5%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares35.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) \]
    6. Applied egg-rr7.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.0% accurate, 0.4× speedup?

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

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

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


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

    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.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. Simplified50.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. unpow247.8%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares47.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) \]
    6. Applied egg-rr50.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) \]
    7. Taylor expanded in a around 0 62.3%

      \[\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. fma-define62.3%

        \[\leadsto \color{blue}{\mathsf{fma}\left(2, {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), 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)\right)} \]
      2. *-commutative62.3%

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

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

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

    if -2.0000000000000001e-250 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 53.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*53.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. *-commutative53.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*53.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. Simplified53.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. add-cbrt-cube41.0%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\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)\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)}} \]
      2. pow1/330.8%

        \[\leadsto \color{blue}{{\left(\left(\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)\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)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.8%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/341.7%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube54.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)} \]
      3. add-sqr-sqrt54.2%

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

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

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

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

Alternative 3: 65.9% accurate, 0.6× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \sin \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} - {a\_m}^{2} \leq -1 \cdot 10^{-250}:\\ \;\;\;\;2 \cdot \left(\left(a\_m \cdot \left(t\_0 \cdot \left(b - b\right) - a\_m \cdot t\_0\right) + {b}^{2} \cdot t\_0\right) \cdot \cos \left(\pi \cdot \frac{angle\_m}{180}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{hypot}\left(b, a\_m\right) \cdot \left(\mathsf{hypot}\left(b, a\_m\right) \cdot \sin \left(2 \cdot \left(angle\_m \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (let* ((t_0 (sin (* 0.005555555555555556 (* angle_m PI)))))
   (*
    angle_s
    (if (<= (- (pow b 2.0) (pow a_m 2.0)) -1e-250)
      (*
       2.0
       (*
        (+ (* a_m (- (* t_0 (- b b)) (* a_m t_0))) (* (pow b 2.0) t_0))
        (cos (* PI (/ angle_m 180.0)))))
      (*
       (hypot b a_m)
       (*
        (hypot b a_m)
        (sin (* 2.0 (* angle_m (* 0.005555555555555556 PI))))))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	double t_0 = sin((0.005555555555555556 * (angle_m * ((double) M_PI))));
	double tmp;
	if ((pow(b, 2.0) - pow(a_m, 2.0)) <= -1e-250) {
		tmp = 2.0 * (((a_m * ((t_0 * (b - b)) - (a_m * t_0))) + (pow(b, 2.0) * t_0)) * cos((((double) M_PI) * (angle_m / 180.0))));
	} else {
		tmp = hypot(b, a_m) * (hypot(b, a_m) * sin((2.0 * (angle_m * (0.005555555555555556 * ((double) M_PI))))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	double t_0 = Math.sin((0.005555555555555556 * (angle_m * Math.PI)));
	double tmp;
	if ((Math.pow(b, 2.0) - Math.pow(a_m, 2.0)) <= -1e-250) {
		tmp = 2.0 * (((a_m * ((t_0 * (b - b)) - (a_m * t_0))) + (Math.pow(b, 2.0) * t_0)) * Math.cos((Math.PI * (angle_m / 180.0))));
	} else {
		tmp = Math.hypot(b, a_m) * (Math.hypot(b, a_m) * Math.sin((2.0 * (angle_m * (0.005555555555555556 * Math.PI)))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	t_0 = math.sin((0.005555555555555556 * (angle_m * math.pi)))
	tmp = 0
	if (math.pow(b, 2.0) - math.pow(a_m, 2.0)) <= -1e-250:
		tmp = 2.0 * (((a_m * ((t_0 * (b - b)) - (a_m * t_0))) + (math.pow(b, 2.0) * t_0)) * math.cos((math.pi * (angle_m / 180.0))))
	else:
		tmp = math.hypot(b, a_m) * (math.hypot(b, a_m) * math.sin((2.0 * (angle_m * (0.005555555555555556 * math.pi)))))
	return angle_s * tmp
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	t_0 = sin(Float64(0.005555555555555556 * Float64(angle_m * pi)))
	tmp = 0.0
	if (Float64((b ^ 2.0) - (a_m ^ 2.0)) <= -1e-250)
		tmp = Float64(2.0 * Float64(Float64(Float64(a_m * Float64(Float64(t_0 * Float64(b - b)) - Float64(a_m * t_0))) + Float64((b ^ 2.0) * t_0)) * cos(Float64(pi * Float64(angle_m / 180.0)))));
	else
		tmp = Float64(hypot(b, a_m) * Float64(hypot(b, a_m) * sin(Float64(2.0 * Float64(angle_m * Float64(0.005555555555555556 * pi))))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b, angle_m)
	t_0 = sin((0.005555555555555556 * (angle_m * pi)));
	tmp = 0.0;
	if (((b ^ 2.0) - (a_m ^ 2.0)) <= -1e-250)
		tmp = 2.0 * (((a_m * ((t_0 * (b - b)) - (a_m * t_0))) + ((b ^ 2.0) * t_0)) * cos((pi * (angle_m / 180.0))));
	else
		tmp = hypot(b, a_m) * (hypot(b, a_m) * sin((2.0 * (angle_m * (0.005555555555555556 * pi)))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $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_, angle$95$m_] := Block[{t$95$0 = N[Sin[N[(0.005555555555555556 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a$95$m, 2.0], $MachinePrecision]), $MachinePrecision], -1e-250], N[(2.0 * N[(N[(N[(a$95$m * N[(N[(t$95$0 * N[(b - b), $MachinePrecision]), $MachinePrecision] - N[(a$95$m * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[b, 2.0], $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(Pi * N[(angle$95$m / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[b ^ 2 + a$95$m ^ 2], $MachinePrecision] * N[(N[Sqrt[b ^ 2 + a$95$m ^ 2], $MachinePrecision] * N[Sin[N[(2.0 * N[(angle$95$m * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 50.1%

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

        \[\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*50.1%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares47.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) \]
    6. Applied egg-rr50.1%

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

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

    if -1.0000000000000001e-250 < (-.f64 (pow.f64 b 2) (pow.f64 a 2))

    1. Initial program 53.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*53.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. *-commutative53.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*53.7%

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

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

        \[\leadsto \color{blue}{\sqrt[3]{\left(\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)\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)}} \]
      2. pow1/330.3%

        \[\leadsto \color{blue}{{\left(\left(\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)\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)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.3%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/341.3%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube54.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)} \]
      3. add-sqr-sqrt54.6%

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

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

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

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

Alternative 4: 66.3% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+174}:\\
\;\;\;\;2 \cdot \left(t\_2 \cdot \cos \left(\frac{angle\_m}{180} \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t\_2 \cdot \sqrt{{\cos \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)}^{2}}\right)\\


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

    1. Initial program 48.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*48.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. *-commutative48.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*48.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. Simplified48.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 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999999e-117 < (/.f64 angle 180) < 4.00000000000000028e174

    1. Initial program 69.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*69.3%

        \[\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*69.3%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares61.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) \]
    6. Applied egg-rr70.9%

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

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

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

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

    if 4.00000000000000028e174 < (/.f64 angle 180) < 5.0000000000000003e299

    1. Initial program 35.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*35.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. *-commutative35.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*35.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. Simplified35.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. unpow228.1%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares34.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) \]
    6. Applied egg-rr38.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. pow138.4%

        \[\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 \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}^{1}} \]
      2. 2-sin38.4%

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e299 < (/.f64 angle 180)

    1. Initial program 52.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*52.1%

        \[\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*52.1%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares51.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) \]
    6. Applied egg-rr54.6%

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

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

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

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

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

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

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

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

Alternative 5: 66.1% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 48.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*48.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. *-commutative48.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*48.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. Simplified48.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 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999999e-117 < (/.f64 angle 180) < 4.00000000000000028e174

    1. Initial program 69.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*69.3%

        \[\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*69.3%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares61.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) \]
    6. Applied egg-rr70.9%

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

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

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

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

    if 4.00000000000000028e174 < (/.f64 angle 180)

    1. Initial program 35.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*35.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. *-commutative35.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*35.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. Simplified35.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. add-cbrt-cube35.7%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\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)\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)}} \]
      2. pow1/332.2%

        \[\leadsto \color{blue}{{\left(\left(\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)\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)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr32.2%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/335.9%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube35.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)} \]
      3. *-commutative35.3%

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

        \[\leadsto \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \color{blue}{\left({b}^{2} + \left(-{a}^{2}\right)\right)} \]
      5. distribute-lft-in35.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)} \]
      6. associate-*l*35.3%

        \[\leadsto \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\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. *-commutative35.3%

        \[\leadsto \sin \left(2 \cdot \color{blue}{\left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\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) \]
      8. associate-*l*38.6%

        \[\leadsto \sin \left(2 \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\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) \]
      9. associate-*l*38.6%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.7% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 5 \cdot 10^{+268}:\\
\;\;\;\;t\_3 \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\\

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+291}:\\
\;\;\;\;2 \cdot \left(t\_3 \cdot t\_2\right)\\

\mathbf{else}:\\
\;\;\;\;\sin \left(2 \cdot t\_1\right) \cdot \left({b}^{2} + {a\_m}^{2}\right)\\


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

    1. Initial program 47.8%

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

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

        \[\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*47.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. Simplified47.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 48.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. unpow248.0%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares50.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) \]
    7. Applied egg-rr50.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. Taylor expanded in angle around 0 50.1%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-134 < (/.f64 angle 180) < 1.9999999999999999e168

    1. Initial program 70.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*70.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. *-commutative70.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*70.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. Simplified70.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. unpow261.7%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares63.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) \]
    6. Applied egg-rr71.9%

      \[\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. associate-*r/70.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 \cos \color{blue}{\left(\frac{\pi \cdot angle}{180}\right)}\right)\right) \]
      2. *-commutative70.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 \cos \left(\frac{\color{blue}{angle \cdot \pi}}{180}\right)\right)\right) \]
    8. Applied egg-rr70.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 \cos \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)}\right)\right) \]
    9. Step-by-step derivation
      1. expm1-log1p-u73.4%

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

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

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

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

    if 1.9999999999999999e168 < (/.f64 angle 180) < 5.0000000000000002e268

    1. Initial program 44.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*44.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. *-commutative44.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*44.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. Simplified44.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. unpow226.2%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr48.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. pow148.3%

        \[\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 \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}^{1}} \]
      2. 2-sin48.3%

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

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

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

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

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

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

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

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

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

    if 5.0000000000000002e268 < (/.f64 angle 180) < 1.9999999999999999e291

    1. Initial program 0.0%

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

        \[\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*0.0%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares51.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) \]
    6. Applied egg-rr0.0%

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e291 < (/.f64 angle 180)

    1. Initial program 7.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*7.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. *-commutative7.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*7.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. Simplified7.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. add-cbrt-cube2.2%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\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)\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)}} \]
      2. pow1/335.5%

        \[\leadsto \color{blue}{{\left(\left(\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)\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)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr35.5%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/32.2%

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

        \[\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)} \]
      3. *-commutative7.4%

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

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

        \[\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)} \]
      6. associate-*l*7.4%

        \[\leadsto \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\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. *-commutative7.4%

        \[\leadsto \sin \left(2 \cdot \color{blue}{\left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\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) \]
      8. associate-*l*7.4%

        \[\leadsto \sin \left(2 \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\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) \]
      9. associate-*l*7.4%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 65.6% accurate, 1.3× speedup?

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

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+174}:\\
\;\;\;\;2 \cdot \left(\cos \left(\pi \cdot \frac{angle\_m}{180}\right) \cdot \left(\left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot \sin t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sin \left(2 \cdot t\_1\right) \cdot \left({b}^{2} + {a\_m}^{2}\right)\\


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

    1. Initial program 47.8%

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

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

        \[\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*47.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. Simplified47.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 48.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. unpow248.0%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares50.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) \]
    7. Applied egg-rr50.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. Taylor expanded in angle around 0 50.1%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-134 < (/.f64 angle 180) < 4.00000000000000028e174

    1. Initial program 69.8%

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

        \[\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*69.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000028e174 < (/.f64 angle 180)

    1. Initial program 35.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*35.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. *-commutative35.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*35.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. Simplified35.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. add-cbrt-cube35.7%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\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)\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)}} \]
      2. pow1/332.2%

        \[\leadsto \color{blue}{{\left(\left(\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)\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)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr32.2%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/335.9%

        \[\leadsto \color{blue}{\sqrt[3]{{\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}}} \]
      2. rem-cbrt-cube35.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)} \]
      3. *-commutative35.3%

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

        \[\leadsto \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \color{blue}{\left({b}^{2} + \left(-{a}^{2}\right)\right)} \]
      5. distribute-lft-in35.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)} \]
      6. associate-*l*35.3%

        \[\leadsto \sin \color{blue}{\left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\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. *-commutative35.3%

        \[\leadsto \sin \left(2 \cdot \color{blue}{\left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\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) \]
      8. associate-*l*38.6%

        \[\leadsto \sin \left(2 \cdot \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\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) \]
      9. associate-*l*38.6%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 65.8% accurate, 1.8× speedup?

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

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

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

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


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

    1. Initial program 47.8%

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

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

        \[\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*47.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. Simplified47.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 48.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. unpow248.0%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares50.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) \]
    7. Applied egg-rr50.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. Taylor expanded in angle around 0 50.1%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-134 < (/.f64 angle 180) < 4.00000000000000028e174

    1. Initial program 69.8%

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

        \[\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*69.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000028e174 < (/.f64 angle 180)

    1. Initial program 35.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*35.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. *-commutative35.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*35.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. Simplified35.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. unpow228.1%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares34.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) \]
    6. Applied egg-rr38.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. pow138.4%

        \[\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 \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}^{1}} \]
      2. 2-sin38.4%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.2% accurate, 1.8× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\cos t\_1 \cdot \left(\sin t\_1 \cdot \left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right)\right)\right)\\


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

    1. Initial program 48.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*48.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. *-commutative48.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*48.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. Simplified48.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 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999999e-117 < (/.f64 angle 180)

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr60.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. Taylor expanded in angle around inf 64.6%

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

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

Alternative 10: 66.2% accurate, 3.4× speedup?

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

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

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


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

    1. Initial program 48.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*48.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. *-commutative48.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*48.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. Simplified48.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 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999999e-117 < (/.f64 angle 180)

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Applied egg-rr60.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. Step-by-step derivation
      1. pow160.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 \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)\right)}^{1}} \]
      2. 2-sin60.7%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.5% accurate, 16.1× speedup?

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 1.7500000000000001e-131

    1. Initial program 47.8%

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

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

        \[\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*47.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. Simplified47.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 48.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. unpow248.0%

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
      3. difference-of-squares50.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) \]
    7. Applied egg-rr50.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. Taylor expanded in angle around 0 50.1%

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

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

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

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

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

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

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

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

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

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

    if 1.7500000000000001e-131 < angle

    1. Initial program 59.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*59.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. *-commutative59.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*59.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. Simplified59.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 50.7%

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    7. Applied egg-rr53.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 angle around 0 53.8%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 54.5% accurate, 32.2× speedup?

\[\begin{array}{l} a_m = \left|a\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 + a\_m\right) \cdot \left(b - a\_m\right)\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (* 0.011111111111111112 (* angle_m (* PI (* (+ b a_m) (- b a_m)))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (((double) M_PI) * ((b + a_m) * (b - a_m)))));
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (Math.PI * ((b + a_m) * (b - a_m)))));
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	return angle_s * (0.011111111111111112 * (angle_m * (math.pi * ((b + a_m) * (b - a_m)))))
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(b + a_m) * Float64(b - a_m))))))
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * (angle_m * (pi * ((b + a_m) * (b - a_m)))));
end
a_m = N[Abs[a], $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_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\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 + a\_m\right) \cdot \left(b - a\_m\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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*52.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. *-commutative52.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*52.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. Simplified52.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 49.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. unpow249.0%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
  7. Applied egg-rr51.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. Final simplification51.5%

    \[\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 13: 54.5% accurate, 32.2× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (* 0.011111111111111112 (* (* angle_m PI) (* (+ b a_m) (- b a_m))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * ((angle_m * ((double) M_PI)) * ((b + a_m) * (b - a_m))));
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * ((angle_m * Math.PI) * ((b + a_m) * (b - a_m))));
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	return angle_s * (0.011111111111111112 * ((angle_m * math.pi) * ((b + a_m) * (b - a_m))))
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(angle_m * pi) * Float64(Float64(b + a_m) * Float64(b - a_m)))))
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * ((angle_m * pi) * ((b + a_m) * (b - a_m))));
end
a_m = N[Abs[a], $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_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(angle$95$m * Pi), $MachinePrecision] * N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(angle\_m \cdot \pi\right) \cdot \left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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*52.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. *-commutative52.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*52.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. Simplified52.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 49.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. unpow249.0%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
  7. Applied egg-rr51.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 angle around 0 51.5%

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)} \]
  11. Final simplification51.5%

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

Alternative 14: 54.6% accurate, 32.2× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(angle\_m \cdot \left(\left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 1 angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (* angle_m (* (* (+ b a_m) (- b a_m)) (* PI 0.011111111111111112)))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (angle_m * (((b + a_m) * (b - a_m)) * (((double) M_PI) * 0.011111111111111112)));
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (angle_m * (((b + a_m) * (b - a_m)) * (Math.PI * 0.011111111111111112)));
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	return angle_s * (angle_m * (((b + a_m) * (b - a_m)) * (math.pi * 0.011111111111111112)))
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	return Float64(angle_s * Float64(angle_m * Float64(Float64(Float64(b + a_m) * Float64(b - a_m)) * Float64(pi * 0.011111111111111112))))
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b, angle_m)
	tmp = angle_s * (angle_m * (((b + a_m) * (b - a_m)) * (pi * 0.011111111111111112)));
end
a_m = N[Abs[a], $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_, angle$95$m_] := N[(angle$95$s * N[(angle$95$m * N[(N[(N[(b + a$95$m), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision] * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(angle\_m \cdot \left(\left(\left(b + a\_m\right) \cdot \left(b - a\_m\right)\right) \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)
\end{array}
Derivation
  1. Initial program 52.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*52.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. *-commutative52.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*52.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. Simplified52.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 49.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. unpow249.0%

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
  7. Applied egg-rr51.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 angle around 0 51.5%

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

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

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

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

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

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

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

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

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

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

Reproduce

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