ab-angle->ABCF B

Percentage Accurate: 53.2% → 66.6%
Time: 31.8s
Alternatives: 13
Speedup: 5.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 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.2% accurate, 1.0× speedup?

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

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

Alternative 1: 66.6% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 38.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. *-commutative38.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*l*38.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\left(\left(a + b\right) \cdot {\left(b - a\right)}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(0.005555555555555556 \cdot angle\right)\right)}{b - a}} \]
    8. Step-by-step derivation
      1. add-cube-cbrt60.7%

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

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

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

    if -1.0000000000000001e182 < (/.f64 angle 180)

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

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

        \[\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. associate-*l*59.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative52.6%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in52.6%

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

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

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

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

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

Alternative 2: 67.1% accurate, 1.5× speedup?

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

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

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


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

    1. Initial program 34.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. *-commutative34.3%

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

        \[\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. associate-*l*34.3%

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. difference-of-squares34.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative22.5%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in22.5%

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

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

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

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

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

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

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

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

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

    if -1.99999999999999984e81 < (/.f64 angle 180)

    1. Initial program 62.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. *-commutative62.1%

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

        \[\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. associate-*l*62.1%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative54.8%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in54.8%

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

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

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

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

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

Alternative 3: 66.8% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{angle}{180} \leq -1 \cdot 10^{+182}:\\
\;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot {\left(\sqrt{\pi}\right)}^{2}\right)\right)\right)\\

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


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

    1. Initial program 38.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. *-commutative38.0%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative21.9%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in21.9%

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

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

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

      \[\leadsto \left(a + b\right) \cdot \left(\left(b - a\right) \cdot \color{blue}{\sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)}\right) \]
    9. Step-by-step derivation
      1. add-sqr-sqrt48.5%

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

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

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

    if -1.0000000000000001e182 < (/.f64 angle 180)

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

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

        \[\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. associate-*l*59.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative52.6%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in52.6%

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

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

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

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

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

Alternative 4: 52.8% accurate, 2.9× speedup?

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

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

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

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


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

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative49.5%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in49.5%

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

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

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

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

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

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

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

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

    if 3.40000000000000013e-129 < b < 2.0000000000000002e230

    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. *-commutative48.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*48.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. associate-*l*48.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative46.2%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in46.2%

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

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
    7. Simplified68.1%

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

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

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

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

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

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

    if 2.0000000000000002e230 < b

    1. Initial program 50.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. *-commutative50.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*50.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. associate-*l*50.6%

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. difference-of-squares50.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative64.8%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in64.8%

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

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

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

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

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

Alternative 5: 52.9% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 62.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. *-commutative62.2%

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

        \[\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. associate-*l*62.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative56.9%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in56.9%

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

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

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

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

    if 1.0999999999999999e-84 < 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. *-commutative48.2%

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

        \[\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. associate-*l*48.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative34.3%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in34.3%

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

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right) + \mathsf{fma}\left(-a, a, a \cdot a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)} \]
    7. Simplified66.4%

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

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

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

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

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

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

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

Alternative 6: 66.8% accurate, 2.9× speedup?

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

\\
\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(0.011111111111111112 \cdot \left(angle \cdot \pi\right)\right)\right)
\end{array}
Derivation
  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. *-commutative57.7%

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

      \[\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. associate-*l*57.7%

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
  4. Step-by-step derivation
    1. difference-of-squares57.7%

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
  6. Step-by-step derivation
    1. *-commutative49.6%

      \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
    2. distribute-lft-in49.6%

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

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

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

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

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

Alternative 7: 49.6% accurate, 2.9× speedup?

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

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

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


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

    1. Initial program 62.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. *-commutative62.3%

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

        \[\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. associate-*l*62.3%

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
    4. Step-by-step derivation
      1. associate-*l*72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3e-138 < a

    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. *-commutative49.1%

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

        \[\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. associate-*l*49.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
    6. Step-by-step derivation
      1. *-commutative36.3%

        \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
      2. distribute-lft-in36.3%

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

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

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

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

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

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

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

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

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

Alternative 8: 53.7% accurate, 5.5× speedup?

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

\\
0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)
\end{array}
Derivation
  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. *-commutative57.7%

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

      \[\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. associate-*l*57.7%

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

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

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

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

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

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

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

Alternative 9: 61.7% accurate, 5.5× speedup?

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

\\
\left(a + b\right) \cdot \left(0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b - a\right)\right)\right)\right)
\end{array}
Derivation
  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. *-commutative57.7%

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

      \[\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. associate-*l*57.7%

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(\left(2 \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
  4. Step-by-step derivation
    1. difference-of-squares57.7%

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

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

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

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

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

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right)} \]
  6. Step-by-step derivation
    1. *-commutative49.6%

      \[\leadsto \color{blue}{\sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)} + \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot \mathsf{fma}\left(-a, a, a \cdot a\right) \]
    2. distribute-lft-in49.6%

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

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

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

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

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

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

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

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

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

Alternative 10: 40.2% accurate, 5.6× speedup?

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

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

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


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

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

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

        \[\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. associate-*l*61.8%

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999991e-78 < a

    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. *-commutative48.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*48.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. associate-*l*48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 40.2% accurate, 5.6× speedup?

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

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

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


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

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

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

        \[\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. associate-*l*61.8%

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

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

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

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

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

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

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

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

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

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

    if 1.45e-78 < a

    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. *-commutative48.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*48.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. associate-*l*48.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 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 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. *-commutative57.7%

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

      \[\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. associate-*l*57.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 34.5% accurate, 5.7× speedup?

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

\\
0.011111111111111112 \cdot \left(\pi \cdot \left(angle \cdot \left(b \cdot b\right)\right)\right)
\end{array}
Derivation
  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. *-commutative57.7%

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

      \[\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. associate-*l*57.7%

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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