ab-angle->ABCF B

Percentage Accurate: 54.4% → 68.2%
Time: 42.8s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 54.4% 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.2% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+155}:\\
\;\;\;\;t\_3 \cdot \left(t\_0 \cdot \sin t\_2\right)\\

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

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


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

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube41.2%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999962e-25 < (/.f64 angle 180) < 4.00000000000000003e155

    1. Initial program 74.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow274.1%

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

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

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

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

    if 4.00000000000000003e155 < (/.f64 angle 180) < 2.0000000000000001e190

    1. Initial program 19.6%

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e190 < (/.f64 angle 180)

    1. Initial program 38.4%

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

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/326.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 68.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_0 := 2 \cdot \left(b + a\_m\right)\\
t_1 := \pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;b \leq 1.15 \cdot 10^{+244}:\\
\;\;\;\;\sqrt[3]{{\cos t\_1}^{3}} \cdot \left(\left(b - a\_m\right) \cdot \left(t\_0 \cdot \sin t\_1\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\_m\right) \cdot \left(t\_0 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle\_m}{180}\right)\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.15e244

    1. Initial program 58.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube42.3%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/331.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e244 < b

    1. Initial program 50.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube50.9%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/337.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 3.70000000000000003e250

    1. Initial program 59.1%

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

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/331.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.70000000000000003e250 < b

    1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 68.1% accurate, 1.0× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(b - a\_m\right) \cdot \left(t\_0 \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(angle\_m \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right) \cdot t\_1\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 5.80000000000000013e243

    1. Initial program 58.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube42.3%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/331.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.80000000000000013e243 < b

    1. Initial program 50.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube50.9%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/337.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 68.2% accurate, 1.7× speedup?

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

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 4 \cdot 10^{+155} \lor \neg \left(\frac{angle\_m}{180} \leq 10^{+198}\right):\\
\;\;\;\;t\_1 \cdot \left(t\_0 \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\_m\right)\right)\right)\\

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


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

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube41.2%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999962e-25 < (/.f64 angle 180) < 4.00000000000000003e155 or 1.00000000000000002e198 < (/.f64 angle 180)

    1. Initial program 61.4%

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000003e155 < (/.f64 angle 180) < 1.00000000000000002e198

    1. Initial program 16.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow216.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 68.3% accurate, 1.7× speedup?

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

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

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

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

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


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

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube41.2%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/329.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999962e-25 < (/.f64 angle 180) < 4.00000000000000003e155

    1. Initial program 74.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow274.1%

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

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

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

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

    if 4.00000000000000003e155 < (/.f64 angle 180) < 1.00000000000000002e198

    1. Initial program 16.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow216.9%

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000002e198 < (/.f64 angle 180)

    1. Initial program 42.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow242.9%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 68.1% accurate, 1.9× speedup?

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

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

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

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/331.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \cos \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b - a\right) \cdot \left(\left(2 \cdot \left(b + a\right)\right) \cdot \sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
  10. Add Preprocessing

Alternative 8: 65.7% accurate, 3.1× speedup?

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

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

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

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

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


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

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube43.6%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/330.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e14 < (/.f64 angle 180) < 5.00000000000000025e116

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow262.2%

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

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

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

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

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

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

    if 5.00000000000000025e116 < (/.f64 angle 180) < 6.0000000000000004e197

    1. Initial program 32.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow232.8%

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000004e197 < (/.f64 angle 180)

    1. Initial program 41.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow241.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 65.5% accurate, 3.1× speedup?

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

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

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

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

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


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

    1. Initial program 62.4%

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

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/330.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e6 < (/.f64 angle 180) < 5.00000000000000025e116

    1. Initial program 67.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow267.3%

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

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

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

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

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

    if 5.00000000000000025e116 < (/.f64 angle 180) < 6.0000000000000004e197

    1. Initial program 32.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow232.8%

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000004e197 < (/.f64 angle 180)

    1. Initial program 41.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow241.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 65.9% accurate, 3.1× speedup?

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

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

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

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

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


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

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube40.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/329.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999986e-34 < (/.f64 angle 180) < 5.0000000000000003e139

    1. Initial program 80.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow280.5%

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e139 < (/.f64 angle 180) < 6.0000000000000004e197

    1. Initial program 29.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow229.5%

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000004e197 < (/.f64 angle 180)

    1. Initial program 41.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow241.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.0% accurate, 3.1× speedup?

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

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

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

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

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


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

    1. Initial program 63.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. Add Preprocessing
    3. Step-by-step derivation
      1. add-cbrt-cube43.8%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \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. pow1/330.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e13 < (/.f64 angle 180) < 5.0000000000000003e139

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e139 < (/.f64 angle 180) < 6.0000000000000004e197

    1. Initial program 29.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow229.5%

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000004e197 < (/.f64 angle 180)

    1. Initial program 41.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow241.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 55.5% accurate, 3.5× speedup?

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

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

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


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

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow260.2%

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

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

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

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

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

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

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

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

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

    if 5.5000000000000003e153 < a

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 55.5% accurate, 3.5× speedup?

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

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

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


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

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. unpow260.2%

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

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

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

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

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

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

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

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

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

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

    if 9.4999999999999995e153 < a

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 54.9% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 15: 54.9% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 54.9% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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