ab-angle->ABCF B

Percentage Accurate: 53.7% → 67.2%
Time: 47.7s
Alternatives: 22
Speedup: 5.3×

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

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

Initial Program: 53.7% accurate, 1.0× speedup?

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

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

Alternative 1: 67.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;\frac{angle}{180} \leq 10^{+21}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right) \cdot \left(\sin t_0 \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+121}:\\ \;\;\;\;\left|\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)\right) \cdot \cos \left({\left(\sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left(t_0\right)\right)}\right)}^{3}\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI))))
   (if (<= (/ angle 180.0) 1e+21)
     (*
      2.0
      (*
       (- b a)
       (*
        (cos (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0))))
        (* (sin t_0) (+ b a)))))
     (if (<= (/ angle 180.0) 5e+121)
       (fabs
        (*
         (sin (* PI (* angle 0.005555555555555556)))
         (* 2.0 (pow (+ b a) 2.0))))
       (*
        (* (fma b b (* a (- a))) (* 2.0 (sin (* (/ angle 180.0) PI))))
        (cos (pow (cbrt (expm1 (log1p t_0))) 3.0)))))))
double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double tmp;
	if ((angle / 180.0) <= 1e+21) {
		tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0)))) * (sin(t_0) * (b + a))));
	} else if ((angle / 180.0) <= 5e+121) {
		tmp = fabs((sin((((double) M_PI) * (angle * 0.005555555555555556))) * (2.0 * pow((b + a), 2.0))));
	} else {
		tmp = (fma(b, b, (a * -a)) * (2.0 * sin(((angle / 180.0) * ((double) M_PI))))) * cos(pow(cbrt(expm1(log1p(t_0))), 3.0));
	}
	return tmp;
}
function code(a, b, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	tmp = 0.0
	if (Float64(angle / 180.0) <= 1e+21)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))) * Float64(sin(t_0) * Float64(b + a)))));
	elseif (Float64(angle / 180.0) <= 5e+121)
		tmp = abs(Float64(sin(Float64(pi * Float64(angle * 0.005555555555555556))) * Float64(2.0 * (Float64(b + a) ^ 2.0))));
	else
		tmp = Float64(Float64(fma(b, b, Float64(a * Float64(-a))) * Float64(2.0 * sin(Float64(Float64(angle / 180.0) * pi)))) * cos((cbrt(expm1(log1p(t_0))) ^ 3.0)));
	end
	return tmp
