ab-angle->ABCF B

Percentage Accurate: 53.5% → 64.4%
Time: 29.3s
Alternatives: 15
Speedup: 5.4×

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 15 alternatives:

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

Initial Program: 53.5% accurate, 1.0× speedup?

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

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

Alternative 1: 64.4% accurate, 0.4× speedup?

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

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


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

    1. Initial program 57.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. *-commutative57.9%

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

        \[\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. associate-*l*57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{{\pi}^{0.3333333333333333}}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      2. add-sqr-sqrt65.9%

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

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot {\color{blue}{\left({\left(\sqrt{\pi}\right)}^{2}\right)}}^{0.3333333333333333}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      4. pow-pow65.9%

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

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

      \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{\pi}\right)}^{0.6666666666666666}}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
    12. Step-by-step derivation
      1. metadata-eval65.9%

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

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{\left({\left(\sqrt{\pi}\right)}^{0.3333333333333333} \cdot {\left(\sqrt{\pi}\right)}^{0.3333333333333333}\right)}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      3. unpow1/365.9%

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\color{blue}{\sqrt[3]{\sqrt{\pi}}} \cdot {\left(\sqrt{\pi}\right)}^{0.3333333333333333}\right)\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      4. unpow1/370.3%

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

      \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{\left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right)}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
    14. Step-by-step derivation
      1. pow1/365.9%

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{{\pi}^{0.3333333333333333}}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      2. add-sqr-sqrt65.9%

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

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot {\color{blue}{\left({\left(\sqrt{\pi}\right)}^{2}\right)}}^{0.3333333333333333}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      4. pow-pow65.9%

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

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

      \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\color{blue}{\left({\left(\sqrt{\pi}\right)}^{0.6666666666666666}\right)}}^{2} \cdot \left(\sqrt[3]{\sqrt{\pi}} \cdot \sqrt[3]{\sqrt{\pi}}\right)\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
    16. Step-by-step derivation
      1. metadata-eval65.9%

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

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{\left({\left(\sqrt{\pi}\right)}^{0.3333333333333333} \cdot {\left(\sqrt{\pi}\right)}^{0.3333333333333333}\right)}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      3. unpow1/365.9%

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\color{blue}{\sqrt[3]{\sqrt{\pi}}} \cdot {\left(\sqrt{\pi}\right)}^{0.3333333333333333}\right)\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      4. unpow1/370.3%

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

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

    if 4.00000000000000018e248 < b

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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 \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*r*92.9%

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

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

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

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

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

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

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

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

