ab-angle->ABCF B

Percentage Accurate: 53.9% → 68.3%
Time: 40.6s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 53.9% 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: 68.3% accurate, 1.3× speedup?

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

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

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

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

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


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

    1. Initial program 58.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*58.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. *-commutative58.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*58.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. Simplified58.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. add-cbrt-cube45.6%

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

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

      \[\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/346.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*73.4%

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

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

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

    if 5.00000000000000025e95 < (/.f64 angle 180) < 1.99999999999999994e224

    1. Initial program 26.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*26.0%

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

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

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

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

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

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

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

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

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

    if 1.99999999999999994e224 < (/.f64 angle 180) < 2.0000000000000002e287

    1. Initial program 4.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*4.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. *-commutative4.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*4.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. Simplified4.8%

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube1.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/311.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-rr11.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/31.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*7.1%

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
      15. *-commutative7.1%

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{e^{\log \left(\pi \cdot angle\right)}} \cdot 0.011111111111111112\right)\right) \]
    10. Applied egg-rr37.5%

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

    if 2.0000000000000002e287 < (/.f64 angle 180)

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+95}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+224}:\\ \;\;\;\;\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+287}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.011111111111111112 \cdot e^{\log \left(angle \cdot \pi\right)}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\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(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 67.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 56.0%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*56.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. *-commutative56.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*56.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. Simplified56.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-cube41.1%

        \[\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/327.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*59.0%

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left(\left(angle \cdot 0.011111111111111112\right) \cdot \pi\right)}\right) \]
      3. add-sqr-sqrt59.8%

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

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

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

    if 2.00000000000000008e-42 < (pow.f64 b 2)

    1. Initial program 48.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*48.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. *-commutative48.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*48.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. Simplified48.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. add-cbrt-cube39.9%

        \[\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/326.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-rr26.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/339.1%

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

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

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

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.4% accurate, 1.0× speedup?

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

\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;{b}^{2} \leq 10^{+85}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)\right)\\

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


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

    1. Initial program 54.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*54.0%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube39.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/326.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-rr26.0%

      \[\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/340.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-cube54.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. unpow254.4%

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

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares54.4%

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*58.4%

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

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

      \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u55.4%

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)\right)\right)\right) \]
    10. Applied egg-rr55.5%

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

    if 1e85 < (pow.f64 b 2)

    1. Initial program 49.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*49.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. *-commutative49.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*49.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. Simplified49.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.4%

        \[\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/328.1%

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

      \[\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/340.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*66.7%

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
      15. *-commutative66.7%

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{3}\right)}\right) \]
    11. Taylor expanded in angle around 0 75.2%

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

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

Alternative 4: 67.7% accurate, 1.0× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 10^{+85}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\right)\\ \end{array} \end{array} \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (* angle_m 0.011111111111111112))))
   (*
    angle_s
    (if (<= (pow b 2.0) 1e+85)
      (* (- b a) (* (+ b a) (sin (expm1 (log1p t_0)))))
      (* (- b a) (* (+ b a) (sin (pow (cbrt t_0) 3.0))))))))
angle_m = fabs(angle);
angle_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m * 0.011111111111111112);
	double tmp;
	if (pow(b, 2.0) <= 1e+85) {
		tmp = (b - a) * ((b + a) * sin(expm1(log1p(t_0))));
	} else {
		tmp = (b - a) * ((b + a) * sin(pow(cbrt(t_0), 3.0)));
	}
	return angle_s * tmp;
}
angle_m = Math.abs(angle);
angle_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = Math.PI * (angle_m * 0.011111111111111112);
	double tmp;
	if (Math.pow(b, 2.0) <= 1e+85) {
		tmp = (b - a) * ((b + a) * Math.sin(Math.expm1(Math.log1p(t_0))));
	} else {
		tmp = (b - a) * ((b + a) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0)));
	}
	return angle_s * tmp;
}
angle_m = abs(angle)
angle_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m * 0.011111111111111112))
	tmp = 0.0
	if ((b ^ 2.0) <= 1e+85)
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin(expm1(log1p(t_0)))));
	else
		tmp = Float64(Float64(b - a) * Float64(Float64(b + a) * sin((cbrt(t_0) ^ 3.0))));
	end
	return Float64(angle_s * tmp)
