ab-angle->ABCF B

Percentage Accurate: 54.7% → 66.9%
Time: 16.6s
Alternatives: 18
Speedup: 23.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 54.7% accurate, 1.0× speedup?

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

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

Alternative 1: 66.9% accurate, 0.8× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 10^{+111}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(2 \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \sqrt[3]{e^{3 \cdot \log \pi}}\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= (pow a 2.0) 1e+111)
   (*
    (+ a b_m)
    (*
     (- b_m a)
     (sin (* (* 2.0 (cbrt (pow PI 3.0))) (* angle 0.005555555555555556)))))
   (*
    (+ a b_m)
    (*
     (- b_m a)
     (sin
      (*
       (* angle 0.005555555555555556)
       (* 2.0 (cbrt (exp (* 3.0 (log PI)))))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (pow(a, 2.0) <= 1e+111) {
		tmp = (a + b_m) * ((b_m - a) * sin(((2.0 * cbrt(pow(((double) M_PI), 3.0))) * (angle * 0.005555555555555556))));
	} else {
		tmp = (a + b_m) * ((b_m - a) * sin(((angle * 0.005555555555555556) * (2.0 * cbrt(exp((3.0 * log(((double) M_PI)))))))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (Math.pow(a, 2.0) <= 1e+111) {
		tmp = (a + b_m) * ((b_m - a) * Math.sin(((2.0 * Math.cbrt(Math.pow(Math.PI, 3.0))) * (angle * 0.005555555555555556))));
	} else {
		tmp = (a + b_m) * ((b_m - a) * Math.sin(((angle * 0.005555555555555556) * (2.0 * Math.cbrt(Math.exp((3.0 * Math.log(Math.PI))))))));
	}
	return tmp;
}
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if ((a ^ 2.0) <= 1e+111)
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(Float64(Float64(2.0 * cbrt((pi ^ 3.0))) * Float64(angle * 0.005555555555555556)))));
	else
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(Float64(Float64(angle * 0.005555555555555556) * Float64(2.0 * cbrt(exp(Float64(3.0 * log(pi)))))))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 1e+111], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(N[(2.0 * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(2.0 * N[Power[N[Exp[N[(3.0 * N[Log[Pi], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

\mathbf{else}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \sqrt[3]{e^{3 \cdot \log \pi}}\right)\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a #s(literal 2 binary64)) < 9.99999999999999957e110

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999957e110 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(2 \cdot \sqrt[3]{e^{\color{blue}{3 \cdot \log \pi}}}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)}^{1} \]
    12. Applied egg-rr78.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 10^{+111}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(2 \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \sqrt[3]{e^{3 \cdot \log \pi}}\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 65.9% accurate, 1.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;a \leq 3.8 \cdot 10^{+208}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(2 \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= a 3.8e+208)
   (*
    (+ a b_m)
    (*
     (- b_m a)
     (sin (* (* 2.0 (cbrt (pow PI 3.0))) (* angle 0.005555555555555556)))))
   (*
    (+ a b_m)
    (*
     (- b_m a)
     (sin (expm1 (log1p (* (* angle 0.005555555555555556) (* 2.0 PI)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (a <= 3.8e+208) {
		tmp = (a + b_m) * ((b_m - a) * sin(((2.0 * cbrt(pow(((double) M_PI), 3.0))) * (angle * 0.005555555555555556))));
	} else {
		tmp = (a + b_m) * ((b_m - a) * sin(expm1(log1p(((angle * 0.005555555555555556) * (2.0 * ((double) M_PI)))))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (a <= 3.8e+208) {
		tmp = (a + b_m) * ((b_m - a) * Math.sin(((2.0 * Math.cbrt(Math.pow(Math.PI, 3.0))) * (angle * 0.005555555555555556))));
	} else {
		tmp = (a + b_m) * ((b_m - a) * Math.sin(Math.expm1(Math.log1p(((angle * 0.005555555555555556) * (2.0 * Math.PI))))));
	}
	return tmp;
}
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (a <= 3.8e+208)
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(Float64(Float64(2.0 * cbrt((pi ^ 3.0))) * Float64(angle * 0.005555555555555556)))));
	else
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(expm1(log1p(Float64(Float64(angle * 0.005555555555555556) * Float64(2.0 * pi)))))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[a, 3.8e+208], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(N[(2.0 * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision] * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(Exp[N[Log[1 + N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 54.9%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow254.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.8000000000000002e208 < a

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)}\right)\right)}^{1} \]
      3. metadata-eval28.2%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)} - 1\right)\right)\right)}^{1} \]
      4. div-inv28.2%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(\left(2 \cdot \pi\right) \cdot \color{blue}{\frac{angle}{180}}\right)} - 1\right)\right)\right)}^{1} \]
      5. associate-*l*28.2%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(\color{blue}{2 \cdot \left(\pi \cdot \frac{angle}{180}\right)}\right)} - 1\right)\right)\right)}^{1} \]
      6. div-inv28.2%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(2 \cdot \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)} - 1\right)\right)\right)}^{1} \]
      7. metadata-eval28.2%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)} - 1\right)\right)\right)}^{1} \]
    10. Applied egg-rr28.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.8 \cdot 10^{+208}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(2 \cdot \sqrt[3]{{\pi}^{3}}\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 67.3% accurate, 1.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\left(a + b\_m\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(angle \cdot \left(\pi \cdot {\left(\sqrt[3]{0.011111111111111112}\right)}^{3}\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 2.00000000000000003e116

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000003e116 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 23.4%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \left(\color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}}\right)} + \pi \cdot \frac{angle}{180}\right)}}\right) \]
      5. add-log-exp0.0%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \left(\log \left(e^{\pi \cdot \frac{angle}{180}}\right) + \color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}}\right)}\right)}}\right) \]
      6. sum-log0.0%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}} \cdot e^{\pi \cdot \frac{angle}{180}}\right)}}}\right) \]
      7. exp-lft-sqr0.0%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \log \color{blue}{\left(e^{\left(\pi \cdot \frac{angle}{180}\right) \cdot 2}\right)}}}\right) \]
    8. Applied egg-rr32.2%

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

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

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

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

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \color{blue}{\left({\left(\sqrt[3]{2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)}}}\right) \]
    11. Taylor expanded in angle around inf 35.2%

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

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

