ab-angle->ABCF B

Percentage Accurate: 54.5% → 67.4%
Time: 40.1s
Alternatives: 20
Speedup: 5.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 54.5% accurate, 1.0× speedup?

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

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

Alternative 1: 67.4% accurate, 0.6× speedup?

\[\begin{array}{l} a = |a|\\ \\ \left(\left(\sin \left(\left(\sqrt{\pi} \cdot \sqrt{\pi}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b + a\right)\right) \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right) \cdot \left(2 \cdot \left(b - a\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (*
  (*
   (* (sin (* (* (sqrt PI) (sqrt PI)) (* angle 0.005555555555555556))) (+ b a))
   (cos (* (* angle 0.005555555555555556) (cbrt (* PI (* PI PI))))))
  (* 2.0 (- b a))))
a = abs(a);
double code(double a, double b, double angle) {
	return ((sin(((sqrt(((double) M_PI)) * sqrt(((double) M_PI))) * (angle * 0.005555555555555556))) * (b + a)) * cos(((angle * 0.005555555555555556) * cbrt((((double) M_PI) * (((double) M_PI) * ((double) M_PI))))))) * (2.0 * (b - a));
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	return ((Math.sin(((Math.sqrt(Math.PI) * Math.sqrt(Math.PI)) * (angle * 0.005555555555555556))) * (b + a)) * Math.cos(((angle * 0.005555555555555556) * Math.cbrt((Math.PI * (Math.PI * Math.PI)))))) * (2.0 * (b - a));
}
a = abs(a)
function code(a, b, angle)
	return Float64(Float64(Float64(sin(Float64(Float64(sqrt(pi) * sqrt(pi)) * Float64(angle * 0.005555555555555556))) * Float64(b + a)) * cos(Float64(Float64(angle * 0.005555555555555556) * cbrt(Float64(pi * Float64(pi * pi)))))) * Float64(2.0 * Float64(b - a)))
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := N[(N[(N[(N[Sin[N[(N[(N[Sqrt[Pi], $MachinePrecision] * N[Sqrt[Pi], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[Power[N[(Pi * N[(Pi * Pi), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
\\
\left(\left(\sin \left(\left(\sqrt{\pi} \cdot \sqrt{\pi}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b + a\right)\right) \cdot \cos \left(\left(angle \cdot 0.005555555555555556\right) \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right) \cdot \left(2 \cdot \left(b - a\right)\right)
\end{array}
Derivation
  1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b + a\right)\right) \cdot \cos \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(2 \cdot \left(b - a\right)\right) \]
  9. Step-by-step derivation
    1. add-sqr-sqrt72.5%

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

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

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

Alternative 2: 67.0% accurate, 0.6× speedup?

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

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(t_1 \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\


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

    1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b + a\right)\right) \cdot \color{blue}{\left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left({angle}^{2} \cdot {\pi}^{2}\right)\right)}\right) \cdot \left(2 \cdot \left(b - a\right)\right) \]
    8. Step-by-step derivation
      1. unpow283.0%

        \[\leadsto \left(\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(b + a\right)\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\color{blue}{\left(angle \cdot angle\right)} \cdot {\pi}^{2}\right)\right)\right) \cdot \left(2 \cdot \left(b - a\right)\right) \]
    9. Simplified83.0%

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

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

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq -\infty:\\ \;\;\;\;\left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(1 + -1.54320987654321 \cdot 10^{-5} \cdot \left(\left(angle \cdot angle\right) \cdot {\pi}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \]

Alternative 3: 67.2% accurate, 1.0× speedup?

\[\begin{array}{l} a = |a|\\ \\ \begin{array}{l} t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\ \left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\right) \cdot \cos t_0\right) \end{array} \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* PI (* angle 0.005555555555555556))))
   (* (* 2.0 (- b a)) (* (* (+ b a) (sin (pow (cbrt t_0) 3.0))) (cos t_0)))))
a = abs(a);
double code(double a, double b, double angle) {
	double t_0 = ((double) M_PI) * (angle * 0.005555555555555556);
	return (2.0 * (b - a)) * (((b + a) * sin(pow(cbrt(t_0), 3.0))) * cos(t_0));
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	double t_0 = Math.PI * (angle * 0.005555555555555556);
	return (2.0 * (b - a)) * (((b + a) * Math.sin(Math.pow(Math.cbrt(t_0), 3.0))) * Math.cos(t_0));
}
a = abs(a)
function code(a, b, angle)
	t_0 = Float64(pi * Float64(angle * 0.005555555555555556))
	return Float64(Float64(2.0 * Float64(b - a)) * Float64(Float64(Float64(b + a) * sin((cbrt(t_0) ^ 3.0))) * cos(t_0)))
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]}, N[(N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(b + a), $MachinePrecision] * N[Sin[N[Power[N[Power[t$95$0, 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(\left(b + a\right) \cdot \sin \left({\left(\sqrt[3]{t_0}\right)}^{3}\right)\right) \cdot \cos t_0\right)
\end{array}
\end{array}
Derivation
  1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 67.1% accurate, 1.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;t_2 \cdot \left(t_1 \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\


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

    1. Initial program 52.1%

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

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

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

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

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

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

    if -4.99999999999999981e225 < (/.f64 angle 180) < 2.00000000000000002e-35

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000002e-35 < (/.f64 angle 180)

    1. Initial program 42.4%

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

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

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

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

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

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

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

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

Alternative 5: 67.4% accurate, 1.5× speedup?

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

\mathbf{elif}\;a \leq 2 \cdot 10^{+185}:\\
\;\;\;\;t_2 \cdot t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 1.6e-51

    1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e-51 < a < 2e185

    1. Initial program 55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e185 < a

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

Alternative 6: 67.5% accurate, 1.5× speedup?

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

\mathbf{elif}\;a \leq 2 \cdot 10^{+185}:\\
\;\;\;\;t_0 \cdot t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < 3.99999999999999975e-49

    1. Initial program 57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999975e-49 < a < 2e185

    1. Initial program 55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e185 < a

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

Alternative 7: 67.9% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\ 2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)\right) \end{array} \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* PI angle))))
   (* 2.0 (* (- b a) (* (cos t_0) (* (+ b a) (sin t_0)))))))
a = abs(a);
double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (((double) M_PI) * angle);
	return 2.0 * ((b - a) * (cos(t_0) * ((b + a) * sin(t_0))));
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (Math.PI * angle);
	return 2.0 * ((b - a) * (Math.cos(t_0) * ((b + a) * Math.sin(t_0))));
}
a = abs(a)
def code(a, b, angle):
	t_0 = 0.005555555555555556 * (math.pi * angle)
	return 2.0 * ((b - a) * (math.cos(t_0) * ((b + a) * math.sin(t_0))))
a = abs(a)
function code(a, b, angle)
	t_0 = Float64(0.005555555555555556 * Float64(pi * angle))
	return Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_0) * Float64(Float64(b + a) * sin(t_0)))))
end
a = abs(a)
function tmp = code(a, b, angle)
	t_0 = 0.005555555555555556 * (pi * angle);
	tmp = 2.0 * ((b - a) * (cos(t_0) * ((b + a) * sin(t_0))));
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]}, N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
a = |a|\\
\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(\pi \cdot angle\right)\\
2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\left(b + a\right) \cdot \sin t_0\right)\right)\right)
\end{array}
\end{array}
Derivation
  1. Initial program 56.8%

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

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

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

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

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

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

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

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

