ab-angle->ABCF B

Percentage Accurate: 54.4% → 66.1%
Time: 24.1s
Alternatives: 11
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 11 alternatives:

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

Initial Program: 54.4% 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} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{+52}:\\ \;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos t_0\right) \cdot \left(\sin t_0 \cdot \left(a + b\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \left(angle \cdot \left(a + b\right)\right)\right) \cdot \left(\left(b - a\right) \cdot 0.011111111111111112\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI))))
   (if (<= (pow a 2.0) 5e+52)
     (* 2.0 (* (* (- b a) (cos t_0)) (* (sin t_0) (+ a b))))
     (* (* PI (* angle (+ a b))) (* (- b a) 0.011111111111111112)))))
double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double tmp;
	if (pow(a, 2.0) <= 5e+52) {
		tmp = 2.0 * (((b - a) * cos(t_0)) * (sin(t_0) * (a + b)));
	} else {
		tmp = (((double) M_PI) * (angle * (a + b))) * ((b - a) * 0.011111111111111112);
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * Math.PI);
	double tmp;
	if (Math.pow(a, 2.0) <= 5e+52) {
		tmp = 2.0 * (((b - a) * Math.cos(t_0)) * (Math.sin(t_0) * (a + b)));
	} else {
		tmp = (Math.PI * (angle * (a + b))) * ((b - a) * 0.011111111111111112);
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = 0.005555555555555556 * (angle * math.pi)
	tmp = 0
	if math.pow(a, 2.0) <= 5e+52:
		tmp = 2.0 * (((b - a) * math.cos(t_0)) * (math.sin(t_0) * (a + b)))
	else:
		tmp = (math.pi * (angle * (a + b))) * ((b - a) * 0.011111111111111112)
	return tmp
function code(a, b, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	tmp = 0.0
	if ((a ^ 2.0) <= 5e+52)
		tmp = Float64(2.0 * Float64(Float64(Float64(b - a) * cos(t_0)) * Float64(sin(t_0) * Float64(a + b))));
	else
		tmp = Float64(Float64(pi * Float64(angle * Float64(a + b))) * Float64(Float64(b - a) * 0.011111111111111112));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = 0.005555555555555556 * (angle * pi);
	tmp = 0.0;
	if ((a ^ 2.0) <= 5e+52)
		tmp = 2.0 * (((b - a) * cos(t_0)) * (sin(t_0) * (a + b)));
	else
		tmp = (pi * (angle * (a + b))) * ((b - a) * 0.011111111111111112);
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 5e+52], N[(2.0 * N[(N[(N[(b - a), $MachinePrecision] * N[Cos[t$95$0], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * N[(angle * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\
\mathbf{if}\;{a}^{2} \leq 5 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot \left(\left(\left(b - a\right) \cdot \cos t_0\right) \cdot \left(\sin t_0 \cdot \left(a + b\right)\right)\right)\\

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


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

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

    if 5e52 < (pow.f64 a 2)

    1. Initial program 39.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*39.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. unpow239.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. unpow239.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-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 56.5%

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

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

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

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

      \[\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. Step-by-step derivation
      1. *-commutative75.0%

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

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

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

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

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

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

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

        \[\leadsto {\left(0.011111111111111112 \cdot \color{blue}{\left(\pi \cdot \left(\left(b + a\right) \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right)}\right)}^{1} \]
    8. Applied egg-rr75.1%

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

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

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

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

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

        \[\leadsto {\left(0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot angle\right) \cdot \color{blue}{\left(\left(b + a\right) \cdot \pi\right)}\right)\right)}^{1} \]
      5. +-commutative75.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 64.6% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 1.2 \cdot 10^{-208}:\\
\;\;\;\;\left(2 \cdot \left(b \cdot \left(b \cdot \sin \left(angle \cdot \left(0.005555555555555556 \cdot \pi\right)\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1999999999999999e-208 < (pow.f64 a 2)

    1. Initial program 47.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*69.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. *-commutative69.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. +-commutative69.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. Simplified69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 64.6% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;{a}^{2} \leq 1.2 \cdot 10^{-208}:\\
\;\;\;\;b \cdot \left(b \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\

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


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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt[3]{{\left(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)\right)}^{3}}} \]
    5. Taylor expanded in b around inf 61.3%

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

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

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

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

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

        \[\leadsto b \cdot \left(b \cdot \sin \color{blue}{\left(\pi \cdot \left(0.011111111111111112 \cdot angle\right)\right)}\right) \]
      6. *-commutative65.0%

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

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

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

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

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

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

    if 1.1999999999999999e-208 < (pow.f64 a 2)

    1. Initial program 47.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*69.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. *-commutative69.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. +-commutative69.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. Simplified69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 55.6% accurate, 5.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.8 \cdot 10^{+144}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)\\

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


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

    1. Initial program 55.3%

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

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

    if 5.79999999999999996e144 < a

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

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

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

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

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

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

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

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

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

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

Alternative 5: 43.1% accurate, 5.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.3 \cdot 10^{+60}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\

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


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

    1. Initial program 56.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*56.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. unpow256.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. unpow256.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.5%

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

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

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

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

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

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

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

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

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

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

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

    if 3.2999999999999998e60 < a

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

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

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

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

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

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

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

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

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

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

Alternative 6: 47.7% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(b - a\right) \cdot angle\\ \mathbf{if}\;b \leq 8.6 \cdot 10^{-7}:\\ \;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left(a \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left(b \cdot \pi\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* (- b a) angle)))
   (if (<= b 8.6e-7)
     (* 0.011111111111111112 (* t_0 (* a PI)))
     (* 0.011111111111111112 (* t_0 (* b PI))))))
double code(double a, double b, double angle) {
	double t_0 = (b - a) * angle;
	double tmp;
	if (b <= 8.6e-7) {
		tmp = 0.011111111111111112 * (t_0 * (a * ((double) M_PI)));
	} else {
		tmp = 0.011111111111111112 * (t_0 * (b * ((double) M_PI)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double t_0 = (b - a) * angle;
	double tmp;
	if (b <= 8.6e-7) {
		tmp = 0.011111111111111112 * (t_0 * (a * Math.PI));
	} else {
		tmp = 0.011111111111111112 * (t_0 * (b * Math.PI));
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = (b - a) * angle
	tmp = 0
	if b <= 8.6e-7:
		tmp = 0.011111111111111112 * (t_0 * (a * math.pi))
	else:
		tmp = 0.011111111111111112 * (t_0 * (b * math.pi))
	return tmp
function code(a, b, angle)
	t_0 = Float64(Float64(b - a) * angle)
	tmp = 0.0
	if (b <= 8.6e-7)
		tmp = Float64(0.011111111111111112 * Float64(t_0 * Float64(a * pi)));
	else
		tmp = Float64(0.011111111111111112 * Float64(t_0 * Float64(b * pi)));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = (b - a) * angle;
	tmp = 0.0;
	if (b <= 8.6e-7)
		tmp = 0.011111111111111112 * (t_0 * (a * pi));
	else
		tmp = 0.011111111111111112 * (t_0 * (b * pi));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]}, If[LessEqual[b, 8.6e-7], N[(0.011111111111111112 * N[(t$95$0 * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(t$95$0 * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(b - a\right) \cdot angle\\
\mathbf{if}\;b \leq 8.6 \cdot 10^{-7}:\\
\;\;\;\;0.011111111111111112 \cdot \left(t_0 \cdot \left(a \cdot \pi\right)\right)\\

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


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

    1. Initial program 53.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*53.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. unpow253.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. unpow253.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-squares57.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. Simplified57.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 55.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*63.3%

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

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

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

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

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

    if 8.6000000000000002e-7 < b

    1. Initial program 46.0%

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

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

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

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

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

      \[\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. Taylor expanded in b around inf 65.1%

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

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

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

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

Alternative 7: 61.7% accurate, 5.5× speedup?

\[\begin{array}{l} \\ 0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot angle\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (* 0.011111111111111112 (* (* (- b a) angle) (* PI (+ a b)))))
double code(double a, double b, double angle) {
	return 0.011111111111111112 * (((b - a) * angle) * (((double) M_PI) * (a + b)));
}
public static double code(double a, double b, double angle) {
	return 0.011111111111111112 * (((b - a) * angle) * (Math.PI * (a + b)));
}
def code(a, b, angle):
	return 0.011111111111111112 * (((b - a) * angle) * (math.pi * (a + b)))
function code(a, b, angle)
	return Float64(0.011111111111111112 * Float64(Float64(Float64(b - a) * angle) * Float64(pi * Float64(a + b))))
end
function tmp = code(a, b, angle)
	tmp = 0.011111111111111112 * (((b - a) * angle) * (pi * (a + b)));
end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision] * N[(Pi * N[(a + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.011111111111111112 \cdot \left(\left(\left(b - a\right) \cdot angle\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.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*51.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. unpow251.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. unpow251.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-squares56.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. Simplified56.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 57.0%

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

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

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

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

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

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

Alternative 8: 61.7% accurate, 5.5× speedup?

\[\begin{array}{l} \\ 0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (* 0.011111111111111112 (* PI (* (+ a b) (* (- b a) angle)))))
double code(double a, double b, double angle) {
	return 0.011111111111111112 * (((double) M_PI) * ((a + b) * ((b - a) * angle)));
}
public static double code(double a, double b, double angle) {
	return 0.011111111111111112 * (Math.PI * ((a + b) * ((b - a) * angle)));
}
def code(a, b, angle):
	return 0.011111111111111112 * (math.pi * ((a + b) * ((b - a) * angle)))
function code(a, b, angle)
	return Float64(0.011111111111111112 * Float64(pi * Float64(Float64(a + b) * Float64(Float64(b - a) * angle))))
end
function tmp = code(a, b, angle)
	tmp = 0.011111111111111112 * (pi * ((a + b) * ((b - a) * angle)));
end
code[a_, b_, angle_] := N[(0.011111111111111112 * N[(Pi * N[(N[(a + b), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
0.011111111111111112 \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(\left(b - a\right) \cdot angle\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.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*51.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. unpow251.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. unpow251.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-squares56.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. Simplified56.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 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 40.2% accurate, 5.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.5 \cdot 10^{+75}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)\\

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


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

    1. Initial program 55.7%

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

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

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

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

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

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)} \]
    5. 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)} \]
    7. Taylor expanded in b around inf 42.8%

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

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

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

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

    if 9.50000000000000061e75 < a

    1. Initial program 34.0%

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

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

      \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(a + b\right)\right)\right)\right)} \]
    5. Step-by-step derivation
      1. associate-*r*80.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. *-commutative80.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. +-commutative80.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. Simplified80.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. Taylor expanded in b around 0 44.8%

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

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

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

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

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

Alternative 10: 34.1% accurate, 5.7× speedup?

\[\begin{array}{l} \\ -0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(a \cdot \pi\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (* -0.011111111111111112 (* angle (* a (* a PI)))))
double code(double a, double b, double angle) {
	return -0.011111111111111112 * (angle * (a * (a * ((double) M_PI))));
}
public static double code(double a, double b, double angle) {
	return -0.011111111111111112 * (angle * (a * (a * Math.PI)));
}
def code(a, b, angle):
	return -0.011111111111111112 * (angle * (a * (a * math.pi)))
function code(a, b, angle)
	return Float64(-0.011111111111111112 * Float64(angle * Float64(a * Float64(a * pi))))
end
function tmp = code(a, b, angle)
	tmp = -0.011111111111111112 * (angle * (a * (a * pi)));
end
code[a_, b_, angle_] := N[(-0.011111111111111112 * N[(angle * N[(a * N[(a * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
-0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(a \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.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*51.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. unpow251.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. unpow251.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-squares56.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. Simplified56.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 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 34.1% accurate, 5.7× speedup?

\[\begin{array}{l} \\ -0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (* -0.011111111111111112 (* PI (* angle (* a a)))))
double code(double a, double b, double angle) {
	return -0.011111111111111112 * (((double) M_PI) * (angle * (a * a)));
}
public static double code(double a, double b, double angle) {
	return -0.011111111111111112 * (Math.PI * (angle * (a * a)));
}
def code(a, b, angle):
	return -0.011111111111111112 * (math.pi * (angle * (a * a)))
function code(a, b, angle)
	return Float64(-0.011111111111111112 * Float64(pi * Float64(angle * Float64(a * a))))
end
function tmp = code(a, b, angle)
	tmp = -0.011111111111111112 * (pi * (angle * (a * a)));
end
code[a_, b_, angle_] := N[(-0.011111111111111112 * N[(Pi * N[(angle * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
-0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(a \cdot a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 51.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*51.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. unpow251.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. unpow251.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-squares56.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. Simplified56.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 57.0%

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

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

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

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

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

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

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

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

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

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

Reproduce

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