end
angle_m = N[Abs[angle], $MachinePrecision]
angle_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 1e+85], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle_m = \left|angle\right|
\\
angle_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{else}:\\
\;\;\;\;\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t\_0}\right)}^{3}\right)\right)\\


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

    1. Initial program 54.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*54.0%

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube39.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/326.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-rr26.0%

      \[\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/340.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-cube54.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. unpow254.4%

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

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
      5. difference-of-squares54.4%

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*58.4%

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

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

      \[\leadsto \color{blue}{\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)} \]
    9. Step-by-step derivation
      1. expm1-log1p-u55.4%

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)\right)\right)\right) \]
    10. Applied egg-rr55.5%

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

    if 1e85 < (pow.f64 b 2)

    1. Initial program 49.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*49.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. *-commutative49.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*49.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. Simplified49.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.4%

        \[\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/328.1%

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

      \[\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/340.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*66.7%

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
      15. *-commutative66.7%

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

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

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

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

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

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

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

Alternative 5: 65.4% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 57.1%

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

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

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

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

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

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

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

      \[\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/342.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-cube57.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*62.5%

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

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

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

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

    if 4.99999999999999989e-114 < (pow.f64 a 2)

    1. Initial program 48.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*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. Step-by-step derivation
      1. add-cbrt-cube38.8%

        \[\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/321.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-rr21.0%

      \[\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/338.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*61.7%

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

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

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

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

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

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

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

Alternative 6: 65.4% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 57.1%

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

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

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

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

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

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

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

      \[\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/342.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-cube57.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(b \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right) \]
      11. *-commutative62.8%

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

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

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

    if 4.99999999999999989e-114 < (pow.f64 a 2)

    1. Initial program 48.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*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. Step-by-step derivation
      1. add-cbrt-cube38.8%

        \[\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/321.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-rr21.0%

      \[\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/338.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*61.7%

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

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

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

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

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

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

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

Alternative 7: 65.3% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 57.1%

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

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

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

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

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

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

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

      \[\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/342.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-cube57.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(b \cdot \sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right) \]
      11. *-commutative62.8%

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

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

    if 4.99999999999999989e-114 < (pow.f64 a 2)

    1. Initial program 48.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*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. Step-by-step derivation
      1. add-cbrt-cube38.8%

        \[\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/321.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-rr21.0%

      \[\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/338.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*61.7%

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

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

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

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

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

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

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

Alternative 8: 68.3% accurate, 3.4× speedup?

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

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

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


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

    1. Initial program 58.5%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*58.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. *-commutative58.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*58.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. Simplified58.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. add-cbrt-cube45.6%

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

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

      \[\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/346.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*73.4%

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

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

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

    if 5.00000000000000025e95 < (/.f64 angle 180)

    1. Initial program 23.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*23.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. *-commutative23.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*23.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. Simplified23.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. unpow223.3%

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

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

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    6. Applied egg-rr23.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. Taylor expanded in angle around 0 32.2%

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

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

Alternative 9: 53.7% accurate, 3.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 2.90000000000000005e-67

    1. Initial program 54.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*54.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. *-commutative54.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*54.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. Simplified54.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-cube42.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/328.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-rr28.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*62.8%

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

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

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

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

    if 2.90000000000000005e-67 < b

    1. Initial program 46.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*46.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. *-commutative46.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*46.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. Simplified46.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-cube37.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/324.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-rr24.4%

      \[\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/337.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*60.5%

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

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

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

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

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

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

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

Alternative 10: 53.7% accurate, 3.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 3.2000000000000003e-191

    1. Initial program 54.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*54.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. *-commutative54.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*54.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. Simplified54.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-cube42.6%

        \[\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/327.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-rr27.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/342.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*63.1%

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
      15. *-commutative63.1%

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

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

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

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

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

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

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

    if 3.2000000000000003e-191 < b

    1. Initial program 47.9%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. add-cbrt-cube37.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/325.9%

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

      \[\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/337.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-cube47.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
      14. associate-*r*60.6%

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

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

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

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

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

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

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

Alternative 11: 67.6% accurate, 3.7× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. 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/327.0%

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

    \[\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/340.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-cube51.6%

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

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    5. difference-of-squares54.8%

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

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

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

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
    14. associate-*r*62.1%

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
    15. *-commutative62.1%

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

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

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

Alternative 12: 42.9% accurate, 26.2× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.0999999999999999e58

    1. Initial program 51.9%

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

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

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

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

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

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

        \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      3. difference-of-squares53.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) \]
    6. Applied egg-rr53.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 angle around 0 45.9%

      \[\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)} \]
    8. Step-by-step derivation
      1. +-commutative45.9%

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

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

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

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

      \[\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)} \]
    11. Step-by-step derivation
      1. associate-*r*45.9%

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

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

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

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

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

    if 3.0999999999999999e58 < a

    1. Initial program 51.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*51.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. *-commutative51.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*51.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. Simplified51.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. unpow251.7%

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

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

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

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

      \[\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)} \]
    8. Step-by-step derivation
      1. +-commutative54.0%

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

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

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

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

      \[\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)} \]
    11. Step-by-step derivation
      1. associate-*r*53.9%

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

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

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

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

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

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

Alternative 13: 54.7% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. difference-of-squares54.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) \]
  6. Applied egg-rr54.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 0 47.6%

    \[\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)} \]
  8. Step-by-step derivation
    1. +-commutative47.6%

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

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

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

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

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