Alternative 2: 66.8% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a 2) < 5.0000000000000001e94

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e94 < (pow.f64 a 2)

    1. Initial program 46.7%

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

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

        \[\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. associate-*l*46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{{\left(\sqrt{\pi}\right)}^{0.6666666666666666}}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
    12. Step-by-step derivation
      1. metadata-eval66.6%

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

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \color{blue}{\left({\left(\sqrt{\pi}\right)}^{0.3333333333333333} \cdot {\left(\sqrt{\pi}\right)}^{0.3333333333333333}\right)}\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      3. unpow1/366.6%

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left({\left(\sqrt[3]{\pi}\right)}^{2} \cdot \left(\color{blue}{\sqrt[3]{\sqrt{\pi}}} \cdot {\left(\sqrt{\pi}\right)}^{0.3333333333333333}\right)\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      4. unpow1/375.9%

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

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

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

Alternative 3: 66.3% accurate, 1.0× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+120}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt[3]{e^{3 \cdot \log \pi}}\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= (pow a 2.0) 2e+120)
   (* (+ b a) (* (- b a) (sin (* 2.0 (* angle (* PI 0.005555555555555556))))))
   (*
    (+ b a)
    (*
     (- b a)
     (sin
      (*
       2.0
       (* (* 0.005555555555555556 angle) (cbrt (exp (* 3.0 (log PI)))))))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (pow(a, 2.0) <= 2e+120) {
		tmp = (b + a) * ((b - a) * sin((2.0 * (angle * (((double) M_PI) * 0.005555555555555556)))));
	} else {
		tmp = (b + a) * ((b - a) * sin((2.0 * ((0.005555555555555556 * angle) * cbrt(exp((3.0 * log(((double) M_PI)))))))));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (Math.pow(a, 2.0) <= 2e+120) {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * (angle * (Math.PI * 0.005555555555555556)))));
	} else {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * ((0.005555555555555556 * angle) * Math.cbrt(Math.exp((3.0 * Math.log(Math.PI))))))));
	}
	return tmp;
}
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if ((a ^ 2.0) <= 2e+120)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(angle * Float64(pi * 0.005555555555555556))))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(0.005555555555555556 * angle) * cbrt(exp(Float64(3.0 * log(pi)))))))));
	end
	return tmp
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 2e+120], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(0.005555555555555556 * angle), $MachinePrecision] * N[Power[N[Exp[N[(3.0 * N[Log[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+120}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\

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


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

    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. *-commutative65.4%

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

        \[\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. associate-*l*65.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e120 < (pow.f64 a 2)

    1. Initial program 46.0%

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

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

        \[\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. associate-*l*46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
    10. Step-by-step derivation
      1. add-exp-log73.5%

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\sqrt[3]{\color{blue}{e^{\log \left({\pi}^{3}\right)}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
      2. log-pow76.4%

        \[\leadsto \frac{a + b}{1} \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\sqrt[3]{e^{\color{blue}{3 \cdot \log \pi}}} \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)\right) \]
    11. Applied egg-rr76.4%

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

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

Alternative 4: 66.9% accurate, 1.5× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 4.3 \cdot 10^{+217}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot {\left(\sqrt[3]{0.005555555555555556 \cdot angle}\right)}^{3}\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= a 4.3e+217)
   (* (+ b a) (* (- b a) (sin (* 2.0 (* angle (* PI 0.005555555555555556))))))
   (*
    (+ b a)
    (*
     (- b a)
     (sin (* 2.0 (* PI (pow (cbrt (* 0.005555555555555556 angle)) 3.0))))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 4.3e+217) {
		tmp = (b + a) * ((b - a) * sin((2.0 * (angle * (((double) M_PI) * 0.005555555555555556)))));
	} else {
		tmp = (b + a) * ((b - a) * sin((2.0 * (((double) M_PI) * pow(cbrt((0.005555555555555556 * angle)), 3.0)))));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 4.3e+217) {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * (angle * (Math.PI * 0.005555555555555556)))));
	} else {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.PI * Math.pow(Math.cbrt((0.005555555555555556 * angle)), 3.0)))));
	}
	return tmp;
}
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (a <= 4.3e+217)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(angle * Float64(pi * 0.005555555555555556))))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi * (cbrt(Float64(0.005555555555555556 * angle)) ^ 3.0))))));
	end
	return tmp
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[a, 4.3e+217], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[Power[N[Power[N[(0.005555555555555556 * angle), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.3 \cdot 10^{+217}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right)\\

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


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

    1. Initial program 59.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. *-commutative59.9%

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

        \[\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. associate-*l*59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.3000000000000001e217 < a

    1. Initial program 29.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. *-commutative29.8%

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

        \[\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. associate-*l*29.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 65.4% accurate, 1.5× speedup?

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

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


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

    1. Initial program 57.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. *-commutative57.9%

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

        \[\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. associate-*l*57.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.60000000000000007e252 < b

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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 \cos \left(\pi \cdot \frac{angle}{180}\right) \]
      2. associate-*r*92.9%

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

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

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

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

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

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

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

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

Alternative 6: 66.5% accurate, 2.9× speedup?

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

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


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

    1. Initial program 21.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. *-commutative21.9%

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

        \[\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. associate-*l*21.9%

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

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

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

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

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

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

    if -1.9999999999999999e159 < (/.f64 angle 180)

    1. Initial program 62.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. *-commutative62.3%

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

        \[\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. associate-*l*62.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 62.9% accurate, 2.9× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;angle \leq 2.2 \cdot 10^{+129}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left|angle \cdot \left(\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \pi\right)\right)\right|\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= angle 2.2e+129)
   (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))
   (* 0.011111111111111112 (fabs (* angle (* (- b a) (* (+ b a) PI)))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 2.2e+129) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
	} else {
		tmp = 0.011111111111111112 * fabs((angle * ((b - a) * ((b + a) * ((double) M_PI)))));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 2.2e+129) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
	} else {
		tmp = 0.011111111111111112 * Math.abs((angle * ((b - a) * ((b + a) * Math.PI))));
	}
	return tmp;
}
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if angle <= 2.2e+129:
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi))
	else:
		tmp = 0.011111111111111112 * math.fabs((angle * ((b - a) * ((b + a) * math.pi))))
	return tmp
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (angle <= 2.2e+129)
		tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi)));
	else
		tmp = Float64(0.011111111111111112 * abs(Float64(angle * Float64(Float64(b - a) * Float64(Float64(b + a) * pi)))));
	end
	return tmp