Alternative 4: 64.8% accurate, 1.3× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} t_0 := \left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\\ \mathbf{if}\;b\_m \leq 5 \cdot 10^{+188}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (let* ((t_0 (* (* angle 0.005555555555555556) (* 2.0 PI))))
   (if (<= b_m 5e+188)
     (* (+ a b_m) (* (- b_m a) (sin t_0)))
     (* (+ a b_m) (* (- b_m a) (sin (expm1 (log1p t_0))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double t_0 = (angle * 0.005555555555555556) * (2.0 * ((double) M_PI));
	double tmp;
	if (b_m <= 5e+188) {
		tmp = (a + b_m) * ((b_m - a) * sin(t_0));
	} else {
		tmp = (a + b_m) * ((b_m - a) * sin(expm1(log1p(t_0))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double t_0 = (angle * 0.005555555555555556) * (2.0 * Math.PI);
	double tmp;
	if (b_m <= 5e+188) {
		tmp = (a + b_m) * ((b_m - a) * Math.sin(t_0));
	} else {
		tmp = (a + b_m) * ((b_m - a) * Math.sin(Math.expm1(Math.log1p(t_0))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	t_0 = (angle * 0.005555555555555556) * (2.0 * math.pi)
	tmp = 0
	if b_m <= 5e+188:
		tmp = (a + b_m) * ((b_m - a) * math.sin(t_0))
	else:
		tmp = (a + b_m) * ((b_m - a) * math.sin(math.expm1(math.log1p(t_0))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	t_0 = Float64(Float64(angle * 0.005555555555555556) * Float64(2.0 * pi))
	tmp = 0.0
	if (b_m <= 5e+188)
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(t_0)));
	else
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(expm1(log1p(t_0)))));
	end
	return tmp
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := Block[{t$95$0 = N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b$95$m, 5e+188], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
b_m = \left|b\right|

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

\mathbf{else}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right)\right)\\


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

    1. Initial program 56.7%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow256.7%

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000001e188 < b

    1. Initial program 37.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(e^{\mathsf{log1p}\left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)} - 1\right)}\right)\right)}^{1} \]
      3. metadata-eval17.3%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot \color{blue}{\frac{1}{180}}\right)\right)} - 1\right)\right)\right)}^{1} \]
      4. div-inv17.3%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(\left(2 \cdot \pi\right) \cdot \color{blue}{\frac{angle}{180}}\right)} - 1\right)\right)\right)}^{1} \]
      5. associate-*l*17.3%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(\color{blue}{2 \cdot \left(\pi \cdot \frac{angle}{180}\right)}\right)} - 1\right)\right)\right)}^{1} \]
      6. div-inv17.3%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(2 \cdot \left(\pi \cdot \color{blue}{\left(angle \cdot \frac{1}{180}\right)}\right)\right)} - 1\right)\right)\right)}^{1} \]
      7. metadata-eval17.3%

        \[\leadsto {\left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(e^{\mathsf{log1p}\left(2 \cdot \left(\pi \cdot \left(angle \cdot \color{blue}{0.005555555555555556}\right)\right)\right)} - 1\right)\right)\right)}^{1} \]
    10. Applied egg-rr17.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 5 \cdot 10^{+188}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.9% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_0 := \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\\
