ab-angle->ABCF B

Percentage Accurate: 53.7% → 67.2%
Time: 46.9s
Alternatives: 19
Speedup: 5.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 53.7% accurate, 1.0× speedup?

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

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

Alternative 1: 67.2% accurate, 0.6× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_1 := \left(b - a\right) \cdot \left(b + a\right)\\ t_2 := t_1 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\\ t_3 := \sqrt[3]{angle \cdot \pi}\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+282}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot t_2\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{+117}:\\ \;\;\;\;2 \cdot \left(t_2 \cdot \sin \left(\frac{{t_3}^{2}}{\frac{180}{t_3}}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -1 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(t_1 \cdot {\left(\sqrt[3]{\cos \left(\left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\ \;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\ \;\;\;\;2 \cdot \left(\sin \left({\left(\sqrt{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}\right) \cdot \left(t_1 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_1 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle (- b a))))
        (t_1 (* (- b a) (+ b a)))
        (t_2 (* t_1 (cos (* angle (/ PI -180.0)))))
        (t_3 (cbrt (* angle PI))))
   (if (<= (/ angle 180.0) -5e+282)
     (* 2.0 (* (sin (/ (* angle PI) -180.0)) t_2))
     (if (<= (/ angle 180.0) -5e+117)
       (* 2.0 (* t_2 (sin (/ (pow t_3 2.0) (/ 180.0 t_3)))))
       (if (<= (/ angle 180.0) -1e-115)
         (*
          2.0
          (*
           (sin (* PI (* angle 0.005555555555555556)))
           (*
            t_1
            (pow
             (cbrt
              (cos
               (*
                (* (cbrt PI) (pow (cbrt PI) 2.0))
                (* angle 0.005555555555555556))))
             3.0))))
         (if (<= (/ angle 180.0) 1e-39)
           (* (+ (* b t_0) (* a t_0)) 0.011111111111111112)
           (if (<= (/ angle 180.0) 1e+87)
             (*
              2.0
              (*
               (sin (pow (sqrt (* angle (* PI 0.005555555555555556))) 2.0))
               (* t_1 (cos (* angle (/ (cbrt (* PI (pow PI 2.0))) -180.0))))))
             (*
              2.0
              (*
               (sin (/ PI (/ 180.0 angle)))
               (*
                t_1
                (sqrt
                 (pow
                  (cos (* 0.005555555555555556 (* angle PI)))
                  2.0))))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double t_2 = t_1 * cos((angle * (((double) M_PI) / -180.0)));
	double t_3 = cbrt((angle * ((double) M_PI)));
	double tmp;
	if ((angle / 180.0) <= -5e+282) {
		tmp = 2.0 * (sin(((angle * ((double) M_PI)) / -180.0)) * t_2);
	} else if ((angle / 180.0) <= -5e+117) {
		tmp = 2.0 * (t_2 * sin((pow(t_3, 2.0) / (180.0 / t_3))));
	} else if ((angle / 180.0) <= -1e-115) {
		tmp = 2.0 * (sin((((double) M_PI) * (angle * 0.005555555555555556))) * (t_1 * pow(cbrt(cos(((cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0)) * (angle * 0.005555555555555556)))), 3.0)));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * (sin(pow(sqrt((angle * (((double) M_PI) * 0.005555555555555556))), 2.0)) * (t_1 * cos((angle * (cbrt((((double) M_PI) * pow(((double) M_PI), 2.0))) / -180.0)))));
	} else {
		tmp = 2.0 * (sin((((double) M_PI) / (180.0 / angle))) * (t_1 * sqrt(pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double t_2 = t_1 * Math.cos((angle * (Math.PI / -180.0)));
	double t_3 = Math.cbrt((angle * Math.PI));
	double tmp;
	if ((angle / 180.0) <= -5e+282) {
		tmp = 2.0 * (Math.sin(((angle * Math.PI) / -180.0)) * t_2);
	} else if ((angle / 180.0) <= -5e+117) {
		tmp = 2.0 * (t_2 * Math.sin((Math.pow(t_3, 2.0) / (180.0 / t_3))));
	} else if ((angle / 180.0) <= -1e-115) {
		tmp = 2.0 * (Math.sin((Math.PI * (angle * 0.005555555555555556))) * (t_1 * Math.pow(Math.cbrt(Math.cos(((Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0)) * (angle * 0.005555555555555556)))), 3.0)));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * (Math.sin(Math.pow(Math.sqrt((angle * (Math.PI * 0.005555555555555556))), 2.0)) * (t_1 * Math.cos((angle * (Math.cbrt((Math.PI * Math.pow(Math.PI, 2.0))) / -180.0)))));
	} else {
		tmp = 2.0 * (Math.sin((Math.PI / (180.0 / angle))) * (t_1 * Math.sqrt(Math.pow(Math.cos((0.005555555555555556 * (angle * Math.PI))), 2.0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * Float64(b - a)))
	t_1 = Float64(Float64(b - a) * Float64(b + a))
	t_2 = Float64(t_1 * cos(Float64(angle * Float64(pi / -180.0))))
	t_3 = cbrt(Float64(angle * pi))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e+282)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle * pi) / -180.0)) * t_2));
	elseif (Float64(angle / 180.0) <= -5e+117)
		tmp = Float64(2.0 * Float64(t_2 * sin(Float64((t_3 ^ 2.0) / Float64(180.0 / t_3)))));
	elseif (Float64(angle / 180.0) <= -1e-115)
		tmp = Float64(2.0 * Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * Float64(t_1 * (cbrt(cos(Float64(Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)) * Float64(angle * 0.005555555555555556)))) ^ 3.0))));
	elseif (Float64(angle / 180.0) <= 1e-39)
		tmp = Float64(Float64(Float64(b * t_0) + Float64(a * t_0)) * 0.011111111111111112);
	elseif (Float64(angle / 180.0) <= 1e+87)
		tmp = Float64(2.0 * Float64(sin((sqrt(Float64(angle * Float64(pi * 0.005555555555555556))) ^ 2.0)) * Float64(t_1 * cos(Float64(angle * Float64(cbrt(Float64(pi * (pi ^ 2.0))) / -180.0))))));
	else
		tmp = Float64(2.0 * Float64(sin(Float64(pi / Float64(180.0 / angle))) * Float64(t_1 * sqrt((cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0)))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(angle * Pi), $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+282], N[(2.0 * N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] / -180.0), $MachinePrecision]], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+117], N[(2.0 * N[(t$95$2 * N[Sin[N[(N[Power[t$95$3, 2.0], $MachinePrecision] / N[(180.0 / t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e-115], N[(2.0 * N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Power[N[Power[N[Cos[N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-39], N[(N[(N[(b * t$95$0), $MachinePrecision] + N[(a * t$95$0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+87], N[(2.0 * N[(N[Sin[N[Power[N[Sqrt[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Cos[N[(angle * N[(N[Power[N[(Pi * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Sqrt[N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
t_2 := t_1 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\\
t_3 := \sqrt[3]{angle \cdot \pi}\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+282}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot t_2\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{+117}:\\
\;\;\;\;2 \cdot \left(t_2 \cdot \sin \left(\frac{{t_3}^{2}}{\frac{180}{t_3}}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -1 \cdot 10^{-115}:\\
\;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(t_1 \cdot {\left(\sqrt[3]{\cos \left(\left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\
\;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\
\;\;\;\;2 \cdot \left(\sin \left({\left(\sqrt{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}\right) \cdot \left(t_1 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_1 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 angle 180) < -4.99999999999999978e282

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999978e282 < (/.f64 angle 180) < -4.99999999999999983e117

    1. Initial program 22.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. Simplified22.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999983e117 < (/.f64 angle 180) < -1.0000000000000001e-115

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \color{blue}{\left(\pi \cdot \frac{angle}{180}\right)}\right)\right) \]
      16. add-cube-cbrt75.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.0000000000000001e-115 < (/.f64 angle 180) < 9.99999999999999929e-40

    1. Initial program 62.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. Simplified63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999929e-40 < (/.f64 angle 180) < 9.9999999999999996e86

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e86 < (/.f64 angle 180)

    1. Initial program 23.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. Simplified26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+282}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{+117}:\\ \;\;\;\;2 \cdot \left(\left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right) \cdot \sin \left(\frac{{\left(\sqrt[3]{angle \cdot \pi}\right)}^{2}}{\frac{180}{\sqrt[3]{angle \cdot \pi}}}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -1 \cdot 10^{-115}:\\ \;\;\;\;2 \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot {\left(\sqrt[3]{\cos \left(\left(\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\ \;\;\;\;\left(b \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) + a \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\ \;\;\;\;2 \cdot \left(\sin \left({\left(\sqrt{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\ \end{array} \]

Alternative 2: 67.4% accurate, 0.7× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\\ t_2 := \sqrt[3]{angle \cdot \pi}\\ t_3 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\ t_4 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+282}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot t_1\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+133}:\\ \;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{{t_2}^{2}}{\frac{180}{t_2}}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\ \;\;\;\;\left(b \cdot t_4 + a \cdot t_4\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\ \;\;\;\;2 \cdot \left(\sin \left({\left(\sqrt{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}\right) \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a)))
        (t_1 (* t_0 (cos (* angle (/ PI -180.0)))))
        (t_2 (cbrt (* angle PI)))
        (t_3 (sin (/ PI (/ 180.0 angle))))
        (t_4 (* PI (* angle (- b a)))))
   (if (<= (/ angle 180.0) -5e+282)
     (* 2.0 (* (sin (/ (* angle PI) -180.0)) t_1))
     (if (<= (/ angle 180.0) -2e+133)
       (* 2.0 (* t_1 (sin (/ (pow t_2 2.0) (/ 180.0 t_2)))))
       (if (<= (/ angle 180.0) -5e-83)
         (*
          2.0
          (*
           t_3
           (*
            t_0
            (cos (* angle (/ (* (cbrt PI) (pow (cbrt PI) 2.0)) -180.0))))))
         (if (<= (/ angle 180.0) 1e-39)
           (* (+ (* b t_4) (* a t_4)) 0.011111111111111112)
           (if (<= (/ angle 180.0) 1e+87)
             (*
              2.0
              (*
               (sin (pow (sqrt (* angle (* PI 0.005555555555555556))) 2.0))
               (* t_0 (cos (* angle (/ (cbrt (* PI (pow PI 2.0))) -180.0))))))
             (*
              2.0
              (*
               t_3
               (*
                t_0
                (sqrt
                 (pow
                  (cos (* 0.005555555555555556 (* angle PI)))
                  2.0))))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = t_0 * cos((angle * (((double) M_PI) / -180.0)));
	double t_2 = cbrt((angle * ((double) M_PI)));
	double t_3 = sin((((double) M_PI) / (180.0 / angle)));
	double t_4 = ((double) M_PI) * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e+282) {
		tmp = 2.0 * (sin(((angle * ((double) M_PI)) / -180.0)) * t_1);
	} else if ((angle / 180.0) <= -2e+133) {
		tmp = 2.0 * (t_1 * sin((pow(t_2, 2.0) / (180.0 / t_2))));
	} else if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (t_3 * (t_0 * cos((angle * ((cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0)) / -180.0)))));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_4) + (a * t_4)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * (sin(pow(sqrt((angle * (((double) M_PI) * 0.005555555555555556))), 2.0)) * (t_0 * cos((angle * (cbrt((((double) M_PI) * pow(((double) M_PI), 2.0))) / -180.0)))));
	} else {
		tmp = 2.0 * (t_3 * (t_0 * sqrt(pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = t_0 * Math.cos((angle * (Math.PI / -180.0)));
	double t_2 = Math.cbrt((angle * Math.PI));
	double t_3 = Math.sin((Math.PI / (180.0 / angle)));
	double t_4 = Math.PI * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e+282) {
		tmp = 2.0 * (Math.sin(((angle * Math.PI) / -180.0)) * t_1);
	} else if ((angle / 180.0) <= -2e+133) {
		tmp = 2.0 * (t_1 * Math.sin((Math.pow(t_2, 2.0) / (180.0 / t_2))));
	} else if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (t_3 * (t_0 * Math.cos((angle * ((Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0)) / -180.0)))));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_4) + (a * t_4)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * (Math.sin(Math.pow(Math.sqrt((angle * (Math.PI * 0.005555555555555556))), 2.0)) * (t_0 * Math.cos((angle * (Math.cbrt((Math.PI * Math.pow(Math.PI, 2.0))) / -180.0)))));
	} else {
		tmp = 2.0 * (t_3 * (t_0 * Math.sqrt(Math.pow(Math.cos((0.005555555555555556 * (angle * Math.PI))), 2.0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(t_0 * cos(Float64(angle * Float64(pi / -180.0))))
	t_2 = cbrt(Float64(angle * pi))
	t_3 = sin(Float64(pi / Float64(180.0 / angle)))
	t_4 = Float64(pi * Float64(angle * Float64(b - a)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e+282)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle * pi) / -180.0)) * t_1));
	elseif (Float64(angle / 180.0) <= -2e+133)
		tmp = Float64(2.0 * Float64(t_1 * sin(Float64((t_2 ^ 2.0) / Float64(180.0 / t_2)))));
	elseif (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(t_3 * Float64(t_0 * cos(Float64(angle * Float64(Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)) / -180.0))))));
	elseif (Float64(angle / 180.0) <= 1e-39)
		tmp = Float64(Float64(Float64(b * t_4) + Float64(a * t_4)) * 0.011111111111111112);
	elseif (Float64(angle / 180.0) <= 1e+87)
		tmp = Float64(2.0 * Float64(sin((sqrt(Float64(angle * Float64(pi * 0.005555555555555556))) ^ 2.0)) * Float64(t_0 * cos(Float64(angle * Float64(cbrt(Float64(pi * (pi ^ 2.0))) / -180.0))))));
	else
		tmp = Float64(2.0 * Float64(t_3 * Float64(t_0 * sqrt((cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0)))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(angle * Pi), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+282], N[(2.0 * N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] / -180.0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+133], N[(2.0 * N[(t$95$1 * N[Sin[N[(N[Power[t$95$2, 2.0], $MachinePrecision] / N[(180.0 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(t$95$3 * N[(t$95$0 * N[Cos[N[(angle * N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-39], N[(N[(N[(b * t$95$4), $MachinePrecision] + N[(a * t$95$4), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+87], N[(2.0 * N[(N[Sin[N[Power[N[Sqrt[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Cos[N[(angle * N[(N[Power[N[(Pi * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$3 * N[(t$95$0 * N[Sqrt[N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\\
t_2 := \sqrt[3]{angle \cdot \pi}\\
t_3 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\
t_4 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+282}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot t_1\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+133}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{{t_2}^{2}}{\frac{180}{t_2}}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\
\;\;\;\;\left(b \cdot t_4 + a \cdot t_4\right) \cdot 0.011111111111111112\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\
\;\;\;\;2 \cdot \left(\sin \left({\left(\sqrt{angle \cdot \left(\pi \cdot 0.005555555555555556\right)}\right)}^{2}\right) \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 angle 180) < -4.99999999999999978e282

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999978e282 < (/.f64 angle 180) < -2e133

    1. Initial program 22.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. Simplified23.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e133 < (/.f64 angle 180) < -5e-83

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 9.99999999999999929e-40

    1. Initial program 64.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. Simplified64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999929e-40 < (/.f64 angle 180) < 9.9999999999999996e86

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e86 < (/.f64 angle 180)

    1. Initial program 23.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. Simplified26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.4% accurate, 0.7× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\\ t_2 := \sqrt[3]{angle \cdot \pi}\\ t_3 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\ t_4 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+282}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot t_1\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+133}:\\ \;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{{t_2}^{2}}{\frac{180}{t_2}}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\ \;\;\;\;\left(b \cdot t_4 + a \cdot t_4\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\ \;\;\;\;2 \cdot \left(\left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right) \cdot t_3\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a)))
        (t_1 (* t_0 (cos (* angle (/ PI -180.0)))))
        (t_2 (cbrt (* angle PI)))
        (t_3 (sin (/ PI (/ 180.0 angle))))
        (t_4 (* PI (* angle (- b a)))))
   (if (<= (/ angle 180.0) -5e+282)
     (* 2.0 (* (sin (/ (* angle PI) -180.0)) t_1))
     (if (<= (/ angle 180.0) -2e+133)
       (* 2.0 (* t_1 (sin (/ (pow t_2 2.0) (/ 180.0 t_2)))))
       (if (<= (/ angle 180.0) -5e-83)
         (*
          2.0
          (*
           t_3
           (*
            t_0
            (cos (* angle (/ (* (cbrt PI) (pow (cbrt PI) 2.0)) -180.0))))))
         (if (<= (/ angle 180.0) 1e-39)
           (* (+ (* b t_4) (* a t_4)) 0.011111111111111112)
           (if (<= (/ angle 180.0) 1e+87)
             (*
              2.0
              (*
               (* t_0 (cos (* angle (/ (cbrt (* PI (pow PI 2.0))) -180.0))))
               t_3))
             (*
              2.0
              (*
               t_3
               (*
                t_0
                (sqrt
                 (pow
                  (cos (* 0.005555555555555556 (* angle PI)))
                  2.0))))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = t_0 * cos((angle * (((double) M_PI) / -180.0)));
	double t_2 = cbrt((angle * ((double) M_PI)));
	double t_3 = sin((((double) M_PI) / (180.0 / angle)));
	double t_4 = ((double) M_PI) * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e+282) {
		tmp = 2.0 * (sin(((angle * ((double) M_PI)) / -180.0)) * t_1);
	} else if ((angle / 180.0) <= -2e+133) {
		tmp = 2.0 * (t_1 * sin((pow(t_2, 2.0) / (180.0 / t_2))));
	} else if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (t_3 * (t_0 * cos((angle * ((cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0)) / -180.0)))));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_4) + (a * t_4)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * ((t_0 * cos((angle * (cbrt((((double) M_PI) * pow(((double) M_PI), 2.0))) / -180.0)))) * t_3);
	} else {
		tmp = 2.0 * (t_3 * (t_0 * sqrt(pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = t_0 * Math.cos((angle * (Math.PI / -180.0)));
	double t_2 = Math.cbrt((angle * Math.PI));
	double t_3 = Math.sin((Math.PI / (180.0 / angle)));
	double t_4 = Math.PI * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e+282) {
		tmp = 2.0 * (Math.sin(((angle * Math.PI) / -180.0)) * t_1);
	} else if ((angle / 180.0) <= -2e+133) {
		tmp = 2.0 * (t_1 * Math.sin((Math.pow(t_2, 2.0) / (180.0 / t_2))));
	} else if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (t_3 * (t_0 * Math.cos((angle * ((Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0)) / -180.0)))));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_4) + (a * t_4)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * ((t_0 * Math.cos((angle * (Math.cbrt((Math.PI * Math.pow(Math.PI, 2.0))) / -180.0)))) * t_3);
	} else {
		tmp = 2.0 * (t_3 * (t_0 * Math.sqrt(Math.pow(Math.cos((0.005555555555555556 * (angle * Math.PI))), 2.0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(t_0 * cos(Float64(angle * Float64(pi / -180.0))))
	t_2 = cbrt(Float64(angle * pi))
	t_3 = sin(Float64(pi / Float64(180.0 / angle)))
	t_4 = Float64(pi * Float64(angle * Float64(b - a)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e+282)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle * pi) / -180.0)) * t_1));
	elseif (Float64(angle / 180.0) <= -2e+133)
		tmp = Float64(2.0 * Float64(t_1 * sin(Float64((t_2 ^ 2.0) / Float64(180.0 / t_2)))));
	elseif (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(t_3 * Float64(t_0 * cos(Float64(angle * Float64(Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)) / -180.0))))));
	elseif (Float64(angle / 180.0) <= 1e-39)
		tmp = Float64(Float64(Float64(b * t_4) + Float64(a * t_4)) * 0.011111111111111112);
	elseif (Float64(angle / 180.0) <= 1e+87)
		tmp = Float64(2.0 * Float64(Float64(t_0 * cos(Float64(angle * Float64(cbrt(Float64(pi * (pi ^ 2.0))) / -180.0)))) * t_3));
	else
		tmp = Float64(2.0 * Float64(t_3 * Float64(t_0 * sqrt((cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0)))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(angle * Pi), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$4 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e+282], N[(2.0 * N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] / -180.0), $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+133], N[(2.0 * N[(t$95$1 * N[Sin[N[(N[Power[t$95$2, 2.0], $MachinePrecision] / N[(180.0 / t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(t$95$3 * N[(t$95$0 * N[Cos[N[(angle * N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-39], N[(N[(N[(b * t$95$4), $MachinePrecision] + N[(a * t$95$4), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+87], N[(2.0 * N[(N[(t$95$0 * N[Cos[N[(angle * N[(N[Power[N[(Pi * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$3 * N[(t$95$0 * N[Sqrt[N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := t_0 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\\
t_2 := \sqrt[3]{angle \cdot \pi}\\
t_3 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\
t_4 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+282}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot t_1\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -2 \cdot 10^{+133}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{{t_2}^{2}}{\frac{180}{t_2}}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\
\;\;\;\;\left(b \cdot t_4 + a \cdot t_4\right) \cdot 0.011111111111111112\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\
\;\;\;\;2 \cdot \left(\left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right) \cdot t_3\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_3 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if (/.f64 angle 180) < -4.99999999999999978e282

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999978e282 < (/.f64 angle 180) < -2e133

    1. Initial program 22.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. Simplified23.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e133 < (/.f64 angle 180) < -5e-83

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 9.99999999999999929e-40

    1. Initial program 64.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. Simplified64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999929e-40 < (/.f64 angle 180) < 9.9999999999999996e86

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e86 < (/.f64 angle 180)

    1. Initial program 23.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. Simplified26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.1% accurate, 0.7× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_2 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(t_2 \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\ \;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\ \;\;\;\;2 \cdot \left(\left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right) \cdot t_2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_2 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a)))
        (t_1 (* PI (* angle (- b a))))
        (t_2 (sin (/ PI (/ 180.0 angle)))))
   (if (<= (/ angle 180.0) -5e-83)
     (*
      2.0
      (*
       t_2
       (* t_0 (cos (* angle (/ (* (cbrt PI) (pow (cbrt PI) 2.0)) -180.0))))))
     (if (<= (/ angle 180.0) 1e-39)
       (* (+ (* b t_1) (* a t_1)) 0.011111111111111112)
       (if (<= (/ angle 180.0) 1e+87)
         (*
          2.0
          (*
           (* t_0 (cos (* angle (/ (cbrt (* PI (pow PI 2.0))) -180.0))))
           t_2))
         (*
          2.0
          (*
           t_2
           (*
            t_0
            (sqrt
             (pow (cos (* 0.005555555555555556 (* angle PI))) 2.0))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = ((double) M_PI) * (angle * (b - a));
	double t_2 = sin((((double) M_PI) / (180.0 / angle)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (t_2 * (t_0 * cos((angle * ((cbrt(((double) M_PI)) * pow(cbrt(((double) M_PI)), 2.0)) / -180.0)))));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * ((t_0 * cos((angle * (cbrt((((double) M_PI) * pow(((double) M_PI), 2.0))) / -180.0)))) * t_2);
	} else {
		tmp = 2.0 * (t_2 * (t_0 * sqrt(pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = Math.PI * (angle * (b - a));
	double t_2 = Math.sin((Math.PI / (180.0 / angle)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (t_2 * (t_0 * Math.cos((angle * ((Math.cbrt(Math.PI) * Math.pow(Math.cbrt(Math.PI), 2.0)) / -180.0)))));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * ((t_0 * Math.cos((angle * (Math.cbrt((Math.PI * Math.pow(Math.PI, 2.0))) / -180.0)))) * t_2);
	} else {
		tmp = 2.0 * (t_2 * (t_0 * Math.sqrt(Math.pow(Math.cos((0.005555555555555556 * (angle * Math.PI))), 2.0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(pi * Float64(angle * Float64(b - a)))
	t_2 = sin(Float64(pi / Float64(180.0 / angle)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(t_2 * Float64(t_0 * cos(Float64(angle * Float64(Float64(cbrt(pi) * (cbrt(pi) ^ 2.0)) / -180.0))))));
	elseif (Float64(angle / 180.0) <= 1e-39)
		tmp = Float64(Float64(Float64(b * t_1) + Float64(a * t_1)) * 0.011111111111111112);
	elseif (Float64(angle / 180.0) <= 1e+87)
		tmp = Float64(2.0 * Float64(Float64(t_0 * cos(Float64(angle * Float64(cbrt(Float64(pi * (pi ^ 2.0))) / -180.0)))) * t_2));
	else
		tmp = Float64(2.0 * Float64(t_2 * Float64(t_0 * sqrt((cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0)))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(t$95$2 * N[(t$95$0 * N[Cos[N[(angle * N[(N[(N[Power[Pi, 1/3], $MachinePrecision] * N[Power[N[Power[Pi, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-39], N[(N[(N[(b * t$95$1), $MachinePrecision] + N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+87], N[(2.0 * N[(N[(t$95$0 * N[Cos[N[(angle * N[(N[Power[N[(Pi * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$2 * N[(t$95$0 * N[Sqrt[N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_2 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(t_2 \cdot \left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi} \cdot {\left(\sqrt[3]{\pi}\right)}^{2}}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\
\;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\
\;\;\;\;2 \cdot \left(\left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right) \cdot t_2\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_2 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\


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

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 9.99999999999999929e-40

    1. Initial program 64.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. Simplified64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999929e-40 < (/.f64 angle 180) < 9.9999999999999996e86

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e86 < (/.f64 angle 180)

    1. Initial program 23.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. Simplified26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 66.9% accurate, 0.8× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_2 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\ \;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\ \;\;\;\;2 \cdot \left(\left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right) \cdot t_2\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_2 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a)))
        (t_1 (* PI (* angle (- b a))))
        (t_2 (sin (/ PI (/ 180.0 angle)))))
   (if (<= (/ angle 180.0) -5e-83)
     (*
      2.0
      (*
       (sin (* (/ angle 180.0) PI))
       (* t_0 (pow (cbrt (cos (* PI (* angle 0.005555555555555556)))) 3.0))))
     (if (<= (/ angle 180.0) 1e-39)
       (* (+ (* b t_1) (* a t_1)) 0.011111111111111112)
       (if (<= (/ angle 180.0) 1e+87)
         (*
          2.0
          (*
           (* t_0 (cos (* angle (/ (cbrt (* PI (pow PI 2.0))) -180.0))))
           t_2))
         (*
          2.0
          (*
           t_2
           (*
            t_0
            (sqrt
             (pow (cos (* 0.005555555555555556 (* angle PI))) 2.0))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = ((double) M_PI) * (angle * (b - a));
	double t_2 = sin((((double) M_PI) / (180.0 / angle)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (sin(((angle / 180.0) * ((double) M_PI))) * (t_0 * pow(cbrt(cos((((double) M_PI) * (angle * 0.005555555555555556)))), 3.0)));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * ((t_0 * cos((angle * (cbrt((((double) M_PI) * pow(((double) M_PI), 2.0))) / -180.0)))) * t_2);
	} else {
		tmp = 2.0 * (t_2 * (t_0 * sqrt(pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = Math.PI * (angle * (b - a));
	double t_2 = Math.sin((Math.PI / (180.0 / angle)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (Math.sin(((angle / 180.0) * Math.PI)) * (t_0 * Math.pow(Math.cbrt(Math.cos((Math.PI * (angle * 0.005555555555555556)))), 3.0)));
	} else if ((angle / 180.0) <= 1e-39) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else if ((angle / 180.0) <= 1e+87) {
		tmp = 2.0 * ((t_0 * Math.cos((angle * (Math.cbrt((Math.PI * Math.pow(Math.PI, 2.0))) / -180.0)))) * t_2);
	} else {
		tmp = 2.0 * (t_2 * (t_0 * Math.sqrt(Math.pow(Math.cos((0.005555555555555556 * (angle * Math.PI))), 2.0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(pi * Float64(angle * Float64(b - a)))
	t_2 = sin(Float64(pi / Float64(180.0 / angle)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle / 180.0) * pi)) * Float64(t_0 * (cbrt(cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 3.0))));
	elseif (Float64(angle / 180.0) <= 1e-39)
		tmp = Float64(Float64(Float64(b * t_1) + Float64(a * t_1)) * 0.011111111111111112);
	elseif (Float64(angle / 180.0) <= 1e+87)
		tmp = Float64(2.0 * Float64(Float64(t_0 * cos(Float64(angle * Float64(cbrt(Float64(pi * (pi ^ 2.0))) / -180.0)))) * t_2));
	else
		tmp = Float64(2.0 * Float64(t_2 * Float64(t_0 * sqrt((cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0)))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Power[N[Power[N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e-39], N[(N[(N[(b * t$95$1), $MachinePrecision] + N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+87], N[(2.0 * N[(N[(t$95$0 * N[Cos[N[(angle * N[(N[Power[N[(Pi * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(t$95$2 * N[(t$95$0 * N[Sqrt[N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_2 := \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{-39}:\\
\;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{+87}:\\
\;\;\;\;2 \cdot \left(\left(t_0 \cdot \cos \left(angle \cdot \frac{\sqrt[3]{\pi \cdot {\pi}^{2}}}{-180}\right)\right) \cdot t_2\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_2 \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\


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

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 9.99999999999999929e-40

    1. Initial program 64.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. Simplified64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999929e-40 < (/.f64 angle 180) < 9.9999999999999996e86

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999996e86 < (/.f64 angle 180)

    1. Initial program 23.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. Simplified26.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 66.4% accurate, 1.0× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a))) (t_1 (* PI (* angle (- b a)))))
   (if (<= (/ angle 180.0) -5e-83)
     (*
      2.0
      (*
       (sin (* (/ angle 180.0) PI))
       (* t_0 (pow (cbrt (cos (* PI (* angle 0.005555555555555556)))) 3.0))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_1) (* a t_1)) 0.011111111111111112)
       (*
        2.0
        (*
         (sin (/ PI (/ 180.0 angle)))
         (*
          t_0
          (sqrt (pow (cos (* 0.005555555555555556 (* angle PI))) 2.0)))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = ((double) M_PI) * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (sin(((angle / 180.0) * ((double) M_PI))) * (t_0 * pow(cbrt(cos((((double) M_PI) * (angle * 0.005555555555555556)))), 3.0)));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (sin((((double) M_PI) / (180.0 / angle))) * (t_0 * sqrt(pow(cos((0.005555555555555556 * (angle * ((double) M_PI)))), 2.0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = Math.PI * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (Math.sin(((angle / 180.0) * Math.PI)) * (t_0 * Math.pow(Math.cbrt(Math.cos((Math.PI * (angle * 0.005555555555555556)))), 3.0)));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (Math.sin((Math.PI / (180.0 / angle))) * (t_0 * Math.sqrt(Math.pow(Math.cos((0.005555555555555556 * (angle * Math.PI))), 2.0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(pi * Float64(angle * Float64(b - a)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle / 180.0) * pi)) * Float64(t_0 * (cbrt(cos(Float64(pi * Float64(angle * 0.005555555555555556)))) ^ 3.0))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_1) + Float64(a * t_1)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(sin(Float64(pi / Float64(180.0 / angle))) * Float64(t_0 * sqrt((cos(Float64(0.005555555555555556 * Float64(angle * pi))) ^ 2.0)))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Power[N[Power[N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$1), $MachinePrecision] + N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Sqrt[N[Power[N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_0 \cdot \sqrt{{\cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}^{2}}\right)\right)\\


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

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 4e11

    1. Initial program 66.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. Simplified66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 66.4% accurate, 1.0× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_2 := \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot {\left(\sqrt[3]{t_2}\right)}^{3}\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_0 \cdot \left|t_2\right|\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a)))
        (t_1 (* PI (* angle (- b a))))
        (t_2 (cos (* PI (* angle 0.005555555555555556)))))
   (if (<= (/ angle 180.0) -5e-83)
     (* 2.0 (* (sin (* (/ angle 180.0) PI)) (* t_0 (pow (cbrt t_2) 3.0))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_1) (* a t_1)) 0.011111111111111112)
       (* 2.0 (* (sin (/ PI (/ 180.0 angle))) (* t_0 (fabs t_2))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = ((double) M_PI) * (angle * (b - a));
	double t_2 = cos((((double) M_PI) * (angle * 0.005555555555555556)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (sin(((angle / 180.0) * ((double) M_PI))) * (t_0 * pow(cbrt(t_2), 3.0)));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (sin((((double) M_PI) / (180.0 / angle))) * (t_0 * fabs(t_2)));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = Math.PI * (angle * (b - a));
	double t_2 = Math.cos((Math.PI * (angle * 0.005555555555555556)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (Math.sin(((angle / 180.0) * Math.PI)) * (t_0 * Math.pow(Math.cbrt(t_2), 3.0)));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (Math.sin((Math.PI / (180.0 / angle))) * (t_0 * Math.abs(t_2)));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(pi * Float64(angle * Float64(b - a)))
	t_2 = cos(Float64(pi * Float64(angle * 0.005555555555555556)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle / 180.0) * pi)) * Float64(t_0 * (cbrt(t_2) ^ 3.0))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_1) + Float64(a * t_1)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(sin(Float64(pi / Float64(180.0 / angle))) * Float64(t_0 * abs(t_2))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Power[N[Power[t$95$2, 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$1), $MachinePrecision] + N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_2 := \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot {\left(\sqrt[3]{t_2}\right)}^{3}\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_0 \cdot \left|t_2\right|\right)\right)\\


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

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 4e11

    1. Initial program 66.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. Simplified66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 66.4% accurate, 1.0× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_2 := \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_2\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_0 \cdot \left|t_2\right|\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a)))
        (t_1 (* PI (* angle (- b a))))
        (t_2 (cos (* PI (* angle 0.005555555555555556)))))
   (if (<= (/ angle 180.0) -5e-83)
     (* 2.0 (* (sin (* (/ angle 180.0) PI)) (* t_0 (log1p (expm1 t_2)))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_1) (* a t_1)) 0.011111111111111112)
       (* 2.0 (* (sin (/ PI (/ 180.0 angle))) (* t_0 (fabs t_2))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = ((double) M_PI) * (angle * (b - a));
	double t_2 = cos((((double) M_PI) * (angle * 0.005555555555555556)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (sin(((angle / 180.0) * ((double) M_PI))) * (t_0 * log1p(expm1(t_2))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (sin((((double) M_PI) / (180.0 / angle))) * (t_0 * fabs(t_2)));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = Math.PI * (angle * (b - a));
	double t_2 = Math.cos((Math.PI * (angle * 0.005555555555555556)));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (Math.sin(((angle / 180.0) * Math.PI)) * (t_0 * Math.log1p(Math.expm1(t_2))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (Math.sin((Math.PI / (180.0 / angle))) * (t_0 * Math.abs(t_2)));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = (b - a) * (b + a)
	t_1 = math.pi * (angle * (b - a))
	t_2 = math.cos((math.pi * (angle * 0.005555555555555556)))
	tmp = 0
	if (angle / 180.0) <= -5e-83:
		tmp = 2.0 * (math.sin(((angle / 180.0) * math.pi)) * (t_0 * math.log1p(math.expm1(t_2))))
	elif (angle / 180.0) <= 400000000000.0:
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112
	else:
		tmp = 2.0 * (math.sin((math.pi / (180.0 / angle))) * (t_0 * math.fabs(t_2)))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(pi * Float64(angle * Float64(b - a)))
	t_2 = cos(Float64(pi * Float64(angle * 0.005555555555555556)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle / 180.0) * pi)) * Float64(t_0 * log1p(expm1(t_2)))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_1) + Float64(a * t_1)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(sin(Float64(pi / Float64(180.0 / angle))) * Float64(t_0 * abs(t_2))));
	end
	return tmp
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Log[1 + N[(Exp[t$95$2] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$1), $MachinePrecision] + N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Abs[t$95$2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_2 := \cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(t_2\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_0 \cdot \left|t_2\right|\right)\right)\\


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

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 4e11

    1. Initial program 66.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. Simplified66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.1% accurate, 1.2× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_1 := \left(b - a\right) \cdot \left(b + a\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot \left(t_1 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_1 \cdot \left|\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right|\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle (- b a)))) (t_1 (* (- b a) (+ b a))))
   (if (<= (/ angle 180.0) -1e+20)
     (*
      2.0
      (* (sin (/ (* angle PI) -180.0)) (* t_1 (cos (* angle (/ PI -180.0))))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_0) (* a t_0)) 0.011111111111111112)
       (*
        2.0
        (*
         (sin (/ PI (/ 180.0 angle)))
         (* t_1 (fabs (cos (* PI (* angle 0.005555555555555556)))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -1e+20) {
		tmp = 2.0 * (sin(((angle * ((double) M_PI)) / -180.0)) * (t_1 * cos((angle * (((double) M_PI) / -180.0)))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (sin((((double) M_PI) / (180.0 / angle))) * (t_1 * fabs(cos((((double) M_PI) * (angle * 0.005555555555555556))))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -1e+20) {
		tmp = 2.0 * (Math.sin(((angle * Math.PI) / -180.0)) * (t_1 * Math.cos((angle * (Math.PI / -180.0)))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (Math.sin((Math.PI / (180.0 / angle))) * (t_1 * Math.abs(Math.cos((Math.PI * (angle * 0.005555555555555556))))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = math.pi * (angle * (b - a))
	t_1 = (b - a) * (b + a)
	tmp = 0
	if (angle / 180.0) <= -1e+20:
		tmp = 2.0 * (math.sin(((angle * math.pi) / -180.0)) * (t_1 * math.cos((angle * (math.pi / -180.0)))))
	elif (angle / 180.0) <= 400000000000.0:
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112
	else:
		tmp = 2.0 * (math.sin((math.pi / (180.0 / angle))) * (t_1 * math.fabs(math.cos((math.pi * (angle * 0.005555555555555556))))))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * Float64(b - a)))
	t_1 = Float64(Float64(b - a) * Float64(b + a))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -1e+20)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle * pi) / -180.0)) * Float64(t_1 * cos(Float64(angle * Float64(pi / -180.0))))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_0) + Float64(a * t_0)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(sin(Float64(pi / Float64(180.0 / angle))) * Float64(t_1 * abs(cos(Float64(pi * Float64(angle * 0.005555555555555556)))))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	t_0 = pi * (angle * (b - a));
	t_1 = (b - a) * (b + a);
	tmp = 0.0;
	if ((angle / 180.0) <= -1e+20)
		tmp = 2.0 * (sin(((angle * pi) / -180.0)) * (t_1 * cos((angle * (pi / -180.0)))));
	elseif ((angle / 180.0) <= 400000000000.0)
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	else
		tmp = 2.0 * (sin((pi / (180.0 / angle))) * (t_1 * abs(cos((pi * (angle * 0.005555555555555556))))));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e+20], N[(2.0 * N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] / -180.0), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$0), $MachinePrecision] + N[(a * t$95$0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Abs[N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot \left(t_1 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(t_1 \cdot \left|\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right|\right)\right)\\


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

    1. Initial program 24.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. Simplified23.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e20 < (/.f64 angle 180) < 4e11

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 66.6% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_1 := \left(b - a\right) \cdot \left(b + a\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-97}:\\ \;\;\;\;2 \cdot \left(\cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \left(t_1 \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle (- b a)))) (t_1 (* (- b a) (+ b a))))
   (if (<= (/ angle 180.0) -2e-97)
     (*
      2.0
      (*
       (cos (* (* angle PI) -0.005555555555555556))
       (* t_1 (sin (* 0.005555555555555556 (* angle PI))))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_0) (* a t_0)) 0.011111111111111112)
       (* 2.0 (* t_1 (sin (/ PI (/ 180.0 angle)))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -2e-97) {
		tmp = 2.0 * (cos(((angle * ((double) M_PI)) * -0.005555555555555556)) * (t_1 * sin((0.005555555555555556 * (angle * ((double) M_PI))))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_1 * sin((((double) M_PI) / (180.0 / angle))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -2e-97) {
		tmp = 2.0 * (Math.cos(((angle * Math.PI) * -0.005555555555555556)) * (t_1 * Math.sin((0.005555555555555556 * (angle * Math.PI)))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_1 * Math.sin((Math.PI / (180.0 / angle))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = math.pi * (angle * (b - a))
	t_1 = (b - a) * (b + a)
	tmp = 0
	if (angle / 180.0) <= -2e-97:
		tmp = 2.0 * (math.cos(((angle * math.pi) * -0.005555555555555556)) * (t_1 * math.sin((0.005555555555555556 * (angle * math.pi)))))
	elif (angle / 180.0) <= 400000000000.0:
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112
	else:
		tmp = 2.0 * (t_1 * math.sin((math.pi / (180.0 / angle))))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * Float64(b - a)))
	t_1 = Float64(Float64(b - a) * Float64(b + a))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -2e-97)
		tmp = Float64(2.0 * Float64(cos(Float64(Float64(angle * pi) * -0.005555555555555556)) * Float64(t_1 * sin(Float64(0.005555555555555556 * Float64(angle * pi))))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_0) + Float64(a * t_0)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(t_1 * sin(Float64(pi / Float64(180.0 / angle)))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	t_0 = pi * (angle * (b - a));
	t_1 = (b - a) * (b + a);
	tmp = 0.0;
	if ((angle / 180.0) <= -2e-97)
		tmp = 2.0 * (cos(((angle * pi) * -0.005555555555555556)) * (t_1 * sin((0.005555555555555556 * (angle * pi)))));
	elseif ((angle / 180.0) <= 400000000000.0)
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	else
		tmp = 2.0 * (t_1 * sin((pi / (180.0 / angle))));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e-97], N[(2.0 * N[(N[Cos[N[(N[(angle * Pi), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$0), $MachinePrecision] + N[(a * t$95$0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{-97}:\\
\;\;\;\;2 \cdot \left(\cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right) \cdot \left(t_1 \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\

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


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

    1. Initial program 43.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. Simplified42.6%

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

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

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

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

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

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

    if -2.00000000000000007e-97 < (/.f64 angle 180) < 4e11

    1. Initial program 65.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. Simplified65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.2% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_0 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a))) (t_1 (* PI (* angle (- b a)))))
   (if (<= (/ angle 180.0) -5e-83)
     (*
      2.0
      (*
       (sin (* (/ angle 180.0) PI))
       (* t_0 (cos (* (* angle PI) -0.005555555555555556)))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_1) (* a t_1)) 0.011111111111111112)
       (* 2.0 (* t_0 (sin (/ PI (/ 180.0 angle)))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = ((double) M_PI) * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (sin(((angle / 180.0) * ((double) M_PI))) * (t_0 * cos(((angle * ((double) M_PI)) * -0.005555555555555556))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_0 * sin((((double) M_PI) / (180.0 / angle))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double t_1 = Math.PI * (angle * (b - a));
	double tmp;
	if ((angle / 180.0) <= -5e-83) {
		tmp = 2.0 * (Math.sin(((angle / 180.0) * Math.PI)) * (t_0 * Math.cos(((angle * Math.PI) * -0.005555555555555556))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_0 * Math.sin((Math.PI / (180.0 / angle))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = (b - a) * (b + a)
	t_1 = math.pi * (angle * (b - a))
	tmp = 0
	if (angle / 180.0) <= -5e-83:
		tmp = 2.0 * (math.sin(((angle / 180.0) * math.pi)) * (t_0 * math.cos(((angle * math.pi) * -0.005555555555555556))))
	elif (angle / 180.0) <= 400000000000.0:
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112
	else:
		tmp = 2.0 * (t_0 * math.sin((math.pi / (180.0 / angle))))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	t_1 = Float64(pi * Float64(angle * Float64(b - a)))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -5e-83)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle / 180.0) * pi)) * Float64(t_0 * cos(Float64(Float64(angle * pi) * -0.005555555555555556)))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_1) + Float64(a * t_1)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(t_0 * sin(Float64(pi / Float64(180.0 / angle)))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	t_0 = (b - a) * (b + a);
	t_1 = pi * (angle * (b - a));
	tmp = 0.0;
	if ((angle / 180.0) <= -5e-83)
		tmp = 2.0 * (sin(((angle / 180.0) * pi)) * (t_0 * cos(((angle * pi) * -0.005555555555555556))));
	elseif ((angle / 180.0) <= 400000000000.0)
		tmp = ((b * t_1) + (a * t_1)) * 0.011111111111111112;
	else
		tmp = 2.0 * (t_0 * sin((pi / (180.0 / angle))));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -5e-83], N[(2.0 * N[(N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[(t$95$0 * N[Cos[N[(N[(angle * Pi), $MachinePrecision] * -0.005555555555555556), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$1), $MachinePrecision] + N[(a * t$95$1), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(t$95$0 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
t_1 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(t_0 \cdot \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_1 + a \cdot t_1\right) \cdot 0.011111111111111112\\

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


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

    1. Initial program 40.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. Simplified40.1%

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

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

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

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

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

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

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

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

    if -5e-83 < (/.f64 angle 180) < 4e11

    1. Initial program 66.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. Simplified66.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b + \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot a\right)} \cdot 0.011111111111111112 \]

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    3. Step-by-step derivation
      1. unpow226.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow226.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares36.3%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    4. Applied egg-rr36.3%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Step-by-step derivation
      1. clear-num32.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. un-div-inv32.1%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Applied egg-rr32.1%

      \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    7. Taylor expanded in angle around 0 41.3%

      \[\leadsto 2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{1}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{-83}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \cos \left(\left(angle \cdot \pi\right) \cdot -0.005555555555555556\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) + a \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\ \end{array} \]

Alternative 12: 66.0% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_1 := \left(b - a\right) \cdot \left(b + a\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot \left(t_1 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle (- b a)))) (t_1 (* (- b a) (+ b a))))
   (if (<= (/ angle 180.0) -1e+20)
     (*
      2.0
      (* (sin (/ (* angle PI) -180.0)) (* t_1 (cos (* angle (/ PI -180.0))))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_0) (* a t_0)) 0.011111111111111112)
       (* 2.0 (* t_1 (sin (/ PI (/ 180.0 angle)))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -1e+20) {
		tmp = 2.0 * (sin(((angle * ((double) M_PI)) / -180.0)) * (t_1 * cos((angle * (((double) M_PI) / -180.0)))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_1 * sin((((double) M_PI) / (180.0 / angle))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -1e+20) {
		tmp = 2.0 * (Math.sin(((angle * Math.PI) / -180.0)) * (t_1 * Math.cos((angle * (Math.PI / -180.0)))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_1 * Math.sin((Math.PI / (180.0 / angle))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = math.pi * (angle * (b - a))
	t_1 = (b - a) * (b + a)
	tmp = 0
	if (angle / 180.0) <= -1e+20:
		tmp = 2.0 * (math.sin(((angle * math.pi) / -180.0)) * (t_1 * math.cos((angle * (math.pi / -180.0)))))
	elif (angle / 180.0) <= 400000000000.0:
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112
	else:
		tmp = 2.0 * (t_1 * math.sin((math.pi / (180.0 / angle))))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * Float64(b - a)))
	t_1 = Float64(Float64(b - a) * Float64(b + a))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -1e+20)
		tmp = Float64(2.0 * Float64(sin(Float64(Float64(angle * pi) / -180.0)) * Float64(t_1 * cos(Float64(angle * Float64(pi / -180.0))))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_0) + Float64(a * t_0)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(t_1 * sin(Float64(pi / Float64(180.0 / angle)))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	t_0 = pi * (angle * (b - a));
	t_1 = (b - a) * (b + a);
	tmp = 0.0;
	if ((angle / 180.0) <= -1e+20)
		tmp = 2.0 * (sin(((angle * pi) / -180.0)) * (t_1 * cos((angle * (pi / -180.0)))));
	elseif ((angle / 180.0) <= 400000000000.0)
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	else
		tmp = 2.0 * (t_1 * sin((pi / (180.0 / angle))));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e+20], N[(2.0 * N[(N[Sin[N[(N[(angle * Pi), $MachinePrecision] / -180.0), $MachinePrecision]], $MachinePrecision] * N[(t$95$1 * N[Cos[N[(angle * N[(Pi / -180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$0), $MachinePrecision] + N[(a * t$95$0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+20}:\\
\;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot \left(t_1 \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < -1e20

    1. Initial program 24.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. Simplified23.7%

      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    3. Step-by-step derivation
      1. unpow223.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow223.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares28.4%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    4. Applied egg-rr28.4%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Step-by-step derivation
      1. *-commutative28.4%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. div-inv28.9%

        \[\leadsto 2 \cdot \left(\sin \left(\color{blue}{\left(angle \cdot \frac{1}{180}\right)} \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. metadata-eval28.9%

        \[\leadsto 2 \cdot \left(\sin \left(\left(angle \cdot \color{blue}{0.005555555555555556}\right) \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      4. *-commutative28.9%

        \[\leadsto 2 \cdot \left(\sin \left(\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      5. associate-*r*26.4%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      6. add-sqr-sqrt0.0%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\sqrt{0.005555555555555556 \cdot \left(angle \cdot \pi\right)} \cdot \sqrt{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      7. sqrt-unprod9.1%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\sqrt{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      8. associate-*r*10.6%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      9. associate-*r*9.1%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      10. *-commutative9.1%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      11. metadata-eval9.1%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\frac{1}{180}}\right)}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      12. div-inv8.7%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \color{blue}{\frac{angle \cdot \pi}{180}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      13. *-commutative8.7%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\color{blue}{\left(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)} \cdot \frac{angle \cdot \pi}{180}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      14. metadata-eval8.7%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\left(\left(angle \cdot \pi\right) \cdot \color{blue}{\frac{1}{180}}\right) \cdot \frac{angle \cdot \pi}{180}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      15. div-inv10.3%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{180}} \cdot \frac{angle \cdot \pi}{180}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      16. frac-times10.3%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{180 \cdot 180}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      17. metadata-eval10.3%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{\color{blue}{32400}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      18. metadata-eval10.3%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\frac{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}{\color{blue}{-180 \cdot -180}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      19. frac-times10.3%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\color{blue}{\frac{angle \cdot \pi}{-180} \cdot \frac{angle \cdot \pi}{-180}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      20. *-commutative10.3%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\frac{\color{blue}{\pi \cdot angle}}{-180} \cdot \frac{angle \cdot \pi}{-180}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      21. associate-*l/9.1%

        \[\leadsto 2 \cdot \left(\sin \left(\sqrt{\color{blue}{\left(\frac{\pi}{-180} \cdot angle\right)} \cdot \frac{angle \cdot \pi}{-180}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Applied egg-rr34.6%

      \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{\pi \cdot angle}{-180}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]

    if -1e20 < (/.f64 angle 180) < 4e11

    1. Initial program 69.7%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Simplified69.8%

      \[\leadsto \color{blue}{\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)} \]
    3. Taylor expanded in angle around 0 67.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow269.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow269.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares78.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Applied egg-rr76.7%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Taylor expanded in angle around 0 76.7%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutative76.7%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112} \]
      2. associate-*r*76.7%

        \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \cdot 0.011111111111111112 \]
      3. +-commutative76.7%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
      4. *-commutative76.7%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot 0.011111111111111112 \]
      5. +-commutative76.7%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot 0.011111111111111112 \]
    8. Simplified76.7%

      \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112} \]
    9. Step-by-step derivation
      1. associate-*r*97.4%

        \[\leadsto \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)} \cdot 0.011111111111111112 \]
      2. +-commutative97.4%

        \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(b + a\right)}\right) \cdot 0.011111111111111112 \]
      3. distribute-lft-in92.6%

        \[\leadsto \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot b + \left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot a\right)} \cdot 0.011111111111111112 \]
      4. *-commutative92.6%

        \[\leadsto \left(\left(\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(b - a\right)\right) \cdot b + \left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot a\right) \cdot 0.011111111111111112 \]
      5. associate-*l*92.5%

        \[\leadsto \left(\color{blue}{\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)} \cdot b + \left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot a\right) \cdot 0.011111111111111112 \]
      6. *-commutative92.5%

        \[\leadsto \left(\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b + \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(b - a\right)\right) \cdot a\right) \cdot 0.011111111111111112 \]
      7. associate-*l*92.5%

        \[\leadsto \left(\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b + \color{blue}{\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)} \cdot a\right) \cdot 0.011111111111111112 \]
    10. Applied egg-rr92.5%

      \[\leadsto \color{blue}{\left(\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b + \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot a\right)} \cdot 0.011111111111111112 \]

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    3. Step-by-step derivation
      1. unpow226.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow226.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares36.3%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    4. Applied egg-rr36.3%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Step-by-step derivation
      1. clear-num32.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. un-div-inv32.1%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Applied egg-rr32.1%

      \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    7. Taylor expanded in angle around 0 41.3%

      \[\leadsto 2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{1}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+20}:\\ \;\;\;\;2 \cdot \left(\sin \left(\frac{angle \cdot \pi}{-180}\right) \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) + a \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\ \end{array} \]

Alternative 13: 65.1% accurate, 2.7× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\ t_1 := \left(b - a\right) \cdot \left(b + a\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+87}:\\ \;\;\;\;0.011111111111111112 \cdot \left(t_1 \cdot \left|angle \cdot \pi\right|\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle (- b a)))) (t_1 (* (- b a) (+ b a))))
   (if (<= (/ angle 180.0) -1e+87)
     (* 0.011111111111111112 (* t_1 (fabs (* angle PI))))
     (if (<= (/ angle 180.0) 400000000000.0)
       (* (+ (* b t_0) (* a t_0)) 0.011111111111111112)
       (* 2.0 (* t_1 (sin (/ PI (/ 180.0 angle)))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -1e+87) {
		tmp = 0.011111111111111112 * (t_1 * fabs((angle * ((double) M_PI))));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_1 * sin((((double) M_PI) / (180.0 / angle))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle * (b - a));
	double t_1 = (b - a) * (b + a);
	double tmp;
	if ((angle / 180.0) <= -1e+87) {
		tmp = 0.011111111111111112 * (t_1 * Math.abs((angle * Math.PI)));
	} else if ((angle / 180.0) <= 400000000000.0) {
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	} else {
		tmp = 2.0 * (t_1 * Math.sin((Math.PI / (180.0 / angle))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = math.pi * (angle * (b - a))
	t_1 = (b - a) * (b + a)
	tmp = 0
	if (angle / 180.0) <= -1e+87:
		tmp = 0.011111111111111112 * (t_1 * math.fabs((angle * math.pi)))
	elif (angle / 180.0) <= 400000000000.0:
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112
	else:
		tmp = 2.0 * (t_1 * math.sin((math.pi / (180.0 / angle))))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * Float64(b - a)))
	t_1 = Float64(Float64(b - a) * Float64(b + a))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -1e+87)
		tmp = Float64(0.011111111111111112 * Float64(t_1 * abs(Float64(angle * pi))));
	elseif (Float64(angle / 180.0) <= 400000000000.0)
		tmp = Float64(Float64(Float64(b * t_0) + Float64(a * t_0)) * 0.011111111111111112);
	else
		tmp = Float64(2.0 * Float64(t_1 * sin(Float64(pi / Float64(180.0 / angle)))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	t_0 = pi * (angle * (b - a));
	t_1 = (b - a) * (b + a);
	tmp = 0.0;
	if ((angle / 180.0) <= -1e+87)
		tmp = 0.011111111111111112 * (t_1 * abs((angle * pi)));
	elseif ((angle / 180.0) <= 400000000000.0)
		tmp = ((b * t_0) + (a * t_0)) * 0.011111111111111112;
	else
		tmp = 2.0 * (t_1 * sin((pi / (180.0 / angle))));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -1e+87], N[(0.011111111111111112 * N[(t$95$1 * N[Abs[N[(angle * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 400000000000.0], N[(N[(N[(b * t$95$0), $MachinePrecision] + N[(a * t$95$0), $MachinePrecision]), $MachinePrecision] * 0.011111111111111112), $MachinePrecision], N[(2.0 * N[(t$95$1 * N[Sin[N[(Pi / N[(180.0 / angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot \left(b - a\right)\right)\\
t_1 := \left(b - a\right) \cdot \left(b + a\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+87}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t_1 \cdot \left|angle \cdot \pi\right|\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\
\;\;\;\;\left(b \cdot t_0 + a \cdot t_0\right) \cdot 0.011111111111111112\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(t_1 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle 180) < -9.9999999999999996e86

    1. Initial program 24.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. Simplified24.3%

      \[\leadsto \color{blue}{\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)} \]
    3. Taylor expanded in angle around 0 13.3%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow224.8%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow224.8%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares30.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Applied egg-rr19.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Taylor expanded in angle around 0 19.2%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutative19.2%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112} \]
      2. associate-*r*19.2%

        \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \cdot 0.011111111111111112 \]
      3. +-commutative19.2%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
      4. *-commutative19.2%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot 0.011111111111111112 \]
      5. +-commutative19.2%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot 0.011111111111111112 \]
    8. Simplified19.2%

      \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \left(\color{blue}{\left(\sqrt{angle \cdot \pi} \cdot \sqrt{angle \cdot \pi}\right)} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      2. sqrt-unprod29.3%

        \[\leadsto \left(\color{blue}{\sqrt{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      3. pow129.3%

        \[\leadsto \left(\sqrt{\color{blue}{{\left(angle \cdot \pi\right)}^{1}} \cdot \left(angle \cdot \pi\right)} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      4. pow129.3%

        \[\leadsto \left(\sqrt{{\left(angle \cdot \pi\right)}^{1} \cdot \color{blue}{{\left(angle \cdot \pi\right)}^{1}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      5. pow-sqr29.3%

        \[\leadsto \left(\sqrt{\color{blue}{{\left(angle \cdot \pi\right)}^{\left(2 \cdot 1\right)}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      6. *-commutative29.3%

        \[\leadsto \left(\sqrt{{\color{blue}{\left(\pi \cdot angle\right)}}^{\left(2 \cdot 1\right)}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      7. metadata-eval29.3%

        \[\leadsto \left(\sqrt{{\left(\pi \cdot angle\right)}^{\color{blue}{2}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
    10. Applied egg-rr29.3%

      \[\leadsto \left(\color{blue}{\sqrt{{\left(\pi \cdot angle\right)}^{2}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
    11. Step-by-step derivation
      1. unpow229.3%

        \[\leadsto \left(\sqrt{\color{blue}{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      2. rem-sqrt-square31.4%

        \[\leadsto \left(\color{blue}{\left|\pi \cdot angle\right|} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      3. *-commutative31.4%

        \[\leadsto \left(\left|\color{blue}{angle \cdot \pi}\right| \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
    12. Simplified31.4%

      \[\leadsto \left(\color{blue}{\left|angle \cdot \pi\right|} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]

    if -9.9999999999999996e86 < (/.f64 angle 180) < 4e11

    1. Initial program 65.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. Simplified64.6%

      \[\leadsto \color{blue}{\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)} \]
    3. Taylor expanded in angle around 0 63.8%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow264.9%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow264.9%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares73.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Applied egg-rr71.9%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Taylor expanded in angle around 0 71.9%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutative71.9%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112} \]
      2. associate-*r*71.9%

        \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \cdot 0.011111111111111112 \]
      3. +-commutative71.9%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
      4. *-commutative71.9%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot 0.011111111111111112 \]
      5. +-commutative71.9%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot 0.011111111111111112 \]
    8. Simplified71.9%

      \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112} \]
    9. Step-by-step derivation
      1. associate-*r*90.6%

        \[\leadsto \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \left(a + b\right)\right)} \cdot 0.011111111111111112 \]
      2. +-commutative90.6%

        \[\leadsto \left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(b + a\right)}\right) \cdot 0.011111111111111112 \]
      3. distribute-lft-in86.3%

        \[\leadsto \color{blue}{\left(\left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot b + \left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot a\right)} \cdot 0.011111111111111112 \]
      4. *-commutative86.3%

        \[\leadsto \left(\left(\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(b - a\right)\right) \cdot b + \left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot a\right) \cdot 0.011111111111111112 \]
      5. associate-*l*86.2%

        \[\leadsto \left(\color{blue}{\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)} \cdot b + \left(\left(angle \cdot \pi\right) \cdot \left(b - a\right)\right) \cdot a\right) \cdot 0.011111111111111112 \]
      6. *-commutative86.2%

        \[\leadsto \left(\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b + \left(\color{blue}{\left(\pi \cdot angle\right)} \cdot \left(b - a\right)\right) \cdot a\right) \cdot 0.011111111111111112 \]
      7. associate-*l*86.2%

        \[\leadsto \left(\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b + \color{blue}{\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)} \cdot a\right) \cdot 0.011111111111111112 \]
    10. Applied egg-rr86.2%

      \[\leadsto \color{blue}{\left(\left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot b + \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) \cdot a\right)} \cdot 0.011111111111111112 \]

    if 4e11 < (/.f64 angle 180)

    1. Initial program 24.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. Simplified26.0%

      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    3. Step-by-step derivation
      1. unpow226.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow226.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares36.3%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    4. Applied egg-rr36.3%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Step-by-step derivation
      1. clear-num32.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \color{blue}{\frac{1}{\frac{180}{angle}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. un-div-inv32.1%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Applied egg-rr32.1%

      \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    7. Taylor expanded in angle around 0 41.3%

      \[\leadsto 2 \cdot \left(\sin \left(\frac{\pi}{\frac{180}{angle}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{1}\right)\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+87}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left|angle \cdot \pi\right|\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 400000000000:\\ \;\;\;\;\left(b \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right) + a \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\\ \end{array} \]

Alternative 14: 56.0% accurate, 2.8× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 10^{+229}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{1}{\frac{180}{angle \cdot \pi}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot {b}^{2}\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= b 1e+229)
   (* 2.0 (* (* (- b a) (+ b a)) (sin (/ 1.0 (/ 180.0 (* angle PI))))))
   (* 0.011111111111111112 (* angle (* PI (pow b 2.0))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1e+229) {
		tmp = 2.0 * (((b - a) * (b + a)) * sin((1.0 / (180.0 / (angle * ((double) M_PI))))));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * pow(b, 2.0)));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1e+229) {
		tmp = 2.0 * (((b - a) * (b + a)) * Math.sin((1.0 / (180.0 / (angle * Math.PI)))));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * Math.pow(b, 2.0)));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if b <= 1e+229:
		tmp = 2.0 * (((b - a) * (b + a)) * math.sin((1.0 / (180.0 / (angle * math.pi)))))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * math.pow(b, 2.0)))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (b <= 1e+229)
		tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * Float64(b + a)) * sin(Float64(1.0 / Float64(180.0 / Float64(angle * pi))))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * (b ^ 2.0))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 1e+229)
		tmp = 2.0 * (((b - a) * (b + a)) * sin((1.0 / (180.0 / (angle * pi)))));
	else
		tmp = 0.011111111111111112 * (angle * (pi * (b ^ 2.0)));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[b, 1e+229], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(1.0 / N[(180.0 / N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 10^{+229}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{1}{\frac{180}{angle \cdot \pi}}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot {b}^{2}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 9.9999999999999999e228

    1. Initial program 47.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. Simplified47.7%

      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    3. Step-by-step derivation
      1. unpow247.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow247.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares53.3%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    4. Applied egg-rr53.3%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Step-by-step derivation
      1. *-commutative53.3%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{angle}{180} \cdot \pi\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. associate-*l/51.5%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{angle \cdot \pi}{180}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. clear-num50.1%

        \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{1}{\frac{180}{angle \cdot \pi}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      4. *-commutative50.1%

        \[\leadsto 2 \cdot \left(\sin \left(\frac{1}{\frac{180}{\color{blue}{\pi \cdot angle}}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    6. Applied egg-rr50.1%

      \[\leadsto 2 \cdot \left(\sin \color{blue}{\left(\frac{1}{\frac{180}{\pi \cdot angle}}\right)} \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    7. Taylor expanded in angle around 0 52.7%

      \[\leadsto 2 \cdot \left(\sin \left(\frac{1}{\frac{180}{\pi \cdot angle}}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{1}\right)\right) \]

    if 9.9999999999999999e228 < b

    1. Initial program 34.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. Simplified34.0%

      \[\leadsto \color{blue}{\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)} \]
    3. Taylor expanded in angle around 0 34.0%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Taylor expanded in b around inf 72.5%

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left({b}^{2} \cdot \pi\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification54.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 10^{+229}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{1}{\frac{180}{angle \cdot \pi}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot {b}^{2}\right)\right)\\ \end{array} \]

Alternative 15: 54.0% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot \left(b + a\right)\\ \mathbf{if}\;angle \leq -3.8 \cdot 10^{+85}:\\ \;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left|angle \cdot \pi\right|\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot t_0\right)\right)\\ \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) (+ b a))))
   (if (<= angle -3.8e+85)
     (* 0.011111111111111112 (* t_0 (fabs (* angle PI))))
     (* 2.0 (* (* angle 0.005555555555555556) (* PI t_0))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double tmp;
	if (angle <= -3.8e+85) {
		tmp = 0.011111111111111112 * (t_0 * fabs((angle * ((double) M_PI))));
	} else {
		tmp = 2.0 * ((angle * 0.005555555555555556) * (((double) M_PI) * t_0));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * (b + a);
	double tmp;
	if (angle <= -3.8e+85) {
		tmp = 0.011111111111111112 * (t_0 * Math.abs((angle * Math.PI)));
	} else {
		tmp = 2.0 * ((angle * 0.005555555555555556) * (Math.PI * t_0));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = (b - a) * (b + a)
	tmp = 0
	if angle <= -3.8e+85:
		tmp = 0.011111111111111112 * (t_0 * math.fabs((angle * math.pi)))
	else:
		tmp = 2.0 * ((angle * 0.005555555555555556) * (math.pi * t_0))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * Float64(b + a))
	tmp = 0.0
	if (angle <= -3.8e+85)
		tmp = Float64(0.011111111111111112 * Float64(t_0 * abs(Float64(angle * pi))));
	else
		tmp = Float64(2.0 * Float64(Float64(angle * 0.005555555555555556) * Float64(pi * t_0)));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	t_0 = (b - a) * (b + a);
	tmp = 0.0;
	if (angle <= -3.8e+85)
		tmp = 0.011111111111111112 * (t_0 * abs((angle * pi)));
	else
		tmp = 2.0 * ((angle * 0.005555555555555556) * (pi * t_0));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[angle, -3.8e+85], N[(0.011111111111111112 * N[(t$95$0 * N[Abs[N[(angle * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(Pi * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot \left(b + a\right)\\
\mathbf{if}\;angle \leq -3.8 \cdot 10^{+85}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left|angle \cdot \pi\right|\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot t_0\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -3.79999999999999992e85

    1. Initial program 24.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. Simplified24.3%

      \[\leadsto \color{blue}{\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)} \]
    3. Taylor expanded in angle around 0 13.3%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
    4. Step-by-step derivation
      1. unpow224.8%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow224.8%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares30.7%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Applied egg-rr19.2%

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
    6. Taylor expanded in angle around 0 19.2%

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    7. Step-by-step derivation
      1. *-commutative19.2%

        \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112} \]
      2. associate-*r*19.2%

        \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \cdot 0.011111111111111112 \]
      3. +-commutative19.2%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
      4. *-commutative19.2%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot 0.011111111111111112 \]
      5. +-commutative19.2%

        \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot 0.011111111111111112 \]
    8. Simplified19.2%

      \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112} \]
    9. Step-by-step derivation
      1. add-sqr-sqrt0.0%

        \[\leadsto \left(\color{blue}{\left(\sqrt{angle \cdot \pi} \cdot \sqrt{angle \cdot \pi}\right)} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      2. sqrt-unprod29.3%

        \[\leadsto \left(\color{blue}{\sqrt{\left(angle \cdot \pi\right) \cdot \left(angle \cdot \pi\right)}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      3. pow129.3%

        \[\leadsto \left(\sqrt{\color{blue}{{\left(angle \cdot \pi\right)}^{1}} \cdot \left(angle \cdot \pi\right)} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      4. pow129.3%

        \[\leadsto \left(\sqrt{{\left(angle \cdot \pi\right)}^{1} \cdot \color{blue}{{\left(angle \cdot \pi\right)}^{1}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      5. pow-sqr29.3%

        \[\leadsto \left(\sqrt{\color{blue}{{\left(angle \cdot \pi\right)}^{\left(2 \cdot 1\right)}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      6. *-commutative29.3%

        \[\leadsto \left(\sqrt{{\color{blue}{\left(\pi \cdot angle\right)}}^{\left(2 \cdot 1\right)}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      7. metadata-eval29.3%

        \[\leadsto \left(\sqrt{{\left(\pi \cdot angle\right)}^{\color{blue}{2}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
    10. Applied egg-rr29.3%

      \[\leadsto \left(\color{blue}{\sqrt{{\left(\pi \cdot angle\right)}^{2}}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
    11. Step-by-step derivation
      1. unpow229.3%

        \[\leadsto \left(\sqrt{\color{blue}{\left(\pi \cdot angle\right) \cdot \left(\pi \cdot angle\right)}} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      2. rem-sqrt-square31.4%

        \[\leadsto \left(\color{blue}{\left|\pi \cdot angle\right|} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
      3. *-commutative31.4%

        \[\leadsto \left(\left|\color{blue}{angle \cdot \pi}\right| \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]
    12. Simplified31.4%

      \[\leadsto \left(\color{blue}{\left|angle \cdot \pi\right|} \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112 \]

    if -3.79999999999999992e85 < angle

    1. Initial program 51.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. Simplified52.0%

      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
    3. Step-by-step derivation
      1. unpow252.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      2. unpow252.0%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
      3. difference-of-squares60.9%

        \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    4. Applied egg-rr60.9%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    5. Taylor expanded in angle around 0 56.9%

      \[\leadsto 2 \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)} \]
    6. Step-by-step derivation
      1. associate-*r*56.9%

        \[\leadsto 2 \cdot \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
    7. Simplified56.9%

      \[\leadsto 2 \cdot \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq -3.8 \cdot 10^{+85}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left|angle \cdot \pi\right|\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\\ \end{array} \]

Alternative 16: 56.0% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (* 2.0 (* (* (- b a) (+ b a)) (sin (* (/ angle 180.0) PI)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 2.0 * (((b - a) * (b + a)) * sin(((angle / 180.0) * ((double) M_PI))));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return 2.0 * (((b - a) * (b + a)) * Math.sin(((angle / 180.0) * Math.PI)));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 2.0 * (((b - a) * (b + a)) * math.sin(((angle / 180.0) * math.pi)))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(2.0 * Float64(Float64(Float64(b - a) * Float64(b + a)) * sin(Float64(Float64(angle / 180.0) * pi))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 2.0 * (((b - a) * (b + a)) * sin(((angle / 180.0) * pi)));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)
\end{array}
Derivation
  1. Initial program 46.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. Simplified46.6%

    \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
  3. Step-by-step derivation
    1. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    2. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    3. difference-of-squares54.9%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
  4. Applied egg-rr54.9%

    \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
  5. Taylor expanded in angle around 0 53.0%

    \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{1}\right)\right) \]
  6. Final simplification53.0%

    \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right) \]

Alternative 17: 54.3% accurate, 5.4× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (* 2.0 (* (* angle 0.005555555555555556) (* PI (* (- b a) (+ b a))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 2.0 * ((angle * 0.005555555555555556) * (((double) M_PI) * ((b - a) * (b + a))));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return 2.0 * ((angle * 0.005555555555555556) * (Math.PI * ((b - a) * (b + a))));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 2.0 * ((angle * 0.005555555555555556) * (math.pi * ((b - a) * (b + a))))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(2.0 * Float64(Float64(angle * 0.005555555555555556) * Float64(pi * Float64(Float64(b - a) * Float64(b + a)))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 2.0 * ((angle * 0.005555555555555556) * (pi * ((b - a) * (b + a))));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(2.0 * N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(Pi * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 46.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. Simplified46.6%

    \[\leadsto \color{blue}{2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right)} \]
  3. Step-by-step derivation
    1. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    2. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    3. difference-of-squares54.9%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
  4. Applied egg-rr54.9%

    \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
  5. Taylor expanded in angle around 0 49.4%

    \[\leadsto 2 \cdot \color{blue}{\left(0.005555555555555556 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\right)} \]
  6. Step-by-step derivation
    1. associate-*r*49.4%

      \[\leadsto 2 \cdot \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
  7. Simplified49.4%

    \[\leadsto 2 \cdot \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
  8. Final simplification49.4%

    \[\leadsto 2 \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \]

Alternative 18: 54.3% accurate, 5.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (* 0.011111111111111112 (* angle (* PI (* (- b a) (+ b a))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 0.011111111111111112 * (angle * (((double) M_PI) * ((b - a) * (b + a))));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return 0.011111111111111112 * (angle * (Math.PI * ((b - a) * (b + a))));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 0.011111111111111112 * (angle * (math.pi * ((b - a) * (b + a))))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b - a) * Float64(b + a)))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 0.011111111111111112 * (angle * (pi * ((b - a) * (b + a))));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 46.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. Simplified46.1%

    \[\leadsto \color{blue}{\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)} \]
  3. Taylor expanded in angle around 0 41.2%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
  4. Step-by-step derivation
    1. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    2. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    3. difference-of-squares54.9%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
  5. Applied egg-rr49.4%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
  6. Final simplification49.4%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right) \]

Alternative 19: 54.3% accurate, 5.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \pi\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (* 0.011111111111111112 (* (* (- b a) (+ b a)) (* angle PI))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 0.011111111111111112 * (((b - a) * (b + a)) * (angle * ((double) M_PI)));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return 0.011111111111111112 * (((b - a) * (b + a)) * (angle * Math.PI));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 0.011111111111111112 * (((b - a) * (b + a)) * (angle * math.pi))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(0.011111111111111112 * Float64(Float64(Float64(b - a) * Float64(b + a)) * Float64(angle * pi)))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 0.011111111111111112 * (((b - a) * (b + a)) * (angle * pi));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \pi\right)\right)
\end{array}
Derivation
  1. Initial program 46.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. Simplified46.1%

    \[\leadsto \color{blue}{\sin \left(angle \cdot \frac{\pi}{-180}\right) \cdot \left(-2 \cdot \left(\left({b}^{2} - {a}^{2}\right) \cdot \cos \left(angle \cdot \frac{\pi}{-180}\right)\right)\right)} \]
  3. Taylor expanded in angle around 0 41.2%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left({b}^{2} - {a}^{2}\right)\right)\right)} \]
  4. Step-by-step derivation
    1. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(\color{blue}{b \cdot b} - {a}^{2}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    2. unpow246.6%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(b \cdot b - \color{blue}{a \cdot a}\right) \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
    3. difference-of-squares54.9%

      \[\leadsto 2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \cos \left(\frac{\pi}{-180} \cdot angle\right)\right)\right) \]
  5. Applied egg-rr49.4%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)}\right)\right) \]
  6. Taylor expanded in angle around 0 49.4%

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)} \]
  7. Step-by-step derivation
    1. *-commutative49.4%

      \[\leadsto \color{blue}{\left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right) \cdot 0.011111111111111112} \]
    2. associate-*r*49.4%

      \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)} \cdot 0.011111111111111112 \]
    3. +-commutative49.4%

      \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right) \cdot 0.011111111111111112 \]
    4. *-commutative49.4%

      \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \color{blue}{\left(\left(b - a\right) \cdot \left(b + a\right)\right)}\right) \cdot 0.011111111111111112 \]
    5. +-commutative49.4%

      \[\leadsto \left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}\right)\right) \cdot 0.011111111111111112 \]
  8. Simplified49.4%

    \[\leadsto \color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(\left(b - a\right) \cdot \left(a + b\right)\right)\right) \cdot 0.011111111111111112} \]
  9. Final simplification49.4%

    \[\leadsto 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \pi\right)\right) \]

Reproduce

?
herbie shell --seed 2023305 
(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)))))