end
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (angle <= 2.2e+129)
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi));
	else
		tmp = 0.011111111111111112 * abs((angle * ((b - a) * ((b + a) * pi))));
	end
	tmp_2 = tmp;
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[angle, 2.2e+129], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[Abs[N[(angle * N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 2.2 \cdot 10^{+129}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\

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


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

    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. *-commutative62.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*62.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. associate-*l*62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e129 < angle

    1. Initial program 33.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. *-commutative33.3%

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

        \[\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. associate-*l*33.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \sqrt{{\left(angle \cdot \left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)\right)}^{2}} \]
      5. difference-of-squares24.5%

        \[\leadsto 0.011111111111111112 \cdot \sqrt{{\left(angle \cdot \left(\pi \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)}\right)\right)}^{2}} \]
    6. Applied egg-rr24.5%

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

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

        \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left|angle \cdot \left(\pi \cdot \left(b \cdot b - a \cdot a\right)\right)\right|} \]
      3. difference-of-squares29.6%

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

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

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

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

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

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

Alternative 8: 62.9% accurate, 2.9× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;angle \leq 2.2 \cdot 10^{+129}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left|\left(b - a\right) \cdot \left(\left(b + a\right) \cdot \pi\right)\right|\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= angle 2.2e+129)
   (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))
   (* 0.011111111111111112 (* angle (fabs (* (- b a) (* (+ b a) PI)))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 2.2e+129) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
	} else {
		tmp = 0.011111111111111112 * (angle * fabs(((b - a) * ((b + a) * ((double) M_PI)))));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 2.2e+129) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
	} else {
		tmp = 0.011111111111111112 * (angle * Math.abs(((b - a) * ((b + a) * Math.PI))));
	}
	return tmp;
}
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if angle <= 2.2e+129:
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi))
	else:
		tmp = 0.011111111111111112 * (angle * math.fabs(((b - a) * ((b + a) * math.pi))))
	return tmp
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (angle <= 2.2e+129)
		tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * abs(Float64(Float64(b - a) * Float64(Float64(b + a) * pi)))));
	end
	return tmp
end
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (angle <= 2.2e+129)
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi));
	else
		tmp = 0.011111111111111112 * (angle * abs(((b - a) * ((b + a) * pi))));
	end
	tmp_2 = tmp;
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[angle, 2.2e+129], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[Abs[N[(N[(b - a), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 2.2 \cdot 10^{+129}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\

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


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

    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. *-commutative62.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*62.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. associate-*l*62.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e129 < angle

    1. Initial program 33.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. *-commutative33.3%

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

        \[\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. associate-*l*33.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \sqrt{{\left(\pi \cdot \left(\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)\right)\right)}^{2}}\right) \]
      5. difference-of-squares26.9%

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \sqrt{{\left(\pi \cdot \color{blue}{\left(b \cdot b - a \cdot a\right)}\right)}^{2}}\right) \]
    6. Applied egg-rr26.9%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \color{blue}{\left|\pi \cdot \left(b \cdot b - a \cdot a\right)\right|}\right) \]
      3. difference-of-squares29.6%

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

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

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

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

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

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