end
code[a_, b_, angle_] := Block[{t$95$0 = N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(angle / 180.0), $MachinePrecision], 1e+21], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle / 180.0), $MachinePrecision], 5e+121], N[Abs[N[(N[Sin[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(2.0 * N[Power[N[(b + a), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(N[(b * b + N[(a * (-a)), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Sin[N[(N[(angle / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[Power[N[Power[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)\right) \cdot \cos \left({\left(\sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left(t_0\right)\right)}\right)}^{3}\right)\\


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

    1. Initial program 63.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*63.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. unpow263.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. unpow263.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-squares67.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. Simplified67.4%

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

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

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

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

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

    if 1e21 < (/.f64 angle 180) < 5.00000000000000007e121

    1. Initial program 33.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*33.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. unpow233.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. unpow233.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) \]
    3. Simplified33.0%

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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. Step-by-step derivation
      1. log1p-expm1-u33.0%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. div-inv32.9%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. metadata-eval32.9%

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

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \color{blue}{1}\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt25.6%

        \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)} \cdot \sqrt{\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)}} \]
      2. sqrt-unprod43.5%

        \[\leadsto \color{blue}{\sqrt{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right) \cdot \left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right)}} \]
      3. pow243.5%

        \[\leadsto \sqrt{\color{blue}{{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right)}^{2}}} \]
    8. Applied egg-rr48.6%

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

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

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

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

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

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

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

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

    if 5.00000000000000007e121 < (/.f64 angle 180)

    1. Initial program 32.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt41.1%

        \[\leadsto \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 \color{blue}{\left(\left(\sqrt[3]{\pi \cdot \frac{angle}{180}} \cdot \sqrt[3]{\pi \cdot \frac{angle}{180}}\right) \cdot \sqrt[3]{\pi \cdot \frac{angle}{180}}\right)} \]
      2. pow340.6%

        \[\leadsto \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 \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \frac{angle}{180}}\right)}^{3}\right)} \]
      3. div-inv43.4%

        \[\leadsto \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({\left(\sqrt[3]{\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}}\right)}^{3}\right) \]
      4. metadata-eval43.4%

        \[\leadsto \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({\left(\sqrt[3]{\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)}\right)}^{3}\right) \]
    5. Applied egg-rr43.4%

      \[\leadsto \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 \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)} \]
    6. Step-by-step derivation
      1. expm1-log1p-u54.3%

        \[\leadsto \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({\left(\sqrt[3]{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}}\right)}^{3}\right) \]
      2. *-commutative54.3%

        \[\leadsto \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({\left(\sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\left(angle \cdot 0.005555555555555556\right) \cdot \pi}\right)\right)}\right)}^{3}\right) \]
      3. *-commutative54.3%

        \[\leadsto \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({\left(\sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi\right)\right)}\right)}^{3}\right) \]
      4. associate-*r*54.3%

        \[\leadsto \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({\left(\sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left(\color{blue}{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)\right)}\right)}^{3}\right) \]
    7. Applied egg-rr54.3%

      \[\leadsto \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({\left(\sqrt[3]{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}}\right)}^{3}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification75.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{angle}{180} \leq 10^{+21}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+121}:\\ \;\;\;\;\left|\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right) \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right|\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(b, b, a \cdot \left(-a\right)\right) \cdot \left(2 \cdot \sin \left(\frac{angle}{180} \cdot \pi\right)\right)\right) \cdot \cos \left({\left(\sqrt[3]{\mathsf{expm1}\left(\mathsf{log1p}\left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right)\right)}\right)}^{3}\right)\\ \end{array} \]

Alternative 2: 66.8% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 69.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*69.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. unpow269.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. unpow269.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-squares69.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. Simplified69.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 74.8%

      \[\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. add-cube-cbrt77.7%

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

        \[\leadsto 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 \left(\color{blue}{{\left(\sqrt[3]{\pi}\right)}^{2}} \cdot \sqrt[3]{\pi}\right)\right)\right) \cdot \left(a + b\right)\right)\right)\right) \]
    6. Applied egg-rr77.7%

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

    if 9.9999999999999997e-224 < (pow.f64 b 2)

    1. Initial program 49.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*49.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. unpow249.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. unpow249.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-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 inf 65.6%

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

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

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

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

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

Alternative 3: 66.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := 0.005555555555555556 \cdot \left(angle \cdot \pi\right)\\ \mathbf{if}\;{b}^{2} \leq 2 \cdot 10^{-45}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos t_0 \cdot \left(\left(b + a\right) \cdot \sin \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(b - a\right) \cdot \left(\cos \left(0.005555555555555556 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right) \cdot \left(\sin t_0 \cdot \left(b + a\right)\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (let* ((t_0 (* 0.005555555555555556 (* angle PI))))
   (if (<= (pow b 2.0) 2e-45)
     (*
      2.0
      (*
       (- b a)
       (* (cos t_0) (* (+ b a) (sin (/ 1.0 (/ (/ 180.0 angle) PI)))))))
     (*
      2.0
      (*
       (- b a)
       (*
        (cos (* 0.005555555555555556 (* angle (pow (sqrt PI) 2.0))))
        (* (sin t_0) (+ b a))))))))
double code(double a, double b, double angle) {
	double t_0 = 0.005555555555555556 * (angle * ((double) M_PI));
	double tmp;
	if (pow(b, 2.0) <= 2e-45) {
		tmp = 2.0 * ((b - a) * (cos(t_0) * ((b + a) * sin((1.0 / ((180.0 / angle) / ((double) M_PI)))))));
	} else {
		tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * pow(sqrt(((double) M_PI)), 2.0)))) * (sin(t_0) * (b + a))));
	}
	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(b, 2.0) <= 2e-45) {
		tmp = 2.0 * ((b - a) * (Math.cos(t_0) * ((b + a) * Math.sin((1.0 / ((180.0 / angle) / Math.PI))))));
	} else {
		tmp = 2.0 * ((b - a) * (Math.cos((0.005555555555555556 * (angle * Math.pow(Math.sqrt(Math.PI), 2.0)))) * (Math.sin(t_0) * (b + a))));
	}
	return tmp;
}
def code(a, b, angle):
	t_0 = 0.005555555555555556 * (angle * math.pi)
	tmp = 0
	if math.pow(b, 2.0) <= 2e-45:
		tmp = 2.0 * ((b - a) * (math.cos(t_0) * ((b + a) * math.sin((1.0 / ((180.0 / angle) / math.pi))))))
	else:
		tmp = 2.0 * ((b - a) * (math.cos((0.005555555555555556 * (angle * math.pow(math.sqrt(math.pi), 2.0)))) * (math.sin(t_0) * (b + a))))
	return tmp
