ab-angle->ABCF B

Percentage Accurate: 52.8% → 66.1%
Time: 42.6s
Alternatives: 12
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 12 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: 52.8% 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: 66.1% accurate, 1.2× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b 2) < 5.00000000000000028e-280

    1. Initial program 58.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*58.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. unpow258.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000028e-280 < (pow.f64 b 2)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.9% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

Alternative 3: 66.7% accurate, 1.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 65.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 30.9%

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

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

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

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

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

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

    if -1.00000000000000004e36 < (/.f64 angle 180) < 5.0000000000000001e-4

    1. Initial program 68.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*68.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. unpow268.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 36.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. *-commutative36.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*36.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. unpow236.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-neg43.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 65.1% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 30.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*30.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. unpow230.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. unpow230.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-squares32.3%

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

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

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

    if -1.9999999999999999e33 < (/.f64 angle 180) < 4.0000000000000002e47

    1. Initial program 67.9%

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

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

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

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

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

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

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

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

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

    if 4.0000000000000002e47 < (/.f64 angle 180)

    1. Initial program 32.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 64.6% accurate, 2.9× speedup?

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

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


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

    1. Initial program 54.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*54.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. unpow254.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. unpow254.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-squares58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25000000000000004e-140 < b

    1. Initial program 48.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*48.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. unpow248.5%

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

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

      \[\leadsto \color{blue}{\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Taylor expanded in angle around 0 50.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. Step-by-step derivation
      1. associate-*r*62.1%

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

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

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

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

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

Alternative 7: 48.0% accurate, 5.5× speedup?

\[\begin{array}{l} a = |a|\\ \\ \begin{array}{l} \mathbf{if}\;a \leq 6.5 \cdot 10^{-34}:\\ \;\;\;\;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
(FPCore (a b angle)
 :precision binary64
 (if (<= a 6.5e-34)
   (* 0.011111111111111112 (* PI (* angle (* b b))))
   (* 0.011111111111111112 (* angle (* (- b a) (* a PI))))))
a = abs(a);
double code(double a, double b, double angle) {
	double tmp;
	if (a <= 6.5e-34) {
		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);
public static double code(double a, double b, double angle) {
	double tmp;
	if (a <= 6.5e-34) {
		tmp = 0.011111111111111112 * (Math.PI * (angle * (b * b)));
	} else {
		tmp = 0.011111111111111112 * (angle * ((b - a) * (a * Math.PI)));
	}
	return tmp;
}
a = abs(a)
def code(a, b, angle):
	tmp = 0
	if a <= 6.5e-34:
		tmp = 0.011111111111111112 * (math.pi * (angle * (b * b)))
	else:
		tmp = 0.011111111111111112 * (angle * ((b - a) * (a * math.pi)))
	return tmp
a = abs(a)
function code(a, b, angle)
	tmp = 0.0
	if (a <= 6.5e-34)
		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)
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if (a <= 6.5e-34)
		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
code[a_, b_, angle_] := If[LessEqual[a, 6.5e-34], 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|\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.5 \cdot 10^{-34}:\\
\;\;\;\;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 < 6.49999999999999985e-34

    1. Initial program 54.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*54.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. unpow254.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. unpow254.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999985e-34 < a

    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. associate-*l*46.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. unpow246.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. unpow246.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.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 6.5 \cdot 10^{-34}:\\ \;\;\;\;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 8: 53.5% accurate, 5.5× speedup?

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

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

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

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

Alternative 9: 61.5% accurate, 5.5× speedup?

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

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

    \[\leadsto \color{blue}{\left(2 \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
  4. Taylor expanded in angle around 0 53.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. Step-by-step derivation
    1. associate-*r*65.2%

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

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

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

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

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

Alternative 10: 40.3% accurate, 5.6× speedup?

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

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


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

    1. Initial program 55.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*55.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. unpow255.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. unpow255.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-squares58.9%

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

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

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

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

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

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

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

    if 1.9500000000000001e33 < b

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 34.4% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

Alternative 12: 34.4% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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