Alternative 9: 62.2% accurate, 2.9× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= angle 3e+113)
   (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))
   (* (+ b a) (* b (sin (* (* PI angle) 0.011111111111111112))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
	} else {
		tmp = (b + a) * (b * sin(((((double) M_PI) * angle) * 0.011111111111111112)));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
	} else {
		tmp = (b + a) * (b * Math.sin(((Math.PI * angle) * 0.011111111111111112)));
	}
	return tmp;
}
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if angle <= 3e+113:
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi))
	else:
		tmp = (b + a) * (b * math.sin(((math.pi * angle) * 0.011111111111111112)))
	return tmp
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (angle <= 3e+113)
		tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi)));
	else
		tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(Float64(pi * angle) * 0.011111111111111112))));
	end
	return tmp
end
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (angle <= 3e+113)
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi));
	else
		tmp = (b + a) * (b * sin(((pi * angle) * 0.011111111111111112)));
	end
	tmp_2 = tmp;
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[angle, 3e+113], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(b * N[Sin[N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\

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


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

    1. Initial program 62.9%

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

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

        \[\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. associate-*l*62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e113 < angle

    1. Initial program 32.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. *-commutative32.2%

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

        \[\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. associate-*l*32.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 62.3% accurate, 2.9× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= angle 3e+113)
   (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))
   (* (+ b a) (* b (sin (* PI (* angle 0.011111111111111112)))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
	} else {
		tmp = (b + a) * (b * sin((((double) M_PI) * (angle * 0.011111111111111112))));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
	} else {
		tmp = (b + a) * (b * Math.sin((Math.PI * (angle * 0.011111111111111112))));
	}
	return tmp;
}
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if angle <= 3e+113:
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi))
	else:
		tmp = (b + a) * (b * math.sin((math.pi * (angle * 0.011111111111111112))))
	return tmp
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (angle <= 3e+113)
		tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi)));
	else
		tmp = Float64(Float64(b + a) * Float64(b * sin(Float64(pi * Float64(angle * 0.011111111111111112)))));
	end
	return tmp
end
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (angle <= 3e+113)
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi));
	else
		tmp = (b + a) * (b * sin((pi * (angle * 0.011111111111111112))));
	end
	tmp_2 = tmp;
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[angle, 3e+113], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(b * N[Sin[N[(Pi * N[(angle * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\

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


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

    1. Initial program 62.9%

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

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

        \[\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. associate-*l*62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e113 < angle

    1. Initial program 32.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. *-commutative32.2%

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

        \[\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. associate-*l*32.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.1% accurate, 5.4× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\ \;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= angle 3e+113)
   (* (+ b a) (* 0.011111111111111112 (* PI (* (- b a) angle))))
   (* 0.011111111111111112 (* angle (* PI (* b b))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * (0.011111111111111112 * (((double) M_PI) * ((b - a) * angle)));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * (0.011111111111111112 * (Math.PI * ((b - a) * angle)));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
	}
	return tmp;
}
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if angle <= 3e+113:
		tmp = (b + a) * (0.011111111111111112 * (math.pi * ((b - a) * angle)))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * (b * b)))
	return tmp
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (angle <= 3e+113)
		tmp = Float64(Float64(b + a) * Float64(0.011111111111111112 * Float64(pi * Float64(Float64(b - a) * angle))));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b))));
	end
	return tmp
end
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (angle <= 3e+113)
		tmp = (b + a) * (0.011111111111111112 * (pi * ((b - a) * angle)));
	else
		tmp = 0.011111111111111112 * (angle * (pi * (b * b)));
	end
	tmp_2 = tmp;
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[angle, 3e+113], N[(N[(b + a), $MachinePrecision] * N[(0.011111111111111112 * N[(Pi * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\
\;\;\;\;\left(b + a\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)\\

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


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

    1. Initial program 62.9%

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

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

        \[\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. associate-*l*62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e113 < angle

    1. Initial program 32.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. *-commutative32.2%

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

        \[\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. associate-*l*32.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 62.0% accurate, 5.4× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= angle 3e+113)
   (* (+ b a) (* (* angle 0.011111111111111112) (* (- b a) PI)))
   (* 0.011111111111111112 (* angle (* PI (* b b))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * ((double) M_PI)));
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (angle <= 3e+113) {
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * Math.PI));
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
	}
	return tmp;
}
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if angle <= 3e+113:
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * math.pi))
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * (b * b)))
	return tmp
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (angle <= 3e+113)
		tmp = Float64(Float64(b + a) * Float64(Float64(angle * 0.011111111111111112) * Float64(Float64(b - a) * pi)));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b))));
	end
	return tmp