\mathbf{if}\;\frac{angle}{180} \leq 5 \cdot 10^{+74}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot t\_0\right)\\

\mathbf{elif}\;\frac{angle}{180} \leq 5 \cdot 10^{+206}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(t\_0 \cdot \left|b\_m - a\right|\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 angle #s(literal 180 binary64)) < 4.99999999999999963e74

    1. Initial program 60.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999963e74 < (/.f64 angle #s(literal 180 binary64)) < 5.0000000000000002e206

    1. Initial program 24.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000002e206 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 34.0%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow234.0%

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(\left(\sin 0 + \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot 0.5 + \left(\sin 0 + \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot 0.5\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-out40.9%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 63.3% accurate, 1.9× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 1.9 \cdot 10^{+210}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left|\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\pi \cdot \left(2 \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right|\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= b_m 1.9e+210)
   (*
    (+ a b_m)
    (* (- b_m a) (sin (* (* angle 0.005555555555555556) (* 2.0 PI)))))
   (fabs
    (*
     (+ a b_m)
     (* (- b_m a) (sin (* PI (* 2.0 (* angle 0.005555555555555556)))))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 1.9e+210) {
		tmp = (a + b_m) * ((b_m - a) * sin(((angle * 0.005555555555555556) * (2.0 * ((double) M_PI)))));
	} else {
		tmp = fabs(((a + b_m) * ((b_m - a) * sin((((double) M_PI) * (2.0 * (angle * 0.005555555555555556)))))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 1.9e+210) {
		tmp = (a + b_m) * ((b_m - a) * Math.sin(((angle * 0.005555555555555556) * (2.0 * Math.PI))));
	} else {
		tmp = Math.abs(((a + b_m) * ((b_m - a) * Math.sin((Math.PI * (2.0 * (angle * 0.005555555555555556)))))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if b_m <= 1.9e+210:
		tmp = (a + b_m) * ((b_m - a) * math.sin(((angle * 0.005555555555555556) * (2.0 * math.pi))))
	else:
		tmp = math.fabs(((a + b_m) * ((b_m - a) * math.sin((math.pi * (2.0 * (angle * 0.005555555555555556)))))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (b_m <= 1.9e+210)
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(Float64(Float64(angle * 0.005555555555555556) * Float64(2.0 * pi)))));
	else
		tmp = abs(Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(Float64(pi * Float64(2.0 * Float64(angle * 0.005555555555555556)))))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (b_m <= 1.9e+210)
		tmp = (a + b_m) * ((b_m - a) * sin(((angle * 0.005555555555555556) * (2.0 * pi))));
	else
		tmp = abs(((a + b_m) * ((b_m - a) * sin((pi * (2.0 * (angle * 0.005555555555555556)))))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 1.9e+210], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(N[(angle * 0.005555555555555556), $MachinePrecision] * N[(2.0 * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Abs[N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(Pi * N[(2.0 * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 1.9 \cdot 10^{+210}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)\\

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


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

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.90000000000000014e210 < b

    1. Initial program 40.9%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow240.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left({\left({\left(\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)\right)}^{2}\right)}^{\color{blue}{0.5}}\right)}^{1} \]
    12. Applied egg-rr50.3%

      \[\leadsto {\color{blue}{\left({\left({\left(\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)\right)}^{2}\right)}^{0.5}\right)}}^{1} \]
    13. Step-by-step derivation
      1. unpow1/250.3%

        \[\leadsto {\color{blue}{\left(\sqrt{{\left(\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)\right)}^{2}}\right)}}^{1} \]
      2. unpow250.3%

        \[\leadsto {\left(\sqrt{\color{blue}{\left(\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)\right) \cdot \left(\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)\right)}}\right)}^{1} \]
      3. rem-sqrt-square50.3%

        \[\leadsto {\color{blue}{\left(\left|\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)\right|\right)}}^{1} \]
      4. associate-*r*54.5%

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

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

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

        \[\leadsto {\left(\left|\left(a + b\right) \cdot \left(\left(b - a\right) \cdot \sin \color{blue}{\left(\pi \cdot \left(\left(angle \cdot 0.005555555555555556\right) \cdot 2\right)\right)}\right)\right|\right)}^{1} \]
    14. Simplified54.5%

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

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

Alternative 7: 61.3% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 a #s(literal 2 binary64)) < 1.99999999999999989e273

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \left(\color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}}\right)} + \pi \cdot \frac{angle}{180}\right)}}\right) \]
      5. add-log-exp15.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \left(\log \left(e^{\pi \cdot \frac{angle}{180}}\right) + \color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}}\right)}\right)}}\right) \]
      6. sum-log15.2%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}} \cdot e^{\pi \cdot \frac{angle}{180}}\right)}}}\right) \]
      7. exp-lft-sqr15.7%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \log \color{blue}{\left(e^{\left(\pi \cdot \frac{angle}{180}\right) \cdot 2}\right)}}}\right) \]
    8. Applied egg-rr61.8%

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

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

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

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

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

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

    if 1.99999999999999989e273 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 38.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. Add Preprocessing
    3. Taylor expanded in angle around 0 35.8%

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

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

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

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

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

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

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

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

