ab-angle->ABCF B

Percentage Accurate: 55.1% → 68.5%
Time: 42.7s
Alternatives: 18
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 18 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: 55.1% 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: 68.5% accurate, 0.9× speedup?

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

\mathbf{else}:\\
\;\;\;\;t_0 \cdot \left(\left(a + b\right) \cdot \left(t_1 \cdot \cos \left(\left(0.005555555555555556 \cdot angle\right) \cdot \sqrt[3]{\pi \cdot \left(\pi \cdot \pi\right)}\right)\right)\right)\\


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

    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-squares59.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. Simplified59.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 66.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*66.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. associate-*r*66.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e176 < a

    1. Initial program 50.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*50.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. unpow250.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. unpow250.2%

        \[\leadsto \left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. difference-of-squares53.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. Simplified53.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 90.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*90.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. associate-*r*90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 64.8% accurate, 1.4× speedup?

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

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

\mathbf{elif}\;\frac{angle}{180} \leq 4 \cdot 10^{+112}:\\
\;\;\;\;\left(\sin \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right) \cdot \left(2 \cdot \left(b \cdot b\right)\right)\right) \cdot \cos t_0\\

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


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

    1. Initial program 20.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. *-commutative20.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left({\left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)}^{\left(2 \cdot {\left(b + a\right)}^{2}\right)}\right)} \]
    5. Step-by-step derivation
      1. log-pow36.3%

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

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      5. associate-*l*36.3%

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

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

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

      \[\leadsto \color{blue}{\left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in angle around 0 43.9%

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

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

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

    if -1.45e218 < (/.f64 angle 180) < 2.00000000000000012e-9

    1. Initial program 70.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*70.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. unpow270.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. unpow270.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-squares71.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. Simplified71.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 inf 87.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*87.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. associate-*r*87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000012e-9 < (/.f64 angle 180) < 3.9999999999999997e112

    1. Initial program 45.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. *-commutative45.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9999999999999997e112 < (/.f64 angle 180)

    1. Initial program 26.5%

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

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

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

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

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

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

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

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

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

Alternative 3: 68.3% accurate, 1.5× speedup?

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

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

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

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

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

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

    \[\leadsto 2 \cdot \color{blue}{\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.9%

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

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

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

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

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

Alternative 4: 68.4% accurate, 1.5× speedup?

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

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

      \[\leadsto \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{{\left(\sqrt{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)}^{2}}\right) \]
    3. div-inv47.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 {\left(\sqrt{\cos \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)}\right)}^{2}\right) \]
    4. metadata-eval47.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 {\left(\sqrt{\cos \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)}\right)}^{2}\right) \]
  5. Applied egg-rr47.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}{{\left(\sqrt{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2}}\right) \]
  6. Taylor expanded in angle around inf 68.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)} \]
  7. Step-by-step derivation
    1. associate-*r*68.9%

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

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \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)}\right) \]
    3. +-commutative68.9%

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(b + a\right)} \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)\right) \]
    4. *-commutative68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 68.5% accurate, 1.5× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ \left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a + b\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (*
  (* 2.0 (- b a))
  (*
   (*
    (sin (* PI (* 0.005555555555555556 angle)))
    (cos (* 0.005555555555555556 (* PI angle))))
   (+ a b))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return (2.0 * (b - a)) * ((sin((((double) M_PI) * (0.005555555555555556 * angle))) * cos((0.005555555555555556 * (((double) M_PI) * angle)))) * (a + b));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return (2.0 * (b - a)) * ((Math.sin((Math.PI * (0.005555555555555556 * angle))) * Math.cos((0.005555555555555556 * (Math.PI * angle)))) * (a + b));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return (2.0 * (b - a)) * ((math.sin((math.pi * (0.005555555555555556 * angle))) * math.cos((0.005555555555555556 * (math.pi * angle)))) * (a + b))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(Float64(2.0 * Float64(b - a)) * Float64(Float64(sin(Float64(pi * Float64(0.005555555555555556 * angle))) * cos(Float64(0.005555555555555556 * Float64(pi * angle)))) * Float64(a + b)))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = (2.0 * (b - a)) * ((sin((pi * (0.005555555555555556 * angle))) * cos((0.005555555555555556 * (pi * angle)))) * (a + b));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(N[(2.0 * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[N[(Pi * N[(0.005555555555555556 * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
\left(2 \cdot \left(b - a\right)\right) \cdot \left(\left(\sin \left(\pi \cdot \left(0.005555555555555556 \cdot angle\right)\right) \cdot \cos \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right) \cdot \left(a + b\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 68.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*68.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. associate-*r*68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 65.8% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+70}:\\
\;\;\;\;\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right) \cdot \left(0.5 \cdot \left(2 \cdot t_0\right)\right)\\

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


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

    1. Initial program 20.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. *-commutative20.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\log \left({\left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)}^{\left(2 \cdot {\left(b + a\right)}^{2}\right)}\right)} \]
    5. Step-by-step derivation
      1. log-pow36.3%

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

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      5. associate-*l*36.3%

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

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

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

      \[\leadsto \color{blue}{\left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in angle around 0 43.9%

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

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

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

    if -1.45e218 < (/.f64 angle 180) < 2.00000000000000012e-9

    1. Initial program 70.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*70.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. unpow270.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. unpow270.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-squares71.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. Simplified71.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 inf 87.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*87.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. associate-*r*87.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000012e-9 < (/.f64 angle 180) < 2.00000000000000015e70

    1. Initial program 46.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. *-commutative46.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left(\left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot 0.5\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def36.8%

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

        \[\leadsto \color{blue}{\left(\left(\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)\right) \cdot 0.5\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)} \]
      3. associate-*l*47.1%

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

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

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

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

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

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

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

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

    if 2.00000000000000015e70 < (/.f64 angle 180)

    1. Initial program 27.6%

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

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

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

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

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

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

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

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

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

Alternative 7: 66.2% accurate, 2.7× speedup?

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

\mathbf{elif}\;\frac{angle}{180} \leq -5 \cdot 10^{+109} \lor \neg \left(\frac{angle}{180} \leq 10^{+67}\right):\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \left(a + b\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\\

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


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

    1. Initial program 21.5%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      5. associate-*l*35.2%

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}}\right) \]
    6. Simplified35.2%

      \[\leadsto \color{blue}{\left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in angle around 0 40.2%

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

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

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

    if -4.0000000000000003e209 < (/.f64 angle 180) < -5.0000000000000001e109 or 9.99999999999999983e66 < (/.f64 angle 180)

    1. Initial program 34.0%

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

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

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

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

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

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

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

    if -5.0000000000000001e109 < (/.f64 angle 180) < 9.99999999999999983e66

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

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

      \[\leadsto \color{blue}{\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Taylor expanded in angle around 0 72.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. *-commutative72.9%

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

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

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

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

Alternative 8: 66.4% accurate, 2.9× speedup?

\[\begin{array}{l} a = |a|\\ b = |b|\\ \\ 2 \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\right)\right)\right) \end{array} \]
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
(FPCore (a b angle)
 :precision binary64
 (* 2.0 (* (- b a) (* (+ a b) (sin (* angle (* PI 0.005555555555555556)))))))
a = abs(a);
b = abs(b);
double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((a + b) * sin((angle * (((double) M_PI) * 0.005555555555555556)))));
}
a = Math.abs(a);
b = Math.abs(b);
public static double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((a + b) * Math.sin((angle * (Math.PI * 0.005555555555555556)))));
}
a = abs(a)
b = abs(b)
def code(a, b, angle):
	return 2.0 * ((b - a) * ((a + b) * math.sin((angle * (math.pi * 0.005555555555555556)))))
a = abs(a)
b = abs(b)
function code(a, b, angle)
	return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(a + b) * sin(Float64(angle * Float64(pi * 0.005555555555555556))))))