Alternative 8: 66.4% accurate, 1.5× speedup?

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

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


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

    1. Initial program 48.7%

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

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

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

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

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

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

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

    if -2e-79 < (/.f64 angle 180)

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.6% accurate, 1.5× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 3.99999999999999973e-124

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \left(\left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot 0.5\right)}\right)}^{3}} \]
    5. Taylor expanded in b around inf 43.5%

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

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

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

        \[\leadsto {\left(\sqrt[3]{\color{blue}{b \cdot \left(b \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)}}\right)}^{3} \]
      4. *-commutative47.5%

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

        \[\leadsto {\left(\sqrt[3]{b \cdot \left(b \cdot \sin \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}\right)}\right)}^{3} \]
    7. Simplified47.8%

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

    if 3.99999999999999973e-124 < a

    1. Initial program 52.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 65.4% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 7.1999999999999997e-208

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1999999999999997e-208 < a

    1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.7% accurate, 2.8× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot t_0\\


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

    1. Initial program 37.8%

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

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

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

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

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

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

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

    if -2.0000000000000002e-15 < (/.f64 angle 180) < 5.0000000000000001e-9

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e-9 < (/.f64 angle 180)

    1. Initial program 34.1%

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

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

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

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

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

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

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

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

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

Alternative 12: 66.6% accurate, 2.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -1e-13 or 1.16e-4 < angle

    1. Initial program 35.9%

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

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

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

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

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

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

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

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

    if -1e-13 < angle < 1.16e-4

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 66.7% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ \\ \left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (* (* 2.0 (- b a)) (* (+ b a) (sin (* 0.005555555555555556 (* PI angle))))))
a = abs(a);
double code(double a, double b, double angle) {
	return (2.0 * (b - a)) * ((b + a) * sin((0.005555555555555556 * (((double) M_PI) * angle))));
}
a = Math.abs(a);
public static double code(double a, double b, double angle) {
	return (2.0 * (b - a)) * ((b + a) * Math.sin((0.005555555555555556 * (Math.PI * angle))));
}
a = abs(a)
def code(a, b, angle):
	return (2.0 * (b - a)) * ((b + a) * math.sin((0.005555555555555556 * (math.pi * angle))))
a = abs(a)
function code(a, b, angle)
	return Float64(Float64(2.0 * Float64(b - a)) * Float64(Float64(b + a) * sin(Float64(0.005555555555555556 * Float64(pi * angle)))))
end
a = abs(a)
function tmp = code(a, b, angle)
	tmp = (2.0 * (b - a)) * ((b + a) * sin((0.005555555555555556 * (pi * angle))));
end
NOTE: a should be positive before calling this function
code[a_, b_, angle_] := N[(N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
\\
\left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(b + a\right) \cdot \sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 57.4% accurate, 5.4× speedup?

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

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


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

    1. Initial program 58.0%

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

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

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

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

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

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

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

    if 2.1499999999999999e141 < a

    1. Initial program 49.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 50.5% accurate, 5.5× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 2.04999999999999996e63 < a

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 62.2% accurate, 5.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 46.1% accurate, 5.6× speedup?

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

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


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

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4999999999999997e58 < a

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 50.7% accurate, 5.6× speedup?

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

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


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

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.20000000000000038e53 < a

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 34.9% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto -0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\left(\pi \cdot a\right) \cdot a\right)\right)} \]
  14. Final simplification32.9%

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

Alternative 20: 34.9% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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