function code(a, b, angle)
	t_0 = Float64(0.005555555555555556 * Float64(angle * pi))
	tmp = 0.0
	if ((b ^ 2.0) <= 2e-45)
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(t_0) * Float64(Float64(b + a) * sin(Float64(1.0 / Float64(Float64(180.0 / angle) / pi)))))));
	else
		tmp = Float64(2.0 * Float64(Float64(b - a) * Float64(cos(Float64(0.005555555555555556 * Float64(angle * (sqrt(pi) ^ 2.0)))) * Float64(sin(t_0) * Float64(b + a)))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	t_0 = 0.005555555555555556 * (angle * pi);
	tmp = 0.0;
	if ((b ^ 2.0) <= 2e-45)
		tmp = 2.0 * ((b - a) * (cos(t_0) * ((b + a) * sin((1.0 / ((180.0 / angle) / pi))))));
	else
		tmp = 2.0 * ((b - a) * (cos((0.005555555555555556 * (angle * (sqrt(pi) ^ 2.0)))) * (sin(t_0) * (b + a))));
	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[b, 2.0], $MachinePrecision], 2e-45], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[t$95$0], $MachinePrecision] * N[(N[(b + a), $MachinePrecision] * N[Sin[N[(1.0 / N[(N[(180.0 / angle), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[Cos[N[(0.005555555555555556 * N[(angle * N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[Sin[t$95$0], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 64.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*64.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. unpow264.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. unpow264.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-squares64.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999997e-45 < (pow.f64 b 2)

    1. Initial program 48.5%

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

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

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

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

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

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

      \[\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. add-sqr-sqrt75.2%

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

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

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

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

Alternative 4: 67.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ 2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right) \cdot \log \left(e^{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)\right) \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (*
  2.0
  (*
   (- b a)
   (*
    (* (sin (* 0.005555555555555556 (* angle PI))) (+ b a))
    (log (exp (cos (* PI (* angle 0.005555555555555556)))))))))
double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((sin((0.005555555555555556 * (angle * ((double) M_PI)))) * (b + a)) * log(exp(cos((((double) M_PI) * (angle * 0.005555555555555556)))))));
}
public static double code(double a, double b, double angle) {
	return 2.0 * ((b - a) * ((Math.sin((0.005555555555555556 * (angle * Math.PI))) * (b + a)) * Math.log(Math.exp(Math.cos((Math.PI * (angle * 0.005555555555555556)))))));
}
def code(a, b, angle):
	return 2.0 * ((b - a) * ((math.sin((0.005555555555555556 * (angle * math.pi))) * (b + a)) * math.log(math.exp(math.cos((math.pi * (angle * 0.005555555555555556)))))))
function code(a, b, angle)
	return Float64(2.0 * Float64(Float64(b - a) * Float64(Float64(sin(Float64(0.005555555555555556 * Float64(angle * pi))) * Float64(b + a)) * log(exp(cos(Float64(pi * Float64(angle * 0.005555555555555556))))))))
end
function tmp = code(a, b, angle)
	tmp = 2.0 * ((b - a) * ((sin((0.005555555555555556 * (angle * pi))) * (b + a)) * log(exp(cos((pi * (angle * 0.005555555555555556)))))));
end
code[a_, b_, angle_] := N[(2.0 * N[(N[(b - a), $MachinePrecision] * N[(N[(N[Sin[N[(0.005555555555555556 * N[(angle * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(b + a), $MachinePrecision]), $MachinePrecision] * N[Log[N[Exp[N[Cos[N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right) \cdot \log \left(e^{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.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. unpow256.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-squares58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.1% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
t_0 := 2 \cdot {\left(b + a\right)}^{2}\\
t_1 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_2 := \sin t_1\\
t_3 := \left|t_2 \cdot t_0\right|\\
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+23}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+36}:\\
\;\;\;\;2 \cdot \left(\left(\left(b + a\right) \cdot t_2\right) \cdot \left(\left(b - a\right) \cdot \cos t_1\right)\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+156}:\\
\;\;\;\;t_3\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 angle 180) < -4.9999999999999999e23 or 4.99999999999999977e36 < (/.f64 angle 180) < 4.99999999999999992e156

    1. Initial program 33.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*33.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. unpow233.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. unpow233.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) \]
    3. Simplified33.7%

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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. Step-by-step derivation
      1. log1p-expm1-u33.7%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. div-inv35.4%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. metadata-eval35.4%

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

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \color{blue}{1}\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt27.0%

        \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)} \cdot \sqrt{\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)}} \]
      2. sqrt-unprod46.3%

        \[\leadsto \color{blue}{\sqrt{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right) \cdot \left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right)}} \]
      3. pow246.3%

        \[\leadsto \sqrt{\color{blue}{{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right)}^{2}}} \]
    8. Applied egg-rr47.5%

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

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

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

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

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

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

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

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

    if -4.9999999999999999e23 < (/.f64 angle 180) < 4.99999999999999977e36

    1. Initial program 74.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999992e156 < (/.f64 angle 180) < 1.99999999999999988e166

    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. *-commutative30.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def30.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\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)\right)} \]
      2. expm1-log1p80.2%

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

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

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

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

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

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

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

    if 1.99999999999999988e166 < (/.f64 angle 180)

    1. Initial program 31.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*31.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. unpow231.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. unpow231.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-squares31.7%

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

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

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

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

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

Alternative 6: 65.6% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
t_1 := \sin t_0\\
t_2 := \left|t_1 \cdot \left(2 \cdot {\left(b + a\right)}^{2}\right)\right|\\
\mathbf{if}\;\frac{angle}{180} \leq -10:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;\frac{angle}{180} \leq 2 \cdot 10^{+112}:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 35.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*35.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. unpow235.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. unpow235.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) \]
    3. Simplified35.5%

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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. Step-by-step derivation
      1. log1p-expm1-u35.5%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. div-inv36.9%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. metadata-eval36.9%

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

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \color{blue}{1}\right) \]
    7. Step-by-step derivation
      1. add-sqr-sqrt23.2%

        \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)} \cdot \sqrt{\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)}} \]
      2. sqrt-unprod43.7%

        \[\leadsto \color{blue}{\sqrt{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right) \cdot \left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right)}} \]
      3. pow243.7%

        \[\leadsto \sqrt{\color{blue}{{\left(\left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot 1\right)\right)}^{2}}} \]
    8. Applied egg-rr46.1%

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

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

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

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

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

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

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

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

    if -10 < (/.f64 angle 180) < 5

    1. Initial program 78.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*78.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. unpow278.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. unpow278.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-squares82.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. Simplified82.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 99.5%

      \[\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. Taylor expanded in angle around 0 99.5%

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

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

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

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

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

    if 1.9999999999999999e112 < (/.f64 angle 180)

    1. Initial program 31.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*31.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. unpow231.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. unpow231.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) \]
    3. Simplified31.2%

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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. Step-by-step derivation
      1. log1p-expm1-u31.2%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. div-inv34.9%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. metadata-eval34.9%

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

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \color{blue}{1}\right) \]
    7. Taylor expanded in angle around inf 41.4%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 66.8% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 58.6%

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

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

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

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

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

    if 2.10000000000000007e76 < b

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

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

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

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

