ab-angle->ABCF B

Percentage Accurate: 54.5% → 67.2%
Time: 24.6s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 54.5% 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.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_2 := \left(b - a\right) \cdot \cos t_0\\ \mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+22}:\\ \;\;\;\;2 \cdot \left(t_2 \cdot \left(\sin \left({\left({\left(\sqrt[3]{t_0}\right)}^{2}\right)}^{1.5}\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+175}:\\ \;\;\;\;2 \cdot \left(t_2 \cdot \left(\left(b + a\right) \cdot \sin t_1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_1 \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \pi\right)\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 0.005555555555555556)))
        (t_1 (* 0.005555555555555556 (* angle PI)))
        (t_2 (* (- b a) (cos t_0))))
   (if (<= (/ angle 180.0) -2e+22)
     (* 2.0 (* t_2 (* (sin (pow (pow (cbrt t_0) 2.0) 1.5)) (+ b a))))
     (if (<= (/ angle 180.0) 1e+175)
       (* 2.0 (* t_2 (* (+ b a) (sin t_1))))
       (*
        2.0
        (*
         (- b a)
         (*
          (cos t_1)
          (*
           (+ b a)
           (sin (* 0.005555555555555556 (expm1 (log1p (* angle PI)))))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
	double t_1 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_2 = (b - a) * cos(t_0);
	double tmp;
	if ((angle / 180.0) <= -2e+22) {
		tmp = 2.0 * (t_2 * (sin(pow(pow(cbrt(t_0), 2.0), 1.5)) * (b + a)));
	} else if ((angle / 180.0) <= 1e+175) {
		tmp = 2.0 * (t_2 * ((b + a) * sin(t_1)));
	} else {
		tmp = 2.0 * ((b - a) * (cos(t_1) * ((b + a) * sin((0.005555555555555556 * expm1(log1p((angle * ((double) M_PI)))))))));
	}
	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 * 0.005555555555555556);
	double t_1 = 0.005555555555555556 * (angle * Math.PI);
	double t_2 = (b - a) * Math.cos(t_0);
	double tmp;
	if ((angle / 180.0) <= -2e+22) {
		tmp = 2.0 * (t_2 * (Math.sin(Math.pow(Math.pow(Math.cbrt(t_0), 2.0), 1.5)) * (b + a)));
	} else if ((angle / 180.0) <= 1e+175) {
		tmp = 2.0 * (t_2 * ((b + a) * Math.sin(t_1)));
	} else {
		tmp = 2.0 * ((b - a) * (Math.cos(t_1) * ((b + a) * Math.sin((0.005555555555555556 * Math.expm1(Math.log1p((angle * Math.PI))))))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
	t_1 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_2 = Float64(Float64(b - a) * cos(t_0))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -2e+22)
		tmp = Float64(2.0 * Float64(t_2 * Float64(sin(((cbrt(t_0) ^ 2.0) ^ 1.5)) * Float64(b + a))));
	elseif (Float64(angle / 180.0) <= 1e+175)
		tmp = Float64(2.0 * Float64(t_2 * Float64(Float64(b + a) * sin(t_1))));
	else
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_1) * Float64(Float64(b + a) * sin(Float64(0.005555555555555556 * expm1(log1p(Float64(angle * pi)))))))));
	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 * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+22], N[(2.0 * N[(t$95$2 * N[(N[Sin[N[Power[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 2.0], $MachinePrecision], 1.5], $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+175], N[(2.0 * N[(t$95$2 * N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$1], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$1], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(Exp[N[Log[1 + N[(angle * Pi), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_1 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_2 := \left(b - a\right) \cdot \cos t_0\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+22}:\\
\;\;\;\;2 \cdot \left(t_2 \cdot \left(\sin \left({\left({\left(\sqrt[3]{t_0}\right)}^{2}\right)}^{1.5}\right) \cdot \left(b + a\right)\right)\right)\\

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

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_1 \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \pi\right)\right)\right)\right)\right)\right)\\


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

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e22 < (/.f64 angle 180) < 9.9999999999999994e174

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999994e174 < (/.f64 angle 180)

    1. Initial program 27.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.5% accurate, 1.0× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+22}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 10^{+175}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos t_1\right) \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \pi\right)\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 (* 0.005555555555555556 (* angle PI)))
        (t_1 (* PI (* angle 0.005555555555555556))))
   (if (<= (/ angle 180.0) -2e+22)
     (* 2.0 (* (- b a) (* (+ b a) (sin (pow (cbrt t_1) 3.0)))))
     (if (<= (/ angle 180.0) 1e+175)
       (* 2.0 (* (* (- b a) (cos t_1)) (* (+ b a) (sin t_0))))
       (*
        2.0
        (*
         (- b a)
         (*
          (cos t_0)
          (*
           (+ b a)
           (sin (* 0.005555555555555556 (expm1 (log1p (* angle PI)))))))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double t_1 = ((double) M_PI) * (angle * 0.005555555555555556);
	double tmp;
	if ((angle / 180.0) <= -2e+22) {
		tmp = 2.0 * ((b - a) * ((b + a) * sin(pow(cbrt(t_1), 3.0))));
	} else if ((angle / 180.0) <= 1e+175) {
		tmp = 2.0 * (((b - a) * cos(t_1)) * ((b + a) * sin(t_0)));
	} else {
		tmp = 2.0 * ((b - a) * (cos(t_0) * ((b + a) * sin((0.005555555555555556 * expm1(log1p((angle * ((double) M_PI)))))))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double t_1 = Math.PI * (angle * 0.005555555555555556);
	double tmp;
	if ((angle / 180.0) <= -2e+22) {
		tmp = 2.0 * ((b - a) * ((b + a) * Math.sin(Math.pow(Math.cbrt(t_1), 3.0))));
	} else if ((angle / 180.0) <= 1e+175) {
		tmp = 2.0 * (((b - a) * Math.cos(t_1)) * ((b + a) * Math.sin(t_0)));
	} else {
		tmp = 2.0 * ((b - a) * (Math.cos(t_0) * ((b + a) * Math.sin((0.005555555555555556 * Math.expm1(Math.log1p((angle * Math.PI))))))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	t_1 = Float64(pi * Float64(angle * 0.005555555555555556))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -2e+22)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin((cbrt(t_1) ^ 3.0)))));
	elseif (Float64(angle / 180.0) <= 1e+175)
		tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(t_1)) * Float64(Float64(b + a) * sin(t_0))));
	else
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_0) * Float64(Float64(b + a) * sin(Float64(0.005555555555555556 * expm1(log1p(Float64(angle * pi)))))))));
	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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+22], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$1, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+175], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$1], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(Exp[N[Log[1 + N[(angle * Pi), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+22}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t_1}\right)}^{3}\right)\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 10^{+175}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos t_1\right) \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot \pi\right)\right)\right)\right)\right)\right)\\


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

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e22 < (/.f64 angle 180) < 9.9999999999999994e174

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999994e174 < (/.f64 angle 180)

    1. Initial program 27.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.4% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+22}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos t_0\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\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 0.005555555555555556))))
   (if (<= (/ angle 180.0) -2e+22)
     (* 2.0 (* (- b a) (* (+ b a) (sin (pow (cbrt t_0) 3.0)))))
     (*
      2.0
      (*
       (* (- b a) (cos t_0))
       (* (+ b a) (sin (* 0.005555555555555556 (* angle PI)))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
	double tmp;
	if ((angle / 180.0) <= -2e+22) {
		tmp = 2.0 * ((b - a) * ((b + a) * sin(pow(cbrt(t_0), 3.0))));
	} else {
		tmp = 2.0 * (((b - a) * cos(t_0)) * ((b + a) * sin((0.005555555555555556 * (angle * ((double) M_PI))))));
	}
	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 * 0.005555555555555556);
	double tmp;
	if ((angle / 180.0) <= -2e+22) {
		tmp = 2.0 * ((b - a) * ((b + a) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0))));
	} else {
		tmp = 2.0 * (((b - a) * Math.cos(t_0)) * ((b + a) * Math.sin((0.005555555555555556 * (angle * Math.PI)))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
	tmp = 0.0
	if (Float64(angle / 180.0) <= -2e+22)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin((cbrt(t_0) ^ 3.0)))));
	else
		tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(t_0)) * Float64(Float64(b + a) * sin(Float64(0.005555555555555556 * Float64(angle * pi))))));
	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 * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], -2e+22], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+22}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\right)\right)\\

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


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

    1. Initial program 25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e22 < (/.f64 angle 180)

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.1% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;b \leq 6.2 \cdot 10^{+173}:\\ \;\;\;\;2 \cdot \left(\left(\left(b + a\right) \cdot \sin t_0\right) \cdot \left(\left(b - a\right) \cdot \cos t_0\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\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 (* 0.005555555555555556 (* angle PI))))
   (if (<= b 6.2e+173)
     (* 2.0 (* (* (+ b a) (sin t_0)) (* (- b a) (cos t_0))))
     (*
      2.0
      (*
       (- b a)
       (*
        (+ b a)
        (sin (pow (cbrt (* PI (* angle 0.005555555555555556))) 3.0))))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double tmp;
	if (b <= 6.2e+173) {
		tmp = 2.0 * (((b + a) * sin(t_0)) * ((b - a) * cos(t_0)));
	} else {
		tmp = 2.0 * ((b - a) * ((b + a) * sin(pow(cbrt((((double) M_PI) * (angle * 0.005555555555555556))), 3.0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double tmp;
	if (b <= 6.2e+173) {
		tmp = 2.0 * (((b + a) * Math.sin(t_0)) * ((b - a) * Math.cos(t_0)));
	} else {
		tmp = 2.0 * ((b - a) * ((b + a) * Math.sin(Math.pow(Math.cbrt((Math.PI * (angle * 0.005555555555555556))), 3.0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	tmp = 0.0
	if (b <= 6.2e+173)
		tmp = Float64(2.0 * Float64(Float64(Float64(b + a) * sin(t_0)) * Float64(Float64(b - a) * cos(t_0))));
	else
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin((cbrt(Float64(pi * Float64(angle * 0.005555555555555556))) ^ 3.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[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, 6.2e+173], N[(2.0 * N[(N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;b \leq 6.2 \cdot 10^{+173}:\\
\;\;\;\;2 \cdot \left(\left(\left(b + a\right) \cdot \sin t_0\right) \cdot \left(\left(b - a\right) \cdot \cos t_0\right)\right)\\

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

    if 6.2e173 < b

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 6.2 \cdot 10^{+173}:\\ \;\;\;\;2 \cdot \left(\left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(\left(b - a\right) \cdot \cos \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\right)\\ \end{array} \]

Alternative 5: 65.3% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\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
  (*
   (- b a)
   (* (+ b a) (sin (pow (cbrt (* PI (* angle 0.005555555555555556))) 3.0))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((b + a) * sin(pow(cbrt((((double) M_PI) * (angle * 0.005555555555555556))), 3.0))));
}
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(Math.pow(Math.cbrt((Math.PI * (angle * 0.005555555555555556))), 3.0))));
}
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin((cbrt(Float64(pi * Float64(angle * 0.005555555555555556))) ^ 3.0)))))
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[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \color{blue}{1}\right) \cdot \left(\sin \left({\left(\sqrt[3]{\pi \cdot \left(0.005555555555555556 \cdot angle\right)}\right)}^{3}\right) \cdot \left(b + a\right)\right)\right) \]
  10. Final simplification68.0%

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

Alternative 6: 64.6% accurate, 2.8× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;angle \leq -2.95 \cdot 10^{+144} \lor \neg \left(angle \leq 4 \cdot 10^{+197}\right):\\ \;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\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
 (if (or (<= angle -2.95e+144) (not (<= angle 4e+197)))
   (* (sin (* 0.005555555555555556 (* angle PI))) (* 2.0 (* (- b a) (+ b a))))
   (* 0.011111111111111112 (* (* PI (+ b a)) (* angle (- b a))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if ((angle <= -2.95e+144) || !(angle <= 4e+197)) {
		tmp = sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (2.0 * ((b - a) * (b + a)));
	} else {
		tmp = 0.011111111111111112 * ((((double) M_PI) * (b + a)) * (angle * (b - a)));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if ((angle <= -2.95e+144) || !(angle <= 4e+197)) {
		tmp = Math.sin((0.005555555555555556 * (angle * Math.PI))) * (2.0 * ((b - a) * (b + a)));
	} else {
		tmp = 0.011111111111111112 * ((Math.PI * (b + a)) * (angle * (b - a)));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if (angle <= -2.95e+144) or not (angle <= 4e+197):
		tmp = math.sin((0.005555555555555556 * (angle * math.pi))) * (2.0 * ((b - a) * (b + a)))
	else:
		tmp = 0.011111111111111112 * ((math.pi * (b + a)) * (angle * (b - a)))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if ((angle <= -2.95e+144) || !(angle <= 4e+197))
		tmp = Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(2.0 * Float64(Float64(b - a) * Float64(b + a))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b + a)) * Float64(angle * Float64(b - a))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if ((angle <= -2.95e+144) || ~((angle <= 4e+197)))
		tmp = sin((0.005555555555555556 * (angle * pi))) * (2.0 * ((b - a) * (b + a)));
	else
		tmp = 0.011111111111111112 * ((pi * (b + a)) * (angle * (b - a)));
	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[Or[LessEqual[angle, -2.95e+144], N[Not[LessEqual[angle, 4e+197]], $MachinePrecision]], N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq -2.95 \cdot 10^{+144} \lor \neg \left(angle \leq 4 \cdot 10^{+197}\right):\\
\;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -2.94999999999999994e144 or 3.9999999999999998e197 < angle

    1. Initial program 29.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.94999999999999994e144 < angle < 3.9999999999999998e197

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq -2.95 \cdot 10^{+144} \lor \neg \left(angle \leq 4 \cdot 10^{+197}\right):\\ \;\;\;\;\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)\\ \end{array} \]

Alternative 7: 65.5% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 3.5 \cdot 10^{+140}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(2 \cdot \left(b - a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\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
 (if (<= b 3.5e+140)
   (* (* (+ b a) (sin (* 0.005555555555555556 (* angle PI)))) (* 2.0 (- b a)))
   (* 0.011111111111111112 (* (* PI (+ b a)) (* angle (- b a))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 3.5e+140) {
		tmp = ((b + a) * sin((0.005555555555555556 * (angle * ((double) M_PI))))) * (2.0 * (b - a));
	} else {
		tmp = 0.011111111111111112 * ((((double) M_PI) * (b + a)) * (angle * (b - a)));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 3.5e+140) {
		tmp = ((b + a) * Math.sin((0.005555555555555556 * (angle * Math.PI)))) * (2.0 * (b - a));
	} else {
		tmp = 0.011111111111111112 * ((Math.PI * (b + a)) * (angle * (b - a)));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if b <= 3.5e+140:
		tmp = ((b + a) * math.sin((0.005555555555555556 * (angle * math.pi)))) * (2.0 * (b - a))
	else:
		tmp = 0.011111111111111112 * ((math.pi * (b + a)) * (angle * (b - a)))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (b <= 3.5e+140)
		tmp = Float64(Float64(Float64(b + a) * sin(Float64(0.005555555555555556 * Float64(angle * pi)))) * Float64(2.0 * Float64(b - a)));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b + a)) * Float64(angle * Float64(b - a))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 3.5e+140)
		tmp = ((b + a) * sin((0.005555555555555556 * (angle * pi)))) * (2.0 * (b - a));
	else
		tmp = 0.011111111111111112 * ((pi * (b + a)) * (angle * (b - a)));
	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, 3.5e+140], N[(N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.5 \cdot 10^{+140}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right) \cdot \left(2 \cdot \left(b - a\right)\right)\\

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


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

    1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.49999999999999989e140 < b

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 65.9% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\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 (* (- b a) (* (+ b a) (sin (* PI (* angle 0.005555555555555556)))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((b + a) * sin((((double) M_PI) * (angle * 0.005555555555555556)))));
}
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((Math.PI * (angle * 0.005555555555555556)))));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 2.0 * ((b - a) * ((b + a) * math.sin((math.pi * (angle * 0.005555555555555556)))))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(b + a) * sin(Float64(pi * Float64(angle * 0.005555555555555556))))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 2.0 * ((b - a) * ((b + a) * sin((pi * (angle * 0.005555555555555556)))));
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[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 58.6% accurate, 5.4× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 5.2 \cdot 10^{+153}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(angle \cdot b\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 5.2e+153)
   (* 0.011111111111111112 (* angle (* PI (* (- b a) (+ b a)))))
   (* 0.011111111111111112 (* (* b PI) (* angle b)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 5.2e+153) {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * ((b - a) * (b + a))));
	} else {
		tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (angle * b));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 5.2e+153) {
		tmp = 0.011111111111111112 * (angle * (Math.PI * ((b - a) * (b + a))));
	} else {
		tmp = 0.011111111111111112 * ((b * Math.PI) * (angle * b));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if b <= 5.2e+153:
		tmp = 0.011111111111111112 * (angle * (math.pi * ((b - a) * (b + a))))
	else:
		tmp = 0.011111111111111112 * ((b * math.pi) * (angle * b))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (b <= 5.2e+153)
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(Float64(b - a) * Float64(b + a)))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(angle * b)));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 5.2e+153)
		tmp = 0.011111111111111112 * (angle * (pi * ((b - a) * (b + a))));
	else
		tmp = 0.011111111111111112 * ((b * pi) * (angle * b));
	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, 5.2e+153], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(N[(b - a), $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(angle * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.2 \cdot 10^{+153}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot \left(b + a\right)\right)\right)\right)\\

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


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

    1. Initial program 51.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.1999999999999998e153 < b

    1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(angle \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
      3. *-commutative57.3%

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

        \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    10. Simplified57.3%

      \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    11. Taylor expanded in angle around 0 57.3%

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(b \cdot angle\right)\right) \]
    13. Simplified85.2%

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

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

Alternative 10: 62.5% accurate, 5.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\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 (* (* PI (+ b a)) (* angle (- b a)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 0.011111111111111112 * ((((double) M_PI) * (b + a)) * (angle * (b - a)));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return 0.011111111111111112 * ((Math.PI * (b + a)) * (angle * (b - a)));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 0.011111111111111112 * ((math.pi * (b + a)) * (angle * (b - a)))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(0.011111111111111112 * Float64(Float64(pi * Float64(b + a)) * Float64(angle * Float64(b - a))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 0.011111111111111112 * ((pi * (b + a)) * (angle * (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[(N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(angle * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
0.011111111111111112 \cdot \left(\left(\pi \cdot \left(b + a\right)\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 39.5% accurate, 5.6× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 1.2 \cdot 10^{+55}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(angle \cdot b\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 1.2e+55)
   (* 0.011111111111111112 (* angle (* PI (* b b))))
   (* 0.011111111111111112 (* (* b PI) (* angle b)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1.2e+55) {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
	} else {
		tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (angle * b));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 1.2e+55) {
		tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
	} else {
		tmp = 0.011111111111111112 * ((b * Math.PI) * (angle * b));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if b <= 1.2e+55:
		tmp = 0.011111111111111112 * (angle * (math.pi * (b * b)))
	else:
		tmp = 0.011111111111111112 * ((b * math.pi) * (angle * b))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (b <= 1.2e+55)
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(angle * b)));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 1.2e+55)
		tmp = 0.011111111111111112 * (angle * (pi * (b * b)));
	else
		tmp = 0.011111111111111112 * ((b * pi) * (angle * b));
	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, 1.2e+55], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(angle * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.2 \cdot 10^{+55}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\

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


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

    1. Initial program 51.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e55 < b

    1. Initial program 49.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    10. Simplified46.2%

      \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    11. Taylor expanded in angle around 0 46.2%

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(b \cdot angle\right)\right) \]
    13. Simplified61.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 1.2 \cdot 10^{+55}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(angle \cdot b\right)\right)\\ \end{array} \]

Alternative 12: 39.5% accurate, 5.6× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 3.8 \cdot 10^{+42}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(angle \cdot b\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 3.8e+42)
   (* angle (* 0.011111111111111112 (* PI (* b b))))
   (* 0.011111111111111112 (* (* b PI) (* angle b)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 3.8e+42) {
		tmp = angle * (0.011111111111111112 * (((double) M_PI) * (b * b)));
	} else {
		tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (angle * b));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 3.8e+42) {
		tmp = angle * (0.011111111111111112 * (Math.PI * (b * b)));
	} else {
		tmp = 0.011111111111111112 * ((b * Math.PI) * (angle * b));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if b <= 3.8e+42:
		tmp = angle * (0.011111111111111112 * (math.pi * (b * b)))
	else:
		tmp = 0.011111111111111112 * ((b * math.pi) * (angle * b))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (b <= 3.8e+42)
		tmp = Float64(angle * Float64(0.011111111111111112 * Float64(pi * Float64(b * b))));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(angle * b)));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 3.8e+42)
		tmp = angle * (0.011111111111111112 * (pi * (b * b)));
	else
		tmp = 0.011111111111111112 * ((b * pi) * (angle * b));
	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, 3.8e+42], N[(angle * N[(0.011111111111111112 * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(angle * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 3.8 \cdot 10^{+42}:\\
\;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\

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


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

    1. Initial program 51.2%

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
    7. Simplified29.4%

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

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

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

        \[\leadsto \left(angle \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
      3. *-commutative29.4%

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

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

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

    if 3.7999999999999998e42 < b

    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. Step-by-step derivation
      1. associate-*l*51.8%

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b\right)}\right)\right) \]
    7. Simplified46.4%

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

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

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

        \[\leadsto \left(angle \cdot \left(\color{blue}{\left(b \cdot b\right)} \cdot \pi\right)\right) \cdot 0.011111111111111112 \]
      3. *-commutative46.4%

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

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

      \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    11. Taylor expanded in angle around 0 46.4%

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(b \cdot angle\right)\right) \]
    13. Simplified60.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 3.8 \cdot 10^{+42}:\\ \;\;\;\;angle \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(angle \cdot b\right)\right)\\ \end{array} \]

Alternative 13: 51.9% accurate, 5.6× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 5 \cdot 10^{+60}:\\ \;\;\;\;\left(angle \cdot -0.011111111111111112\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(angle \cdot b\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 5e+60)
   (* (* angle -0.011111111111111112) (* PI (* a a)))
   (* 0.011111111111111112 (* (* b PI) (* angle b)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 5e+60) {
		tmp = (angle * -0.011111111111111112) * (((double) M_PI) * (a * a));
	} else {
		tmp = 0.011111111111111112 * ((b * ((double) M_PI)) * (angle * b));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 5e+60) {
		tmp = (angle * -0.011111111111111112) * (Math.PI * (a * a));
	} else {
		tmp = 0.011111111111111112 * ((b * Math.PI) * (angle * b));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if b <= 5e+60:
		tmp = (angle * -0.011111111111111112) * (math.pi * (a * a))
	else:
		tmp = 0.011111111111111112 * ((b * math.pi) * (angle * b))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (b <= 5e+60)
		tmp = Float64(Float64(angle * -0.011111111111111112) * Float64(pi * Float64(a * a)));
	else
		tmp = Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(angle * b)));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 5e+60)
		tmp = (angle * -0.011111111111111112) * (pi * (a * a));
	else
		tmp = 0.011111111111111112 * ((b * pi) * (angle * b));
	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, 5e+60], N[(N[(angle * -0.011111111111111112), $MachinePrecision] * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(angle * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5 \cdot 10^{+60}:\\
\;\;\;\;\left(angle \cdot -0.011111111111111112\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\\

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999975e60 < b

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    10. Simplified49.0%

      \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(b \cdot b\right)\right) \cdot 0.011111111111111112\right)} \]
    11. Taylor expanded in angle around 0 48.9%

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(\color{blue}{\left(b \cdot \pi\right)} \cdot \left(b \cdot angle\right)\right) \]
    13. Simplified65.0%

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

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

Alternative 14: 34.3% accurate, 5.7× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\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 b)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
}
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 * b)));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 0.011111111111111112 * (angle * (math.pi * (b * b)))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 0.011111111111111112 * (angle * (pi * (b * b)));
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[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
  8. Final simplification32.8%

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right) \]

Reproduce

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