end
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (angle <= 3e+113)
		tmp = (b + a) * ((angle * 0.011111111111111112) * ((b - a) * pi));
	else
		tmp = 0.011111111111111112 * (angle * (pi * (b * b)));
	end
	tmp_2 = tmp;
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[angle, 3e+113], N[(N[(b + a), $MachinePrecision] * N[(N[(angle * 0.011111111111111112), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;angle \leq 3 \cdot 10^{+113}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(angle \cdot 0.011111111111111112\right) \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\\

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


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

    1. Initial program 62.9%

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

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

        \[\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. associate-*l*62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e113 < angle

    1. Initial program 32.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. *-commutative32.2%

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

        \[\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. associate-*l*32.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 53.4% accurate, 5.5× speedup?

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

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

      \[\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. associate-*l*57.9%

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

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

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

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

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

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

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

Alternative 14: 46.0% accurate, 5.6× speedup?

\[\begin{array}{l} b = |b|\\ \\ \begin{array}{l} \mathbf{if}\;b \leq 5.2 \cdot 10^{+61}:\\ \;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\ \end{array} \end{array} \]
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (if (<= b 5.2e+61)
   (* (* PI angle) (* (* a a) -0.011111111111111112))
   (* 0.011111111111111112 (* angle (* PI (* b b))))))
b = abs(b);
double code(double a, double b, double angle) {
	double tmp;
	if (b <= 5.2e+61) {
		tmp = (((double) M_PI) * angle) * ((a * a) * -0.011111111111111112);
	} else {
		tmp = 0.011111111111111112 * (angle * (((double) M_PI) * (b * b)));
	}
	return tmp;
}
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	double tmp;
	if (b <= 5.2e+61) {
		tmp = (Math.PI * angle) * ((a * a) * -0.011111111111111112);
	} else {
		tmp = 0.011111111111111112 * (angle * (Math.PI * (b * b)));
	}
	return tmp;
}
b = abs(b)
def code(a, b, angle):
	tmp = 0
	if b <= 5.2e+61:
		tmp = (math.pi * angle) * ((a * a) * -0.011111111111111112)
	else:
		tmp = 0.011111111111111112 * (angle * (math.pi * (b * b)))
	return tmp
b = abs(b)
function code(a, b, angle)
	tmp = 0.0
	if (b <= 5.2e+61)
		tmp = Float64(Float64(pi * angle) * Float64(Float64(a * a) * -0.011111111111111112));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle * Float64(pi * Float64(b * b))));
	end
	return tmp
end
b = abs(b)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (b <= 5.2e+61)
		tmp = (pi * angle) * ((a * a) * -0.011111111111111112);
	else
		tmp = 0.011111111111111112 * (angle * (pi * (b * b)));
	end
	tmp_2 = tmp;
end
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := If[LessEqual[b, 5.2e+61], N[(N[(Pi * angle), $MachinePrecision] * N[(N[(a * a), $MachinePrecision] * -0.011111111111111112), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle * N[(Pi * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b = |b|\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.2 \cdot 10^{+61}:\\
\;\;\;\;\left(\pi \cdot angle\right) \cdot \left(\left(a \cdot a\right) \cdot -0.011111111111111112\right)\\

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


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

    1. Initial program 59.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. *-commutative59.3%

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

        \[\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. associate-*l*59.3%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.19999999999999945e61 < b

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

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

        \[\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. associate-*l*51.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 34.7% accurate, 5.7× speedup?

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

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

      \[\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. associate-*l*57.9%

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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