Alternative 8: 66.6% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 2.35 \cdot 10^{+257}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(\left(angle \cdot 0.005555555555555556\right) \cdot \left(2 \cdot \pi\right)\right)\right)\\

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


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

    1. Initial program 55.7%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow255.7%

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

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

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

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

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

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

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

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

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

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

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

    if 2.35e257 < b

    1. Initial program 36.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.6% accurate, 3.3× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle \cdot 0.005555555555555556\right)\\
\mathbf{if}\;b\_m \leq 9 \cdot 10^{+257}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot t\_0\right)\right)\\

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


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

    1. Initial program 55.7%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow255.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999999e257 < b

    1. Initial program 36.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 67.0% accurate, 3.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;b\_m \leq 3 \cdot 10^{+225}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= b_m 3e+225)
   (*
    (+ a b_m)
    (* (- b_m a) (sin (* 2.0 (* PI (* angle 0.005555555555555556))))))
   (* (+ a b_m) (* (- b_m a) (* (* PI angle) 0.011111111111111112)))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 3e+225) {
		tmp = (a + b_m) * ((b_m - a) * sin((2.0 * (((double) M_PI) * (angle * 0.005555555555555556)))));
	} else {
		tmp = (a + b_m) * ((b_m - a) * ((((double) M_PI) * angle) * 0.011111111111111112));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (b_m <= 3e+225) {
		tmp = (a + b_m) * ((b_m - a) * Math.sin((2.0 * (Math.PI * (angle * 0.005555555555555556)))));
	} else {
		tmp = (a + b_m) * ((b_m - a) * ((Math.PI * angle) * 0.011111111111111112));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if b_m <= 3e+225:
		tmp = (a + b_m) * ((b_m - a) * math.sin((2.0 * (math.pi * (angle * 0.005555555555555556)))))
	else:
		tmp = (a + b_m) * ((b_m - a) * ((math.pi * angle) * 0.011111111111111112))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (b_m <= 3e+225)
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * sin(Float64(2.0 * Float64(pi * Float64(angle * 0.005555555555555556))))));
	else
		tmp = Float64(Float64(a + b_m) * Float64(Float64(b_m - a) * Float64(Float64(pi * angle) * 0.011111111111111112)));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (b_m <= 3e+225)
		tmp = (a + b_m) * ((b_m - a) * sin((2.0 * (pi * (angle * 0.005555555555555556)))));
	else
		tmp = (a + b_m) * ((b_m - a) * ((pi * angle) * 0.011111111111111112));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[b$95$m, 3e+225], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(angle * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + b$95$m), $MachinePrecision] * N[(N[(b$95$m - a), $MachinePrecision] * N[(N[(Pi * angle), $MachinePrecision] * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

\\
\begin{array}{l}
\mathbf{if}\;b\_m \leq 3 \cdot 10^{+225}:\\
\;\;\;\;\left(a + b\_m\right) \cdot \left(\left(b\_m - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\\

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


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

    1. Initial program 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3e225 < b

    1. Initial program 38.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 63.1% accurate, 3.5× speedup?

\[\begin{array}{l} b_m = \left|b\right| \\ \begin{array}{l} \mathbf{if}\;angle \leq 5.8 \cdot 10^{-140}:\\ \;\;\;\;\left(a + b\_m\right) \cdot \left(0.011111111111111112 \cdot \left(angle \cdot \left(\left(b\_m - a\right) \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(a + b\_m\right) \cdot \left(b\_m - a\right)\right) \cdot \sin \left(2 \cdot \left(0.005555555555555556 \cdot \left(\pi \cdot angle\right)\right)\right)\\ \end{array} \end{array} \]
b_m = (fabs.f64 b)
(FPCore (a b_m angle)
 :precision binary64
 (if (<= angle 5.8e-140)
   (* (+ a b_m) (* 0.011111111111111112 (* angle (* (- b_m a) PI))))
   (*
    (* (+ a b_m) (- b_m a))
    (sin (* 2.0 (* 0.005555555555555556 (* PI angle)))))))
b_m = fabs(b);
double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 5.8e-140) {
		tmp = (a + b_m) * (0.011111111111111112 * (angle * ((b_m - a) * ((double) M_PI))));
	} else {
		tmp = ((a + b_m) * (b_m - a)) * sin((2.0 * (0.005555555555555556 * (((double) M_PI) * angle))));
	}
	return tmp;
}
b_m = Math.abs(b);
public static double code(double a, double b_m, double angle) {
	double tmp;
	if (angle <= 5.8e-140) {
		tmp = (a + b_m) * (0.011111111111111112 * (angle * ((b_m - a) * Math.PI)));
	} else {
		tmp = ((a + b_m) * (b_m - a)) * Math.sin((2.0 * (0.005555555555555556 * (Math.PI * angle))));
	}
	return tmp;
}
b_m = math.fabs(b)
def code(a, b_m, angle):
	tmp = 0
	if angle <= 5.8e-140:
		tmp = (a + b_m) * (0.011111111111111112 * (angle * ((b_m - a) * math.pi)))
	else:
		tmp = ((a + b_m) * (b_m - a)) * math.sin((2.0 * (0.005555555555555556 * (math.pi * angle))))
	return tmp
b_m = abs(b)
function code(a, b_m, angle)
	tmp = 0.0
	if (angle <= 5.8e-140)
		tmp = Float64(Float64(a + b_m) * Float64(0.011111111111111112 * Float64(angle * Float64(Float64(b_m - a) * pi))));
	else
		tmp = Float64(Float64(Float64(a + b_m) * Float64(b_m - a)) * sin(Float64(2.0 * Float64(0.005555555555555556 * Float64(pi * angle)))));
	end
	return tmp
end
b_m = abs(b);
function tmp_2 = code(a, b_m, angle)
	tmp = 0.0;
	if (angle <= 5.8e-140)
		tmp = (a + b_m) * (0.011111111111111112 * (angle * ((b_m - a) * pi)));
	else
		tmp = ((a + b_m) * (b_m - a)) * sin((2.0 * (0.005555555555555556 * (pi * angle))));
	end
	tmp_2 = tmp;
end
b_m = N[Abs[b], $MachinePrecision]
code[a_, b$95$m_, angle_] := If[LessEqual[angle, 5.8e-140], N[(N[(a + b$95$m), $MachinePrecision] * N[(0.011111111111111112 * N[(angle * N[(N[(b$95$m - a), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a + b$95$m), $MachinePrecision] * N[(b$95$m - a), $MachinePrecision]), $MachinePrecision] * N[Sin[N[(2.0 * N[(0.005555555555555556 * N[(Pi * angle), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
b_m = \left|b\right|

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

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


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

    1. Initial program 57.0%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow257.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.79999999999999995e-140 < angle

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow250.6%

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

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

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

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

      \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \color{blue}{\left(\left(\sin 0 + \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot 0.5 + \left(\sin 0 + \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \cdot 0.5\right)} \]
    8. Step-by-step derivation
      1. distribute-lft-out56.4%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 63.1% accurate, 3.6× speedup?

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

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

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


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

    1. Initial program 57.0%

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow257.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999995e-140 < angle

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

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

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

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

      \[\leadsto \color{blue}{\left({b}^{2} - {a}^{2}\right) \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. unpow250.6%

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

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

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

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

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

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

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin \color{blue}{0} + \sin \left(\pi \cdot \frac{angle}{180} + \pi \cdot \frac{angle}{180}\right)}}\right) \]
      4. add-log-exp22.9%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \left(\color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}}\right)} + \pi \cdot \frac{angle}{180}\right)}}\right) \]
      5. add-log-exp14.0%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \left(\log \left(e^{\pi \cdot \frac{angle}{180}}\right) + \color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}}\right)}\right)}}\right) \]
      6. sum-log14.0%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \color{blue}{\log \left(e^{\pi \cdot \frac{angle}{180}} \cdot e^{\pi \cdot \frac{angle}{180}}\right)}}}\right) \]
      7. exp-lft-sqr16.3%

        \[\leadsto \left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \frac{1}{\frac{2}{\sin 0 + \sin \log \color{blue}{\left(e^{\left(\pi \cdot \frac{angle}{180}\right) \cdot 2}\right)}}}\right) \]
    8. Applied egg-rr56.4%

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

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

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

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

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

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

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