end
a = abs(a)
b = abs(b)
function tmp = code(a, b, angle)
	tmp = 2.0 * ((b - a) * ((a + b) * sin((angle * (pi * 0.005555555555555556)))));
end
NOTE: a should be positive before calling this function
NOTE: b should be positive before calling this function
code[a_, b_, angle_] := N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(a + b), $MachinePrecision] * N[Sin[N[(angle * N[(Pi * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a = |a|\\
b = |b|\\
\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(a + b\right) \cdot \sin \left(angle \cdot \left(\pi \cdot 0.005555555555555556\right)\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. Step-by-step derivation
    1. add-sqr-sqrt48.1%

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

      \[\leadsto \left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \color{blue}{{\left(\sqrt{\cos \left(\pi \cdot \frac{angle}{180}\right)}\right)}^{2}}\right) \]
    3. div-inv47.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 {\left(\sqrt{\cos \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)}\right)}^{2}\right) \]
    4. metadata-eval47.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 {\left(\sqrt{\cos \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)}\right)}^{2}\right) \]
  5. Applied egg-rr47.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}{{\left(\sqrt{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{2}}\right) \]
  6. Taylor expanded in angle around inf 68.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)} \]
  7. Step-by-step derivation
    1. associate-*r*68.9%

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

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \color{blue}{\left(\left(a + b\right) \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)}\right) \]
    3. +-commutative68.9%

      \[\leadsto 2 \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(b + a\right)} \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)\right) \]
    4. *-commutative68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 65.0% accurate, 2.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -3.80000000000000039e109 or 8.8000000000000003e58 < angle

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)} \]
      2. +-commutative36.8%

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{0} + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right) \]
      4. +-lft-identity36.8%

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      5. associate-*l*36.8%

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}}\right) \]
    6. Simplified36.8%

      \[\leadsto \color{blue}{\left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in angle around 0 33.1%

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

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

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

    if -3.80000000000000039e109 < angle < 8.8000000000000003e58

    1. Initial program 74.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*74.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. unpow274.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. unpow274.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-squares75.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. Simplified75.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 73.8%

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

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

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

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

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

Alternative 10: 63.4% accurate, 5.4× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -1.02e139

    1. Initial program 28.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. *-commutative28.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*28.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. unpow228.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-neg32.3%

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

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

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

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

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

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      5. associate-*l*39.0%

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}}\right) \]
    6. Simplified39.0%

      \[\leadsto \color{blue}{\left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in a around inf 24.3%

      \[\leadsto \color{blue}{2 \cdot \left(\log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right) \cdot {a}^{2}\right)} \]
    8. Step-by-step derivation
      1. associate-*r*24.3%

        \[\leadsto \color{blue}{\left(2 \cdot \log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right) \cdot {a}^{2}} \]
      2. *-commutative24.3%

        \[\leadsto \color{blue}{{a}^{2} \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right)} \]
      3. unpow224.3%

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right) \]
      4. associate-*r*21.5%

        \[\leadsto \left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right)}}}\right)\right) \]
      5. *-commutative21.5%

        \[\leadsto \left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(\pi \cdot \left(0.011111111111111112 \cdot angle\right)\right)}}}\right)\right) \]
      6. associate-*r*23.2%

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

        \[\leadsto \left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}}}\right)\right) \]
    9. Simplified23.2%

      \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}}\right)\right)} \]
    10. Taylor expanded in angle around 0 31.2%

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

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

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

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

    if -1.02e139 < angle

    1. Initial program 63.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*63.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. unpow263.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. unpow263.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-squares65.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. Simplified65.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 59.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. *-commutative59.5%

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

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

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

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