Alternative 8: 67.0% accurate, 1.5× speedup?

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

\\
2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right) \cdot \cos \left(\frac{1}{\frac{\frac{180}{angle}}{\pi}}\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.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. unpow256.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-squares58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 65.3% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.6e165

    1. Initial program 45.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*45.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. unpow245.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. unpow245.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-squares57.7%

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

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

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

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

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

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

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

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

    if -1.6e165 < b

    1. Initial program 57.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*57.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. unpow257.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. unpow257.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-squares59.1%

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

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

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

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

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

Alternative 10: 63.4% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -5 \cdot 10^{+168}:\\
\;\;\;\;\left|\left(angle \cdot \pi\right) \cdot \left(\left(b \cdot b\right) \cdot 0.011111111111111112\right)\right|\\

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

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


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

    1. Initial program 37.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*37.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. unpow237.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. unpow237.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-squares40.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. Simplified40.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 33.4%

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \color{blue}{\left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)} \]
    8. Step-by-step derivation
      1. add-sqr-sqrt14.7%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{{\left(\left(0.011111111111111112 \cdot \left(angle \cdot \left(\color{blue}{\left(\sqrt[3]{\pi} \cdot \sqrt[3]{\pi}\right)} \cdot \sqrt[3]{\pi}\right)\right)\right) \cdot \left(b \cdot b\right)\right)}^{2}} \]
      9. add-cube-cbrt44.4%

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

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

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

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

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

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

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

        \[\leadsto \left|\color{blue}{\left(\left(angle \cdot \pi\right) \cdot \left(b \cdot b\right)\right)} \cdot 0.011111111111111112\right| \]
      7. associate-*l*44.4%

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

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

    if -4.99999999999999967e168 < (/.f64 angle 180) < 1.00000000000000009e25

    1. Initial program 67.6%

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

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

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

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

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

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

      \[\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.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. *-commutative82.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. +-commutative82.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. Simplified82.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)} \]

    if 1.00000000000000009e25 < (/.f64 angle 180)

    1. Initial program 33.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*33.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. unpow233.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. unpow233.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) \]
    3. Simplified33.2%

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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. Step-by-step derivation
      1. log1p-expm1-u33.2%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. div-inv35.9%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. metadata-eval35.9%

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

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \color{blue}{1}\right) \]
    7. Taylor expanded in angle around inf 39.6%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.0% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-61} \lor \neg \left(a \leq 8.6 \cdot 10^{-149}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.00000000000000012e-61 or 8.60000000000000073e-149 < a

    1. Initial program 48.2%

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

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

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

        \[\leadsto \left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. difference-of-squares52.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. Simplified52.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 52.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*65.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. *-commutative65.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. +-commutative65.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. Simplified65.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)} \]

    if -3.00000000000000012e-61 < a < 8.60000000000000073e-149

    1. Initial program 71.6%

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

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

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

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

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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. Step-by-step derivation
      1. log1p-expm1-u71.6%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. div-inv73.1%

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

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
    5. Applied egg-rr73.1%

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \color{blue}{1}\right) \]
    7. Step-by-step derivation
      1. rem-cube-cbrt70.1%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \color{blue}{\left({\left(\sqrt[3]{\pi \cdot \left(angle \cdot 0.005555555555555556\right)}\right)}^{3}\right)}\right)\right) \cdot 1\right) \]
      2. *-commutative70.1%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left({\left(\sqrt[3]{\color{blue}{\left(angle \cdot 0.005555555555555556\right) \cdot \pi}}\right)}^{3}\right)\right)\right) \cdot 1\right) \]
      3. *-commutative70.1%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left({\left(\sqrt[3]{\color{blue}{\left(0.005555555555555556 \cdot angle\right)} \cdot \pi}\right)}^{3}\right)\right)\right) \cdot 1\right) \]
      4. associate-*r*71.0%

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \color{blue}{\left({\left(\sqrt[3]{0.005555555555555556 \cdot \left(angle \cdot \pi\right)}\right)}^{3}\right)}\right)\right) \cdot 1\right) \]
    9. Taylor expanded in b around inf 71.4%

      \[\leadsto \color{blue}{2 \cdot \left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot {b}^{2}\right)} \]
    10. Step-by-step derivation
      1. *-commutative71.4%

        \[\leadsto \color{blue}{\left(\sin \left(0.005555555555555556 \cdot \left({1}^{0.3333333333333333} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot {b}^{2}\right) \cdot 2} \]
      2. pow-base-171.4%

        \[\leadsto \left(\sin \left(0.005555555555555556 \cdot \left(\color{blue}{1} \cdot \left(angle \cdot \pi\right)\right)\right) \cdot {b}^{2}\right) \cdot 2 \]
      3. *-lft-identity71.4%

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

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

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

        \[\leadsto \sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(2 \cdot \color{blue}{\left(b \cdot b\right)}\right) \]
    11. Simplified71.4%

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

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

Alternative 12: 62.0% accurate, 2.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-61} \lor \neg \left(a \leq 2.6 \cdot 10^{-138}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.0000000000000001e-61 or 2.6e-138 < a

    1. Initial program 47.9%

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

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

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

        \[\leadsto \left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. difference-of-squares52.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. Simplified52.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 52.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*64.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. *-commutative64.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. +-commutative64.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. Simplified64.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)} \]

    if -2.0000000000000001e-61 < a < 2.6e-138

    1. Initial program 71.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*71.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. unpow271.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. unpow271.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) \]
    3. Simplified71.5%

      \[\leadsto \color{blue}{\left(2 \cdot \left(b \cdot b - 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. Step-by-step derivation
      1. log1p-expm1-u71.5%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      2. div-inv72.9%

        \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      3. metadata-eval72.9%

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

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

      \[\leadsto \left(2 \cdot \left(b \cdot b - a \cdot a\right)\right) \cdot \left(\mathsf{log1p}\left(\mathsf{expm1}\left(\sin \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right) \cdot \color{blue}{1}\right) \]
    7. Taylor expanded in b around inf 71.2%

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

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

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

        \[\leadsto \left(2 \cdot \left(b \cdot b\right)\right) \cdot \sin \color{blue}{\left(\left(0.005555555555555556 \cdot angle\right) \cdot \pi\right)} \]
    9. Simplified71.4%

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

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

Alternative 13: 65.2% accurate, 2.9× speedup?

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

\\
2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(0.005555555555555556 \cdot \left(angle \cdot \pi\right)\right) \cdot \left(b + a\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.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. unpow256.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-squares58.9%

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

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

    \[\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. Taylor expanded in angle around 0 67.6%

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

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

Alternative 14: 48.4% accurate, 5.2× speedup?

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

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

\mathbf{elif}\;b \leq 2.1 \cdot 10^{-19}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;b \leq 3.8 \cdot 10^{+143}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(b \cdot b\right)\right)\\

\mathbf{elif}\;b \leq 6.2 \cdot 10^{+189}:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.4000000000000002e-86 or 6.1999999999999999e189 < b

    1. Initial program 49.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*49.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. unpow249.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. unpow249.2%

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

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

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

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

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

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

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

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

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

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

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

    if -9.4000000000000002e-86 < b < 2.0999999999999999e-19 or 3.8e143 < b < 6.1999999999999999e189

    1. Initial program 63.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*63.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. unpow263.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. unpow263.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-squares65.4%

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

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

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

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

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

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

    if 2.0999999999999999e-19 < b < 3.8e143

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.4 \cdot 10^{-86}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\ \mathbf{elif}\;b \leq 2.1 \cdot 10^{-19}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\ \mathbf{elif}\;b \leq 3.8 \cdot 10^{+143}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(b \cdot b\right)\right)\\ \mathbf{elif}\;b \leq 6.2 \cdot 10^{+189}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\ \end{array} \]

Alternative 15: 50.7% accurate, 5.3× speedup?

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

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

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

\mathbf{elif}\;b \leq 1.25 \cdot 10^{-19}:\\
\;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \left(a \cdot \pi\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -2.0999999999999999e139

    1. Initial program 42.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*42.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. unpow242.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. unpow242.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-squares52.1%

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e139 < b < -9.0000000000000006e-80

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

    if -9.0000000000000006e-80 < b < 1.2500000000000001e-19

    1. Initial program 66.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*66.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. unpow266.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. unpow266.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-squares66.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. Simplified66.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 62.3%

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

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

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

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

    if 1.2500000000000001e-19 < b

    1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 55.6% accurate, 5.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -7 \cdot 10^{+203} \lor \neg \left(b \leq 7 \cdot 10^{+189}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -7.00000000000000062e203 or 6.99999999999999991e189 < b

    1. Initial program 44.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*44.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. unpow244.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. unpow244.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-squares52.7%

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000062e203 < b < 6.99999999999999991e189

    1. Initial program 58.9%

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

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

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

        \[\leadsto \left(2 \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right) \]
      4. difference-of-squares60.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. Simplified60.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 58.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification62.1%

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

Alternative 17: 62.0% accurate, 5.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.1 \cdot 10^{-182} \lor \neg \left(a \leq 3.2 \cdot 10^{-172}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.10000000000000017e-182 or 3.2000000000000001e-172 < a

    1. Initial program 49.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*49.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. unpow249.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. unpow249.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-squares52.7%

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

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

    if -5.10000000000000017e-182 < a < 3.2000000000000001e-172

    1. Initial program 85.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*85.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. unpow285.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. unpow285.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-squares85.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.1 \cdot 10^{-182} \lor \neg \left(a \leq 3.2 \cdot 10^{-172}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \left(b - a\right)\right) \cdot \left(\pi \cdot \left(b + a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot \pi\right) \cdot \left(b \cdot b\right)\right)\\ \end{array} \]

Alternative 18: 49.8% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9 \cdot 10^{-80} \lor \neg \left(b \leq 1.95 \cdot 10^{-19}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;angle \cdot \left(-0.011111111111111112 \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (or (<= b -9e-80) (not (<= b 1.95e-19)))
   (* 0.011111111111111112 (* (* angle b) (* b PI)))
   (* angle (* -0.011111111111111112 (* PI (* a a))))))
double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -9e-80) || !(b <= 1.95e-19)) {
		tmp = 0.011111111111111112 * ((angle * b) * (b * ((double) M_PI)));
	} else {
		tmp = angle * (-0.011111111111111112 * (((double) M_PI) * (a * a)));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -9e-80) || !(b <= 1.95e-19)) {
		tmp = 0.011111111111111112 * ((angle * b) * (b * Math.PI));
	} else {
		tmp = angle * (-0.011111111111111112 * (Math.PI * (a * a)));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if (b <= -9e-80) or not (b <= 1.95e-19):
		tmp = 0.011111111111111112 * ((angle * b) * (b * math.pi))
	else:
		tmp = angle * (-0.011111111111111112 * (math.pi * (a * a)))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if ((b <= -9e-80) || !(b <= 1.95e-19))
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle * b) * Float64(b * pi)));
	else
		tmp = Float64(angle * Float64(-0.011111111111111112 * Float64(pi * Float64(a * a))));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if ((b <= -9e-80) || ~((b <= 1.95e-19)))
		tmp = 0.011111111111111112 * ((angle * b) * (b * pi));
	else
		tmp = angle * (-0.011111111111111112 * (pi * (a * a)));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[Or[LessEqual[b, -9e-80], N[Not[LessEqual[b, 1.95e-19]], $MachinePrecision]], N[(0.011111111111111112 * N[(N[(angle * b), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(angle * N[(-0.011111111111111112 * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{-80} \lor \neg \left(b \leq 1.95 \cdot 10^{-19}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.0000000000000006e-80 or 1.94999999999999998e-19 < b

    1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.0000000000000006e-80 < b < 1.94999999999999998e-19

    1. Initial program 66.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*66.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. unpow266.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. unpow266.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-squares66.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. Simplified66.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 62.3%

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

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

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

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

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

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

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

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

Alternative 19: 49.8% accurate, 5.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -6 \cdot 10^{-80} \lor \neg \left(b \leq 1.62 \cdot 10^{-19}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot -0.011111111111111112\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\\ \end{array} \end{array} \]
(FPCore (a b angle)
 :precision binary64
 (if (or (<= b -6e-80) (not (<= b 1.62e-19)))
   (* 0.011111111111111112 (* (* angle b) (* b PI)))
   (* (* angle -0.011111111111111112) (* PI (* a a)))))
double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -6e-80) || !(b <= 1.62e-19)) {
		tmp = 0.011111111111111112 * ((angle * b) * (b * ((double) M_PI)));
	} else {
		tmp = (angle * -0.011111111111111112) * (((double) M_PI) * (a * a));
	}
	return tmp;
}
public static double code(double a, double b, double angle) {
	double tmp;
	if ((b <= -6e-80) || !(b <= 1.62e-19)) {
		tmp = 0.011111111111111112 * ((angle * b) * (b * Math.PI));
	} else {
		tmp = (angle * -0.011111111111111112) * (Math.PI * (a * a));
	}
	return tmp;
}
def code(a, b, angle):
	tmp = 0
	if (b <= -6e-80) or not (b <= 1.62e-19):
		tmp = 0.011111111111111112 * ((angle * b) * (b * math.pi))
	else:
		tmp = (angle * -0.011111111111111112) * (math.pi * (a * a))
	return tmp
function code(a, b, angle)
	tmp = 0.0
	if ((b <= -6e-80) || !(b <= 1.62e-19))
		tmp = Float64(0.011111111111111112 * Float64(Float64(angle * b) * Float64(b * pi)));
	else
		tmp = Float64(Float64(angle * -0.011111111111111112) * Float64(pi * Float64(a * a)));
	end
	return tmp
end
function tmp_2 = code(a, b, angle)
	tmp = 0.0;
	if ((b <= -6e-80) || ~((b <= 1.62e-19)))
		tmp = 0.011111111111111112 * ((angle * b) * (b * pi));
	else
		tmp = (angle * -0.011111111111111112) * (pi * (a * a));
	end
	tmp_2 = tmp;
end
code[a_, b_, angle_] := If[Or[LessEqual[b, -6e-80], N[Not[LessEqual[b, 1.62e-19]], $MachinePrecision]], N[(0.011111111111111112 * N[(N[(angle * b), $MachinePrecision] * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(angle * -0.011111111111111112), $MachinePrecision] * N[(Pi * N[(a * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{-80} \lor \neg \left(b \leq 1.62 \cdot 10^{-19}\right):\\
\;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -6.00000000000000014e-80 or 1.62000000000000009e-19 < b

    1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000014e-80 < b < 1.62000000000000009e-19

    1. Initial program 66.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*66.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. unpow266.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. unpow266.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-squares66.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. Simplified66.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 62.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -6 \cdot 10^{-80} \lor \neg \left(b \leq 1.62 \cdot 10^{-19}\right):\\ \;\;\;\;0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(angle \cdot -0.011111111111111112\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\\ \end{array} \]

Alternative 20: 49.8% accurate, 5.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{-80}:\\
\;\;\;\;0.011111111111111112 \cdot \left(\pi \cdot \left(b \cdot \left(angle \cdot b\right)\right)\right)\\

\mathbf{elif}\;b \leq 2.1 \cdot 10^{-19}:\\
\;\;\;\;\left(angle \cdot -0.011111111111111112\right) \cdot \left(\pi \cdot \left(a \cdot a\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.0000000000000006e-80

    1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.0000000000000006e-80 < b < 2.0999999999999999e-19

    1. Initial program 66.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*66.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. unpow266.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. unpow266.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-squares66.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. Simplified66.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 62.3%

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

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

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

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

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

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

    if 2.0999999999999999e-19 < b

    1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 34.5% accurate, 5.7× speedup?

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

\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.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. unpow256.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-squares58.9%

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

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

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

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

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

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

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

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

Alternative 22: 37.6% accurate, 5.7× speedup?

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

\\
0.011111111111111112 \cdot \left(\left(angle \cdot b\right) \cdot \left(b \cdot \pi\right)\right)
\end{array}
Derivation
  1. Initial program 56.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*56.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. unpow256.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. unpow256.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-squares58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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