Alternative 13: 56.1% accurate, 23.3× speedup?

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

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

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


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

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in angle around 0 53.8%

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

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

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

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

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

      \[\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)} \]
    7. Step-by-step derivation
      1. associate-*r*56.8%

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

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

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

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

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

    if 5.4000000000000003e136 < a

    1. Initial program 37.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 35.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 5.4 \cdot 10^{+136}:\\ \;\;\;\;\left(angle \cdot 0.011111111111111112\right) \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 56.1% accurate, 23.3× speedup?

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

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

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


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

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in angle around 0 53.8%

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

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

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

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

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

    if 7.80000000000000038e136 < a

    1. Initial program 37.9%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 35.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 7.8 \cdot 10^{+136}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 44.1% accurate, 26.2× speedup?

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

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

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


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

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in angle around 0 54.1%

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

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

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

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

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

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

    if 2.05e24 < a

    1. Initial program 44.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in angle around 0 40.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 2.05 \cdot 10^{+24}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 40.3% accurate, 26.2× speedup?

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

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

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


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

    1. Initial program 60.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. Add Preprocessing
    3. Taylor expanded in angle around 0 56.6%

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

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

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

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

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

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

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

    if 2.20000000000000012e75 < angle

    1. Initial program 27.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. Add Preprocessing
    3. Taylor expanded in angle around 0 23.5%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 21.2% accurate, 46.6× speedup?

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

\\
0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(b\_m \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.9%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Add Preprocessing
  3. Taylor expanded in angle around 0 50.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(a \cdot \left(b \cdot \pi\right)\right)\right) \]
  11. Add Preprocessing

Alternative 18: 19.8% accurate, 46.6× speedup?

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

\\
0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b\_m \cdot \pi\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.9%

    \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
  2. Add Preprocessing
  3. Taylor expanded in angle around 0 50.8%

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

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

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

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

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

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

    \[\leadsto \color{blue}{0.011111111111111112 \cdot \left(a \cdot \left(angle \cdot \left(b \cdot \pi\right)\right)\right)} \]
  8. Add Preprocessing

Reproduce

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