Alternative 11: 35.4% accurate, 5.5× speedup?

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

\mathbf{else}:\\
\;\;\;\;t_0 \cdot -0.011111111111111112\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if angle < -1.99999999999999989e194 or 8.8000000000000003e58 < angle

    1. Initial program 26.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. *-commutative26.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left(2 \cdot {\left(b + a\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin 0 + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right)} \]
      2. +-commutative31.8%

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{0} + \sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}\right) \]
      4. +-lft-identity31.8%

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\color{blue}{\sin \left(\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot 2\right)}}}\right) \]
      5. associate-*l*31.8%

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

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

        \[\leadsto \left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \color{blue}{\left(0.005555555555555556 \cdot angle\right)}\right)\right)}}\right) \]
    6. Simplified31.8%

      \[\leadsto \color{blue}{\left(2 \cdot {\left(a + b\right)}^{2}\right) \cdot \log \left(\sqrt{e^{\sin \left(\pi \cdot \left(2 \cdot \left(0.005555555555555556 \cdot angle\right)\right)\right)}}\right)} \]
    7. Taylor expanded in a around inf 22.2%

      \[\leadsto \color{blue}{2 \cdot \left(\log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right) \cdot {a}^{2}\right)} \]
    8. Step-by-step derivation
      1. associate-*r*22.2%

        \[\leadsto \color{blue}{\left(2 \cdot \log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right) \cdot {a}^{2}} \]
      2. *-commutative22.2%

        \[\leadsto \color{blue}{{a}^{2} \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right)} \]
      3. unpow222.2%

        \[\leadsto \color{blue}{\left(a \cdot a\right)} \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}}\right)\right) \]
      4. associate-*r*19.5%

        \[\leadsto \left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(\left(0.011111111111111112 \cdot angle\right) \cdot \pi\right)}}}\right)\right) \]
      5. *-commutative19.5%

        \[\leadsto \left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(\pi \cdot \left(0.011111111111111112 \cdot angle\right)\right)}}}\right)\right) \]
      6. associate-*r*21.8%

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

        \[\leadsto \left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \color{blue}{\left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}}}\right)\right) \]
    9. Simplified21.8%

      \[\leadsto \color{blue}{\left(a \cdot a\right) \cdot \left(2 \cdot \log \left(\sqrt{e^{\sin \left(angle \cdot \left(\pi \cdot 0.011111111111111112\right)\right)}}\right)\right)} \]
    10. Taylor expanded in angle around 0 27.3%

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

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

        \[\leadsto 0.011111111111111112 \cdot \left(\left(angle \cdot \color{blue}{\left(a \cdot a\right)}\right) \cdot \pi\right) \]
    12. Simplified27.3%

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

    if -1.99999999999999989e194 < angle < 8.8000000000000003e58

    1. Initial program 71.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*71.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. unpow271.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. unpow271.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-squares73.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. Simplified73.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 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 51.6% accurate, 5.5× speedup?

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

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


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

    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. associate-*l*59.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. unpow259.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. unpow259.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-squares61.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. Simplified61.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 54.4%

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

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

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

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

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

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

    if 1.7999999999999999e-23 < a

    1. Initial program 50.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*50.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. unpow250.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. unpow250.2%

        \[\leadsto \left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. difference-of-squares53.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. Simplified53.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 48.3%

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

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

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

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

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

Alternative 13: 51.1% accurate, 5.5× speedup?

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

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


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

    1. Initial program 59.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*59.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. unpow259.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. unpow259.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-squares61.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. Simplified61.2%

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

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

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

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

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

    if 6.8e8 < b

    1. Initial program 47.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*47.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. unpow247.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. unpow247.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-squares50.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. Simplified50.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 43.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.5%

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

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

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

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

Alternative 14: 56.1% accurate, 5.5× speedup?

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

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

Alternative 15: 48.0% accurate, 5.6× speedup?

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

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


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

    1. Initial program 59.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*59.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. unpow259.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. unpow259.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-squares61.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. Simplified61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.7e9 < b

    1. Initial program 47.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*47.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. unpow247.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. unpow247.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-squares50.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. Simplified50.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 43.6%

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

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

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

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

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

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

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

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

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

Alternative 16: 48.0% accurate, 5.6× speedup?

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

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


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

    1. Initial program 59.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*59.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. unpow259.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. unpow259.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-squares61.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. Simplified61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.2e9 < b

    1. Initial program 47.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*47.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. unpow247.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. unpow247.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-squares50.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. Simplified50.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 43.6%

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

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

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

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

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

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

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

Alternative 17: 35.7% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 35.7% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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