ab-angle->ABCF B

Percentage Accurate: 54.6% → 67.7%
Time: 35.8s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 54.6% 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.7% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 30.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. *-commutative30.1%

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(b, b, -\color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      6. distribute-rgt-neg-in34.6%

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
    4. Step-by-step derivation
      1. clear-num39.1%

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

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

      \[\leadsto \left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Step-by-step derivation
      1. add-sqr-sqrt31.9%

        \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)} \cdot \sqrt{\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)}\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. sqrt-unprod61.3%

        \[\leadsto \color{blue}{\sqrt{\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right) \cdot \left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      3. pow261.3%

        \[\leadsto \sqrt{\color{blue}{{\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right)}^{2}}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    7. Applied egg-rr61.1%

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

        \[\leadsto \sqrt{\color{blue}{\left({\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot \left({\left(\mathsf{hypot}\left(b, a\right)\right)}^{2} \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right)}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. rem-sqrt-square61.1%

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

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

        \[\leadsto \left|\color{blue}{\left(2 \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\right| \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      5. associate-*l*61.1%

        \[\leadsto \left|\color{blue}{2 \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\right)}\right| \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      6. *-commutative61.1%

        \[\leadsto \left|2 \cdot \left(\sin \color{blue}{\left(\left(angle \cdot 0.005555555555555556\right) \cdot \pi\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\right)\right| \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      7. associate-*l*61.1%

        \[\leadsto \left|2 \cdot \left(\sin \color{blue}{\left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)} \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\right)\right| \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    9. Simplified61.1%

      \[\leadsto \color{blue}{\left|2 \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\right)\right|} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]

    if -2.0000000000000001e178 < (/.f64 angle 180) < 1.99999999999999993e118

    1. Initial program 65.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*65.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. unpow265.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. unpow265.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-squares70.4%

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

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

      \[\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)} \]

    if 1.99999999999999993e118 < (/.f64 angle 180)

    1. Initial program 31.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. *-commutative31.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \left(\left(2 \cdot \mathsf{fma}\left(b, b, -a \cdot a\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. fma-udef31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq -2 \cdot 10^{+178}:\\ \;\;\;\;\left|2 \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot {\left(\mathsf{hypot}\left(b, a\right)\right)}^{2}\right)\right| \cdot \cos \left(\frac{angle}{180} \cdot \pi\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+118}:\\ \;\;\;\;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(b + a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sin \left(\frac{angle}{180} \cdot \pi\right) \cdot \left(\left(2 \cdot \left(b \cdot b + a \cdot a\right)\right) \cdot \cos \left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \frac{\sqrt[3]{\pi}}{\frac{180}{angle}}\right)\right)\\ \end{array} \]

Alternative 2: 68.0% accurate, 0.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ t_1 := \sin t_0\\ t_2 := \frac{angle}{180} \cdot \pi\\ \mathbf{if}\;\cos t_2 \cdot \left(\sin t_2 \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \leq -2 \cdot 10^{+154}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left({\left(\sqrt{\pi}\right)}^{2} \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(t_1 \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(t_1 \cdot \left(\left(b + a\right) \cdot \cos t_0\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 (sin t_0))
        (t_2 (* (/ angle 180.0) PI)))
   (if (<=
        (* (cos t_2) (* (sin t_2) (* 2.0 (- (pow b 2.0) (pow a 2.0)))))
        -2e+154)
     (*
      2.0
      (*
       (* (- b a) (cos (* (pow (sqrt PI) 2.0) (* angle 0.005555555555555556))))
       (* t_1 (+ b a))))
     (* 2.0 (* (- b a) (* t_1 (* (+ b a) (cos t_0))))))))
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 = sin(t_0);
	double t_2 = (angle / 180.0) * ((double) M_PI);
	double tmp;
	if ((cos(t_2) * (sin(t_2) * (2.0 * (pow(b, 2.0) - pow(a, 2.0))))) <= -2e+154) {
		tmp = 2.0 * (((b - a) * cos((pow(sqrt(((double) M_PI)), 2.0) * (angle * 0.005555555555555556)))) * (t_1 * (b + a)));
	} else {
		tmp = 2.0 * ((b - a) * (t_1 * ((b + a) * cos(t_0))));
	}
	return tmp;
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle * 0.005555555555555556);
	double t_1 = Math.sin(t_0);
	double t_2 = (angle / 180.0) * Math.PI;
	double tmp;
	if ((Math.cos(t_2) * (Math.sin(t_2) * (2.0 * (Math.pow(b, 2.0) - Math.pow(a, 2.0))))) <= -2e+154) {
		tmp = 2.0 * (((b - a) * Math.cos((Math.pow(Math.sqrt(Math.PI), 2.0) * (angle * 0.005555555555555556)))) * (t_1 * (b + a)));
	} else {
		tmp = 2.0 * ((b - a) * (t_1 * ((b + a) * Math.cos(t_0))));
	}
	return tmp;
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = math.pi * (angle * 0.005555555555555556)
	t_1 = math.sin(t_0)
	t_2 = (angle / 180.0) * math.pi
	tmp = 0
	if (math.cos(t_2) * (math.sin(t_2) * (2.0 * (math.pow(b, 2.0) - math.pow(a, 2.0))))) <= -2e+154:
		tmp = 2.0 * (((b - a) * math.cos((math.pow(math.sqrt(math.pi), 2.0) * (angle * 0.005555555555555556)))) * (t_1 * (b + a)))
	else:
		tmp = 2.0 * ((b - a) * (t_1 * ((b + a) * math.cos(t_0))))
	return tmp
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
	t_1 = sin(t_0)
	t_2 = Float64(Float64(angle / 180.0) * pi)
	tmp = 0.0
	if (Float64(cos(t_2) * Float64(sin(t_2) * Float64(2.0 * Float64((b ^ 2.0) - (a ^ 2.0))))) <= -2e+154)
		tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(Float64((sqrt(pi) ^ 2.0) * Float64(angle * 0.005555555555555556)))) * Float64(t_1 * Float64(b + a))));
	else
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(t_1 * Float64(Float64(b + a) * cos(t_0)))));
	end
	return tmp
end
a = abs(a)
b = abs(b)
function tmp_2 = code(a, b, angle)
	t_0 = pi * (angle * 0.005555555555555556);
	t_1 = sin(t_0);
	t_2 = (angle / 180.0) * pi;
	tmp = 0.0;
	if ((cos(t_2) * (sin(t_2) * (2.0 * ((b ^ 2.0) - (a ^ 2.0))))) <= -2e+154)
		tmp = 2.0 * (((b - a) * cos(((sqrt(pi) ^ 2.0) * (angle * 0.005555555555555556)))) * (t_1 * (b + a)));
	else
		tmp = 2.0 * ((b - a) * (t_1 * ((b + a) * cos(t_0))));
	end
	tmp_2 = tmp;
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Sin[t$95$0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]}, If[LessEqual[N[(N[Cos[t$95$2], $MachinePrecision] * N[(N[Sin[t$95$2], $MachinePrecision] * N[(2.0 * N[(N[Power[b, 2.0], $MachinePrecision] - N[Power[a, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2e+154], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(t$95$1 * N[(N[(b + a), $MachinePrecision] * N[Cos[t$95$0], $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 := \sin t_0\\
t_2 := \frac{angle}{180} \cdot \pi\\
\mathbf{if}\;\cos t_2 \cdot \left(\sin t_2 \cdot \left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right)\right) \leq -2 \cdot 10^{+154}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left({\left(\sqrt{\pi}\right)}^{2} \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(t_1 \cdot \left(b + a\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(t_1 \cdot \left(\left(b + a\right) \cdot \cos t_0\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) < -2.00000000000000007e154

    1. Initial program 40.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*40.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. unpow240.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. unpow240.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-squares40.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. Simplified40.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 inf 64.6%

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

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

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

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

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

        \[\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. *-commutative63.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(\left(angle \cdot \pi\right) \cdot 0.005555555555555556\right)} \cdot \left(a + b\right)\right)\right) \]
      7. *-commutative63.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(\color{blue}{\left(\pi \cdot angle\right)} \cdot 0.005555555555555556\right) \cdot \left(a + b\right)\right)\right) \]
      8. associate-*r*61.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. *-commutative61.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. +-commutative61.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. Simplified61.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. Step-by-step derivation
      1. add-sqr-sqrt68.0%

        \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left(\color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)} \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) \]
      2. pow268.0%

        \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \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) \]
    8. Applied egg-rr68.0%

      \[\leadsto 2 \cdot \left(\left(\left(b - a\right) \cdot \cos \left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \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) \]

    if -2.00000000000000007e154 < (*.f64 (*.f64 (*.f64 2 (-.f64 (pow.f64 b 2) (pow.f64 a 2))) (sin.f64 (*.f64 (PI.f64) (/.f64 angle 180)))) (cos.f64 (*.f64 (PI.f64) (/.f64 angle 180))))

    1. Initial program 63.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*63.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. unpow263.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. unpow263.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-squares70.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. Simplified70.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. Step-by-step derivation
      1. add-cube-cbrt69.7%

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

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

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

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

      \[\leadsto \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\color{blue}{{\left(\sqrt[3]{\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    6. Taylor expanded in angle around inf 74.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)} \]
    7. Step-by-step derivation
      1. associate-*r*74.1%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.1% accurate, 1.2× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+297}:\\ \;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\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)\\ \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 (<= (pow a 2.0) 2e+297)
   (*
    2.0
    (*
     (* (sin (* PI (* angle 0.005555555555555556))) (+ b a))
     (* (- b a) (cos (* 0.005555555555555556 (* angle PI))))))
   (* 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 (pow(a, 2.0) <= 2e+297) {
		tmp = 2.0 * ((sin((((double) M_PI) * (angle * 0.005555555555555556))) * (b + a)) * ((b - a) * cos((0.005555555555555556 * (angle * ((double) M_PI))))));
	} 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 (Math.pow(a, 2.0) <= 2e+297) {
		tmp = 2.0 * ((Math.sin((Math.PI * (angle * 0.005555555555555556))) * (b + a)) * ((b - a) * Math.cos((0.005555555555555556 * (angle * Math.PI)))));
	} 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 math.pow(a, 2.0) <= 2e+297:
		tmp = 2.0 * ((math.sin((math.pi * (angle * 0.005555555555555556))) * (b + a)) * ((b - a) * math.cos((0.005555555555555556 * (angle * math.pi)))))
	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 ((a ^ 2.0) <= 2e+297)
		tmp = Float64(2.0 * Float64(Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * Float64(b + a)) * Float64(Float64(b - a) * cos(Float64(0.005555555555555556 * Float64(angle * pi))))));
	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 ((a ^ 2.0) <= 2e+297)
		tmp = 2.0 * ((sin((pi * (angle * 0.005555555555555556))) * (b + a)) * ((b - a) * cos((0.005555555555555556 * (angle * pi)))));
	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[N[Power[a, 2.0], $MachinePrecision], 2e+297], N[(2.0 * N[(N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $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}\;{a}^{2} \leq 2 \cdot 10^{+297}:\\
\;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\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)\\

\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 (pow.f64 a 2) < 2e297

    1. Initial program 69.8%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({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. unpow269.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. unpow269.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-squares69.8%

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

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

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

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

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

        \[\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*72.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. *-commutative72.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. *-commutative72.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. *-commutative72.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*71.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. *-commutative71.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. +-commutative71.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. Simplified71.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 70.9%

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

    if 2e297 < (pow.f64 a 2)

    1. Initial program 29.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*29.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. unpow229.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. unpow229.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-squares45.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. Simplified45.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 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*77.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+297}:\\ \;\;\;\;2 \cdot \left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\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)\\ \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 4: 68.0% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ 2 \cdot \left(\left(\sin t_0 \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \cos t_0\right)\right) \end{array} \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle 0.005555555555555556))))
   (* 2.0 (* (* (sin t_0) (+ b a)) (* (- b a) (cos t_0))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
	return 2.0 * ((sin(t_0) * (b + a)) * ((b - a) * cos(t_0)));
}
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);
	return 2.0 * ((Math.sin(t_0) * (b + a)) * ((b - a) * Math.cos(t_0)));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	t_0 = math.pi * (angle * 0.005555555555555556)
	return 2.0 * ((math.sin(t_0) * (b + a)) * ((b - a) * math.cos(t_0)))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
	return Float64(2.0 * Float64(Float64(sin(t_0) * Float64(b + a)) * Float64(Float64(b - a) * cos(t_0))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	t_0 = pi * (angle * 0.005555555555555556);
	tmp = 2.0 * ((sin(t_0) * (b + a)) * ((b - a) * cos(t_0)));
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]}, N[(2.0 * N[(N[(N[Sin[t$95$0], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
2 \cdot \left(\left(\sin t_0 \cdot \left(b + a\right)\right) \cdot \left(\left(b - a\right) \cdot \cos t_0\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 57.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*57.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. unpow257.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. unpow257.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-squares62.5%

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

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

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

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

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

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

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

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

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

      \[\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*73.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. *-commutative73.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. +-commutative73.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. Simplified73.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. Final simplification73.0%

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

Alternative 5: 68.0% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 64.8% accurate, 1.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{-223}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\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 (<= (pow a 2.0) 2e-223)
   (* 2.0 (* (- b a) (* (sin (* PI (* angle 0.005555555555555556))) (+ 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 (pow(a, 2.0) <= 2e-223) {
		tmp = 2.0 * ((b - a) * (sin((((double) M_PI) * (angle * 0.005555555555555556))) * (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 (Math.pow(a, 2.0) <= 2e-223) {
		tmp = 2.0 * ((b - a) * (Math.sin((Math.PI * (angle * 0.005555555555555556))) * (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 math.pow(a, 2.0) <= 2e-223:
		tmp = 2.0 * ((b - a) * (math.sin((math.pi * (angle * 0.005555555555555556))) * (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 ((a ^ 2.0) <= 2e-223)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * 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 ((a ^ 2.0) <= 2e-223)
		tmp = 2.0 * ((b - a) * (sin((pi * (angle * 0.005555555555555556))) * (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[N[Power[a, 2.0], $MachinePrecision], 2e-223], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $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}\;{a}^{2} \leq 2 \cdot 10^{-223}:\\
\;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\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 (pow.f64 a 2) < 1.9999999999999999e-223

    1. Initial program 74.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*74.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. unpow274.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. unpow274.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-squares74.8%

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

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

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

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

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

        \[\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*78.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. *-commutative78.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. +-commutative78.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. Simplified78.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 0 74.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) \]

    if 1.9999999999999999e-223 < (pow.f64 a 2)

    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-squares57.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. Simplified57.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 57.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. Step-by-step derivation
      1. associate-*r*70.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. *-commutative70.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. +-commutative70.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. Simplified70.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 simplification71.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{-223}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\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: 62.6% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 4.2 \cdot 10^{-93}:\\ \;\;\;\;2 \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot b\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 (<= a 4.2e-93)
   (* 2.0 (* (sin (* angle (* 0.005555555555555556 PI))) (* b b)))
   (* 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 (a <= 4.2e-93) {
		tmp = 2.0 * (sin((angle * (0.005555555555555556 * ((double) M_PI)))) * (b * b));
	} 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 (a <= 4.2e-93) {
		tmp = 2.0 * (Math.sin((angle * (0.005555555555555556 * Math.PI))) * (b * b));
	} 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 a <= 4.2e-93:
		tmp = 2.0 * (math.sin((angle * (0.005555555555555556 * math.pi))) * (b * b))
	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 (a <= 4.2e-93)
		tmp = Float64(2.0 * Float64(sin(Float64(angle * Float64(0.005555555555555556 * pi))) * Float64(b * b)));
	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 (a <= 4.2e-93)
		tmp = 2.0 * (sin((angle * (0.005555555555555556 * pi))) * (b * b));
	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[a, 4.2e-93], N[(2.0 * N[(N[Sin[N[(angle * N[(0.005555555555555556 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b * b), $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}\;a \leq 4.2 \cdot 10^{-93}:\\
\;\;\;\;2 \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot b\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 a < 4.2000000000000002e-93

    1. Initial program 61.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. *-commutative61.5%

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

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

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

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

        \[\leadsto \left(\mathsf{fma}\left(b, b, -\color{blue}{a \cdot a}\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      6. distribute-rgt-neg-in63.4%

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

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

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

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

      \[\leadsto \left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \color{blue}{\left(\frac{\pi}{\frac{180}{angle}}\right)}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    6. Taylor expanded in angle around 0 57.0%

      \[\leadsto \left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{\pi}{\frac{180}{angle}}\right)\right)\right) \cdot \color{blue}{1} \]
    7. Taylor expanded in b around inf 43.2%

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

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

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

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

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

        \[\leadsto \left(2 \cdot \left(\sin \left(angle \cdot \color{blue}{\left(0.005555555555555556 \cdot \pi\right)}\right) \cdot \left(b \cdot b\right)\right)\right) \cdot 1 \]
    9. Simplified45.5%

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

    if 4.2000000000000002e-93 < a

    1. Initial program 50.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*50.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. unpow250.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. unpow250.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-squares58.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. Simplified58.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 60.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*71.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 4.2 \cdot 10^{-93}:\\ \;\;\;\;2 \cdot \left(\sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right) \cdot \left(b \cdot b\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: 62.3% accurate, 2.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 7.80000000000000004e148

    1. Initial program 61.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*61.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. unpow261.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. unpow261.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-squares66.5%

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

      \[\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 63.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. Step-by-step derivation
      1. associate-*r*73.7%

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

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

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

      \[\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)} \]

    if 7.80000000000000004e148 < angle

    1. Initial program 27.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*27.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. unpow227.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. unpow227.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-squares27.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. Simplified27.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 28.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 0 25.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)} \]
      5. associate-*r*25.0%

        \[\leadsto angle \cdot \color{blue}{\left(\pi \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\right)} \]
      6. associate-*l*25.0%

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

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

      \[\leadsto \color{blue}{angle \cdot \left(\pi \cdot \left(a \cdot \left(-0.011111111111111112 \cdot a\right)\right)\right)} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt11.6%

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

        \[\leadsto angle \cdot \color{blue}{\sqrt{\left(\pi \cdot \left(a \cdot \left(-0.011111111111111112 \cdot a\right)\right)\right) \cdot \left(\pi \cdot \left(a \cdot \left(-0.011111111111111112 \cdot a\right)\right)\right)}} \]
      3. pow239.8%

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

        \[\leadsto angle \cdot \sqrt{{\left(\pi \cdot \left(a \cdot \color{blue}{\left(a \cdot -0.011111111111111112\right)}\right)\right)}^{2}} \]
    12. Applied egg-rr39.8%

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

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

        \[\leadsto angle \cdot \color{blue}{\left|\pi \cdot \left(a \cdot \left(a \cdot -0.011111111111111112\right)\right)\right|} \]
      3. associate-*r*39.7%

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

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

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

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

Alternative 9: 63.1% accurate, 5.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < 1.01999999999999993e135

    1. Initial program 61.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*61.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. unpow261.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. unpow261.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-squares66.5%

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

      \[\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 63.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. Step-by-step derivation
      1. associate-*r*73.3%

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

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

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

      \[\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)} \]

    if 1.01999999999999993e135 < angle

    1. Initial program 31.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. *-commutative31.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 50.3% accurate, 5.5× speedup?

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

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


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

    1. Initial program 62.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*62.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. unpow262.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. unpow262.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-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 0 60.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 45.8%

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

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

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

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

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

    if 2e18 < a

    1. Initial program 43.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*43.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. unpow243.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. unpow243.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-squares54.8%

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

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

      \[\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 a around inf 47.8%

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

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

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

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

Alternative 11: 50.0% accurate, 5.5× speedup?

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

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


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

    1. Initial program 58.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*58.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. unpow258.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. unpow258.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-squares61.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. Simplified61.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 0 61.3%

      \[\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 a around inf 46.5%

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

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

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

    if 5.59999999999999977e-30 < b

    1. Initial program 56.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*56.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. unpow256.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. unpow256.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-squares66.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. Simplified66.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 55.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. Taylor expanded in a around 0 54.3%

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

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

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

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

Alternative 12: 54.6% accurate, 5.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (* 0.011111111111111112 (* angle (* (- b a) (* PI (+ b a))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 0.011111111111111112 * (angle * ((b - a) * (((double) M_PI) * (b + a))));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return 0.011111111111111112 * (angle * ((b - a) * (Math.PI * (b + a))));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 0.011111111111111112 * (angle * ((b - a) * (math.pi * (b + a))))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b - a) * Float64(pi * Float64(b + a)))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 0.011111111111111112 * (angle * ((b - a) * (pi * (b + a))));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(angle * N[(N[(b - a), $MachinePrecision] * N[(Pi * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 57.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*57.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. unpow257.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. unpow257.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-squares62.5%

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

    \[\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 59.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. Final simplification59.9%

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

Alternative 13: 61.9% 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 57.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*57.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. unpow257.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. unpow257.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-squares62.5%

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

    \[\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 59.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. Step-by-step derivation
    1. associate-*r*68.3%

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

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

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

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

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

Alternative 14: 47.4% accurate, 5.6× speedup?

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

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


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

    1. Initial program 62.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*62.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. unpow262.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. unpow262.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-squares64.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. Simplified64.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 60.2%

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

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

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

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

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

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

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

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

    if 5.0000000000000004e49 < a

    1. Initial program 42.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*42.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. unpow242.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. unpow242.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-squares55.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. Simplified55.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 59.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 0 50.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)} \]
      5. associate-*r*50.7%

        \[\leadsto angle \cdot \color{blue}{\left(\pi \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\right)} \]
      6. associate-*l*50.6%

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

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

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

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

Alternative 15: 47.4% accurate, 5.6× speedup?

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

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


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

    1. Initial program 62.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*62.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. unpow262.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. unpow262.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-squares64.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. Simplified64.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 60.2%

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

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

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

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

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

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

    if 1.61999999999999996e50 < a

    1. Initial program 42.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*42.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. unpow242.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. unpow242.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-squares55.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. Simplified55.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 59.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 0 50.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)} \]
      5. associate-*r*50.7%

        \[\leadsto angle \cdot \color{blue}{\left(\pi \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\right)} \]
      6. associate-*l*50.6%

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

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

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

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

Alternative 16: 34.9% accurate, 5.7× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ angle \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot -0.011111111111111112\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
 (* angle (* PI (* a (* a -0.011111111111111112)))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return angle * (((double) M_PI) * (a * (a * -0.011111111111111112)));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return angle * (Math.PI * (a * (a * -0.011111111111111112)));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return angle * (math.pi * (a * (a * -0.011111111111111112)))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(angle * Float64(pi * Float64(a * Float64(a * -0.011111111111111112))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = angle * (pi * (a * (a * -0.011111111111111112)));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(angle * N[(Pi * N[(a * N[(a * -0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
angle \cdot \left(\pi \cdot \left(a \cdot \left(a \cdot -0.011111111111111112\right)\right)\right)
\end{array}
Derivation
  1. Initial program 57.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*57.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. unpow257.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. unpow257.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-squares62.5%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)} \]
    5. associate-*r*37.0%

      \[\leadsto angle \cdot \color{blue}{\left(\pi \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\right)} \]
    6. associate-*l*37.0%

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

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

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

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

Alternative 17: 34.9% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{angle \cdot \left(\left(\pi \cdot \left(a \cdot a\right)\right) \cdot -0.011111111111111112\right)} \]
  8. Final simplification37.0%

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

Reproduce

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