Alternative 14: 63.1% accurate, 32.2× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. 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/327.0%

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

    \[\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/340.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-cube51.6%

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

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    5. difference-of-squares54.8%

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

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

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

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
    14. associate-*r*62.1%

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
    15. *-commutative62.1%

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

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

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

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

Alternative 15: 63.1% accurate, 32.2× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. 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/327.0%

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

    \[\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/340.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-cube51.6%

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

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    5. difference-of-squares54.8%

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

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

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

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
    14. associate-*r*62.1%

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
    15. *-commutative62.1%

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

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

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

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

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

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

Alternative 16: 37.6% accurate, 38.1× speedup?

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

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.9%

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

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

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

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

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

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
    3. difference-of-squares54.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) \]
  6. Applied egg-rr54.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 0 47.6%

    \[\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)} \]
  8. Step-by-step derivation
    1. +-commutative47.6%

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

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

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

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

    \[\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)} \]
  11. Step-by-step derivation
    1. associate-*r*47.6%

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\pi \cdot a\right)} \cdot \left(b - a\right)\right)\right) \]
  16. Final simplification29.9%

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

Alternative 17: 13.9% accurate, 46.6× speedup?

\[\begin{array}{l} angle_m = \left|angle\right| \\ angle_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot 0\right)\right) \end{array} \]
angle_m = (fabs.f64 angle)
angle_s = (copysign.f64 1 angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* (- b a) (* (+ b a) 0.0))))
angle_m = fabs(angle);
angle_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b - a) * ((b + a) * 0.0));
}
angle_m = abs(angle)
angle_s = copysign(1.0d0, angle)
real(8) function code(angle_s, a, b, angle_m)
    real(8), intent (in) :: angle_s
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: angle_m
    code = angle_s * ((b - a) * ((b + a) * 0.0d0))
end function
angle_m = Math.abs(angle);
angle_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b - a) * ((b + a) * 0.0));
}
angle_m = math.fabs(angle)
angle_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((b - a) * ((b + a) * 0.0))
angle_m = abs(angle)
angle_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(b - a) * Float64(Float64(b + a) * 0.0)))
end
angle_m = abs(angle);
angle_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((b - a) * ((b + a) * 0.0));
end
angle_m = N[Abs[angle], $MachinePrecision]
angle_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * 0.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle_m = \left|angle\right|
\\
angle_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot 0\right)\right)
\end{array}
Derivation
  1. Initial program 51.9%

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

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

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

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

    \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. 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/327.0%

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

    \[\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/340.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-cube51.6%

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

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

      \[\leadsto \left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \]
    5. difference-of-squares54.8%

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

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

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

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

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

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

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

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

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right) + \pi \cdot \frac{angle}{180}\right)\right) \]
    14. associate-*r*62.1%

      \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\color{blue}{\left(\pi \cdot angle\right) \cdot 0.005555555555555556} + \pi \cdot \frac{angle}{180}\right)\right) \]
    15. *-commutative62.1%

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

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

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

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

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

    \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.011111111111111112\right)}\right)}^{3}\right)}\right) \]
  11. Taylor expanded in angle around 0 10.8%

    \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot \color{blue}{0}\right) \]
  12. Final simplification10.8%

    \[\leadsto \left(b - a\right) \cdot \left(\left(b + a\right) \cdot 0\right) \]
  13. Add Preprocessing

Reproduce

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