ab-angle->ABCF B

Percentage Accurate: 55.0% → 67.8%
Time: 1.4min
Alternatives: 9
Speedup: 27.9×

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 9 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: 55.0% accurate, 1.0× speedup?

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

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

Alternative 1: 67.8% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := \pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;a\_m \leq 2 \cdot 10^{+171}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right) \cdot 0.5\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin t\_0\right)\\ \end{array} \end{array} \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (* angle_m 0.011111111111111112))))
   (*
    angle_s
    (if (<= a_m 2e+171)
      (* (+ a_m b) (* 2.0 (* (- b a_m) (* (sin (expm1 (log1p t_0))) 0.5))))
      (* (+ a_m b) (* (- b a_m) (sin t_0)))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m * 0.011111111111111112);
	double tmp;
	if (a_m <= 2e+171) {
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (sin(expm1(log1p(t_0))) * 0.5)));
	} else {
		tmp = (a_m + b) * ((b - a_m) * sin(t_0));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	double t_0 = Math.PI * (angle_m * 0.011111111111111112);
	double tmp;
	if (a_m <= 2e+171) {
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (Math.sin(Math.expm1(Math.log1p(t_0))) * 0.5)));
	} else {
		tmp = (a_m + b) * ((b - a_m) * Math.sin(t_0));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	t_0 = math.pi * (angle_m * 0.011111111111111112)
	tmp = 0
	if a_m <= 2e+171:
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (math.sin(math.expm1(math.log1p(t_0))) * 0.5)))
	else:
		tmp = (a_m + b) * ((b - a_m) * math.sin(t_0))
	return angle_s * tmp
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m * 0.011111111111111112))
	tmp = 0.0
	if (a_m <= 2e+171)
		tmp = Float64(Float64(a_m + b) * Float64(2.0 * Float64(Float64(b - a_m) * Float64(sin(expm1(log1p(t_0))) * 0.5))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(t_0)));
	end
	return Float64(angle_s * tmp)
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[a$95$m, 2e+171], N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(N[Sin[N[(Exp[N[Log[1 + t$95$0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
\begin{array}{l}
t_0 := \pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\\
angle\_s \cdot \begin{array}{l}
\mathbf{if}\;a\_m \leq 2 \cdot 10^{+171}:\\
\;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(t\_0\right)\right)\right) \cdot 0.5\right)\right)\right)\\

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


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

    1. Initial program 50.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*50.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. *-commutative50.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*50.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. Simplified50.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. add-cbrt-cube40.3%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/330.3%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.3%

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l*59.2%

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

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

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot 0.5\right)\right)\right) \]
    11. Applied egg-rr52.2%

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

    if 1.99999999999999991e171 < a

    1. Initial program 42.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*42.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. *-commutative42.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*42.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. Simplified42.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. unpow242.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. unpow242.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-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. Step-by-step derivation
      1. add-cube-cbrt54.5%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\log \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 {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\right)}} \]
      2. associate-*l*37.5%

        \[\leadsto e^{\log \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 {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\right)\right)}} \]
      3. div-inv37.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.3% accurate, 1.3× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{+42}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(0.5 \cdot \left|\sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right|\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (pow b 2.0) 5e+42)
    (* (+ a_m b) (* (- b a_m) (sin (* 0.011111111111111112 (* PI angle_m)))))
    (*
     (+ a_m b)
     (*
      2.0
      (*
       (- b a_m)
       (* 0.5 (fabs (sin (* PI (* angle_m 0.011111111111111112)))))))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (pow(b, 2.0) <= 5e+42) {
		tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (((double) M_PI) * angle_m))));
	} else {
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * fabs(sin((((double) M_PI) * (angle_m * 0.011111111111111112)))))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (Math.pow(b, 2.0) <= 5e+42) {
		tmp = (a_m + b) * ((b - a_m) * Math.sin((0.011111111111111112 * (Math.PI * angle_m))));
	} else {
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * Math.abs(Math.sin((Math.PI * (angle_m * 0.011111111111111112)))))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	tmp = 0
	if math.pow(b, 2.0) <= 5e+42:
		tmp = (a_m + b) * ((b - a_m) * math.sin((0.011111111111111112 * (math.pi * angle_m))))
	else:
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * math.fabs(math.sin((math.pi * (angle_m * 0.011111111111111112)))))))
	return angle_s * tmp
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	tmp = 0.0
	if ((b ^ 2.0) <= 5e+42)
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(0.011111111111111112 * Float64(pi * angle_m)))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(2.0 * Float64(Float64(b - a_m) * Float64(0.5 * abs(sin(Float64(pi * Float64(angle_m * 0.011111111111111112))))))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b, angle_m)
	tmp = 0.0;
	if ((b ^ 2.0) <= 5e+42)
		tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (pi * angle_m))));
	else
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * abs(sin((pi * (angle_m * 0.011111111111111112)))))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e+42], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(0.5 * N[Abs[N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 5.00000000000000007e42

    1. Initial program 53.5%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.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*53.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. Simplified53.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. add-cbrt-cube43.7%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/332.9%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr32.9%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/346.1%

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

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

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

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

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

        \[\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. metadata-eval55.5%

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      11. 2-sin58.5%

        \[\leadsto \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) \]
      12. count-258.5%

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

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

    if 5.00000000000000007e42 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 45.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*45.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. *-commutative45.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*45.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. Simplified45.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. add-cbrt-cube37.4%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/326.1%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr26.1%

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l*64.7%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \color{blue}{0}\right) \cdot 0.5\right)\right)\right) \]
      4. +-rgt-identity64.7%

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot 0.5\right)\right)\right)} \]
    10. Step-by-step derivation
      1. expm1-log1p-u57.7%

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot 0.5\right)\right)\right) \]
    11. Applied egg-rr57.7%

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\left(\sqrt{\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot \sqrt{\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)}\right)} \cdot 0.5\right)\right)\right) \]
      2. sqrt-unprod24.6%

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\color{blue}{\sqrt{\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right) \cdot \sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)}} \cdot 0.5\right)\right)\right) \]
      3. pow224.6%

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sqrt{\color{blue}{{\sin \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)}^{2}}} \cdot 0.5\right)\right)\right) \]
      4. expm1-log1p-u30.5%

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

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

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\left|\sin \left(\pi \cdot \color{blue}{\left(0.011111111111111112 \cdot angle\right)}\right)\right| \cdot 0.5\right)\right)\right) \]
    15. Simplified38.1%

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

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

Alternative 3: 63.7% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{+42}:\\ \;\;\;\;\sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right) \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (pow b 2.0) 5e+42)
    (* (sin (* 0.011111111111111112 (* PI angle_m))) (* (+ a_m b) (- b a_m)))
    (*
     (+ a_m b)
     (* 2.0 (* 0.005555555555555556 (* angle_m (* (- b a_m) PI))))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (pow(b, 2.0) <= 5e+42) {
		tmp = sin((0.011111111111111112 * (((double) M_PI) * angle_m))) * ((a_m + b) * (b - a_m));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * ((double) M_PI)))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (Math.pow(b, 2.0) <= 5e+42) {
		tmp = Math.sin((0.011111111111111112 * (Math.PI * angle_m))) * ((a_m + b) * (b - a_m));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * Math.PI))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	tmp = 0
	if math.pow(b, 2.0) <= 5e+42:
		tmp = math.sin((0.011111111111111112 * (math.pi * angle_m))) * ((a_m + b) * (b - a_m))
	else:
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * math.pi))))
	return angle_s * tmp
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	tmp = 0.0
	if ((b ^ 2.0) <= 5e+42)
		tmp = Float64(sin(Float64(0.011111111111111112 * Float64(pi * angle_m))) * Float64(Float64(a_m + b) * Float64(b - a_m)));
	else
		tmp = Float64(Float64(a_m + b) * Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(Float64(b - a_m) * pi)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b, angle_m)
	tmp = 0.0;
	if ((b ^ 2.0) <= 5e+42)
		tmp = sin((0.011111111111111112 * (pi * angle_m))) * ((a_m + b) * (b - a_m));
	else
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * pi))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e+42], N[(N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 5.00000000000000007e42

    1. Initial program 53.5%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.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*53.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. Simplified53.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. unpow253.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. unpow253.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-squares53.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-rr53.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. add-cube-cbrt53.5%

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

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

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

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

      \[\leadsto \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 \color{blue}{{\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}}\right)\right) \]
    9. Step-by-step derivation
      1. add-exp-log33.0%

        \[\leadsto \color{blue}{e^{\log \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 {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\right)}} \]
      2. associate-*l*35.5%

        \[\leadsto e^{\log \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 {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\right)\right)}} \]
      3. div-inv35.9%

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

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

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

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

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

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

      \[\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)} \]

    if 5.00000000000000007e42 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 45.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*45.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. *-commutative45.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*45.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. Simplified45.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. add-cbrt-cube37.4%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/326.1%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr26.1%

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l*64.7%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \color{blue}{0}\right) \cdot 0.5\right)\right)\right) \]
      4. +-rgt-identity64.7%

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

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

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

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

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

Alternative 4: 66.7% accurate, 1.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{b}^{2} \leq 5 \cdot 10^{+42}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (pow b 2.0) 5e+42)
    (* (+ a_m b) (* (- b a_m) (sin (* PI (* angle_m 0.011111111111111112)))))
    (*
     (+ a_m b)
     (* 2.0 (* 0.005555555555555556 (* angle_m (* (- b a_m) PI))))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (pow(b, 2.0) <= 5e+42) {
		tmp = (a_m + b) * ((b - a_m) * sin((((double) M_PI) * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * ((double) M_PI)))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (Math.pow(b, 2.0) <= 5e+42) {
		tmp = (a_m + b) * ((b - a_m) * Math.sin((Math.PI * (angle_m * 0.011111111111111112))));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * Math.PI))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	tmp = 0
	if math.pow(b, 2.0) <= 5e+42:
		tmp = (a_m + b) * ((b - a_m) * math.sin((math.pi * (angle_m * 0.011111111111111112))))
	else:
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * math.pi))))
	return angle_s * tmp
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	tmp = 0.0
	if ((b ^ 2.0) <= 5e+42)
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112)))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(Float64(b - a_m) * pi)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b, angle_m)
	tmp = 0.0;
	if ((b ^ 2.0) <= 5e+42)
		tmp = (a_m + b) * ((b - a_m) * sin((pi * (angle_m * 0.011111111111111112))));
	else
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * pi))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e+42], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (pow.f64 b #s(literal 2 binary64)) < 5.00000000000000007e42

    1. Initial program 53.5%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative53.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*53.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. Simplified53.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. unpow253.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. unpow253.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-squares53.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-rr53.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. add-cube-cbrt53.5%

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

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

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

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

      \[\leadsto \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 \color{blue}{{\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}}\right)\right) \]
    9. Step-by-step derivation
      1. add-exp-log33.0%

        \[\leadsto \color{blue}{e^{\log \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 {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\right)}} \]
      2. associate-*l*35.5%

        \[\leadsto e^{\log \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 {\left(\sqrt[3]{\cos \left(\pi \cdot \left(angle \cdot 0.005555555555555556\right)\right)}\right)}^{3}\right)\right)\right)\right)}} \]
      3. div-inv35.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000007e42 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 45.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*45.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. *-commutative45.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*45.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. Simplified45.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. add-cbrt-cube37.4%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/326.1%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr26.1%

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

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l*64.7%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \color{blue}{0}\right) \cdot 0.5\right)\right)\right) \]
      4. +-rgt-identity64.7%

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

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

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

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

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

Alternative 5: 68.2% accurate, 3.4× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 10^{+245}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(\left(b - a\_m\right) \cdot \left(0.5 \cdot \sin \left(angle\_m \cdot \left(\pi \cdot 0.011111111111111112\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 1e+245)
    (*
     (+ a_m b)
     (*
      2.0
      (* (- b a_m) (* 0.5 (sin (* angle_m (* PI 0.011111111111111112)))))))
    (*
     (+ a_m b)
     (* 2.0 (* 0.005555555555555556 (* angle_m (* (- b a_m) PI))))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (b <= 1e+245) {
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * sin((angle_m * (((double) M_PI) * 0.011111111111111112))))));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * ((double) M_PI)))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (b <= 1e+245) {
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * Math.sin((angle_m * (Math.PI * 0.011111111111111112))))));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * Math.PI))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	tmp = 0
	if b <= 1e+245:
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * math.sin((angle_m * (math.pi * 0.011111111111111112))))))
	else:
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * math.pi))))
	return angle_s * tmp
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	tmp = 0.0
	if (b <= 1e+245)
		tmp = Float64(Float64(a_m + b) * Float64(2.0 * Float64(Float64(b - a_m) * Float64(0.5 * sin(Float64(angle_m * Float64(pi * 0.011111111111111112)))))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(Float64(b - a_m) * pi)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b, angle_m)
	tmp = 0.0;
	if (b <= 1e+245)
		tmp = (a_m + b) * (2.0 * ((b - a_m) * (0.5 * sin((angle_m * (pi * 0.011111111111111112))))));
	else
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * pi))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 1e+245], N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(N[(b - a$95$m), $MachinePrecision] * N[(0.5 * N[Sin[N[(angle$95$m * N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 49.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*49.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. *-commutative49.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*49.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. Simplified49.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. add-cbrt-cube40.2%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/329.6%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr29.6%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Applied egg-rr62.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l*62.8%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \color{blue}{0}\right) \cdot 0.5\right)\right)\right) \]
      4. +-rgt-identity62.8%

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

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

      \[\leadsto \color{blue}{\left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right) \cdot 0.5\right)\right)\right)} \]
    10. Step-by-step derivation
      1. expm1-log1p-u53.4%

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot 0.5\right)\right)\right) \]
    11. Applied egg-rr53.4%

      \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sin \color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\right)} \cdot 0.5\right)\right)\right) \]
    12. Step-by-step derivation
      1. expm1-log1p-u62.9%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\sin \color{blue}{\left(\left(\pi \cdot 0.011111111111111112\right) \cdot angle\right)} \cdot 0.5\right)\right)\right) \]
    13. Applied egg-rr63.0%

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

    if 1.00000000000000004e245 < b

    1. Initial program 47.1%

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

        \[\leadsto \color{blue}{\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)} \]
      2. *-commutative47.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*47.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. Simplified47.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. add-cbrt-cube47.1%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/329.4%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr29.4%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Applied egg-rr64.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l*64.8%

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

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

        \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \color{blue}{0}\right) \cdot 0.5\right)\right)\right) \]
      4. +-rgt-identity64.8%

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

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

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

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

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

Alternative 6: 67.7% accurate, 3.6× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 2.2 \cdot 10^{+21}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(\left(b - a\_m\right) \cdot \sin \left(0.011111111111111112 \cdot \left(\pi \cdot angle\_m\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(a\_m + b\right) \cdot \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\right)\\ \end{array} \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 2.2e+21)
    (* (+ a_m b) (* (- b a_m) (sin (* 0.011111111111111112 (* PI angle_m)))))
    (*
     (+ a_m b)
     (* 2.0 (* 0.005555555555555556 (* angle_m (* (- b a_m) PI))))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (b <= 2.2e+21) {
		tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (((double) M_PI) * angle_m))));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * ((double) M_PI)))));
	}
	return angle_s * tmp;
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	double tmp;
	if (b <= 2.2e+21) {
		tmp = (a_m + b) * ((b - a_m) * Math.sin((0.011111111111111112 * (Math.PI * angle_m))));
	} else {
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * Math.PI))));
	}
	return angle_s * tmp;
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	tmp = 0
	if b <= 2.2e+21:
		tmp = (a_m + b) * ((b - a_m) * math.sin((0.011111111111111112 * (math.pi * angle_m))))
	else:
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * math.pi))))
	return angle_s * tmp
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	tmp = 0.0
	if (b <= 2.2e+21)
		tmp = Float64(Float64(a_m + b) * Float64(Float64(b - a_m) * sin(Float64(0.011111111111111112 * Float64(pi * angle_m)))));
	else
		tmp = Float64(Float64(a_m + b) * Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(Float64(b - a_m) * pi)))));
	end
	return Float64(angle_s * tmp)
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a_m, b, angle_m)
	tmp = 0.0;
	if (b <= 2.2e+21)
		tmp = (a_m + b) * ((b - a_m) * sin((0.011111111111111112 * (pi * angle_m))));
	else
		tmp = (a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * pi))));
	end
	tmp_2 = angle_s * tmp;
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 2.2e+21], N[(N[(a$95$m + b), $MachinePrecision] * N[(N[(b - a$95$m), $MachinePrecision] * N[Sin[N[(0.011111111111111112 * N[(Pi * angle$95$m), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 51.3%

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

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

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

      \[\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. add-cbrt-cube42.0%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/331.0%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr30.9%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Step-by-step derivation
      1. unpow1/343.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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)} \]
      11. 2-sin62.4%

        \[\leadsto \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) \]
      12. count-262.4%

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

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

    if 2.2e21 < b

    1. Initial program 44.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*44.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. *-commutative44.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*44.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. Simplified44.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. add-cbrt-cube36.4%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
      2. pow1/325.2%

        \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
    6. Applied egg-rr25.3%

      \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
    7. Applied egg-rr56.8%

      \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l*56.8%

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

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

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

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

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

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

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

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

Alternative 7: 62.5% accurate, 27.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a\_m + b\right) \cdot \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (* (+ a_m b) (* 2.0 (* 0.005555555555555556 (* angle_m (* (- b a_m) PI)))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * ((a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * ((double) M_PI))))));
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * ((a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * Math.PI)))));
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	return angle_s * ((a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * math.pi)))))
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	return Float64(angle_s * Float64(Float64(a_m + b) * Float64(2.0 * Float64(0.005555555555555556 * Float64(angle_m * Float64(Float64(b - a_m) * pi))))))
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b, angle_m)
	tmp = angle_s * ((a_m + b) * (2.0 * (0.005555555555555556 * (angle_m * ((b - a_m) * pi)))));
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(0.005555555555555556 * N[(angle$95$m * N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(a\_m + b\right) \cdot \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle\_m \cdot \left(\left(b - a\_m\right) \cdot \pi\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.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*49.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. *-commutative49.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*49.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. Simplified49.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. add-cbrt-cube40.6%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
    2. pow1/329.6%

      \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
  6. Applied egg-rr29.6%

    \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
  7. Applied egg-rr63.0%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
  8. Step-by-step derivation
    1. associate-*l*63.0%

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

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

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

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

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

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

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

    \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(0.005555555555555556 \cdot \left(angle \cdot \left(\left(b - a\right) \cdot \pi\right)\right)\right)\right) \]
  12. Add Preprocessing

Alternative 8: 62.5% accurate, 27.9× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(a\_m + b\right) \cdot \left(2 \cdot \left(\left(\left(b - a\_m\right) \cdot \pi\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (* (+ a_m b) (* 2.0 (* (* (- b a_m) PI) (* angle_m 0.005555555555555556))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * ((a_m + b) * (2.0 * (((b - a_m) * ((double) M_PI)) * (angle_m * 0.005555555555555556))));
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * ((a_m + b) * (2.0 * (((b - a_m) * Math.PI) * (angle_m * 0.005555555555555556))));
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	return angle_s * ((a_m + b) * (2.0 * (((b - a_m) * math.pi) * (angle_m * 0.005555555555555556))))
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	return Float64(angle_s * Float64(Float64(a_m + b) * Float64(2.0 * Float64(Float64(Float64(b - a_m) * pi) * Float64(angle_m * 0.005555555555555556)))))
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b, angle_m)
	tmp = angle_s * ((a_m + b) * (2.0 * (((b - a_m) * pi) * (angle_m * 0.005555555555555556))));
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(a$95$m + b), $MachinePrecision] * N[(2.0 * N[(N[(N[(b - a$95$m), $MachinePrecision] * Pi), $MachinePrecision] * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(a\_m + b\right) \cdot \left(2 \cdot \left(\left(\left(b - a\_m\right) \cdot \pi\right) \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.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*49.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. *-commutative49.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*49.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. Simplified49.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. add-cbrt-cube40.6%

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)}} \]
    2. pow1/329.6%

      \[\leadsto \color{blue}{{\left(\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\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)\right)\right)}^{0.3333333333333333}} \]
  6. Applied egg-rr29.6%

    \[\leadsto \color{blue}{{\left({\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)}^{3}\right)}^{0.3333333333333333}} \]
  7. Applied egg-rr63.0%

    \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot 2\right) \cdot \left(\left(b - a\right) \cdot \left(\left(\sin \left(\left(\pi \cdot angle\right) \cdot 0.011111111111111112\right) + \sin 0\right) \cdot 0.5\right)\right)} \]
  8. Step-by-step derivation
    1. associate-*l*63.0%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(a + b\right) \cdot \left(2 \cdot \left(\left(\left(b - a\right) \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right) \]
  14. Add Preprocessing

Alternative 9: 54.9% accurate, 32.2× speedup?

\[\begin{array}{l} a_m = \left|a\right| \\ angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\right)\right) \end{array} \]
a_m = (fabs.f64 a)
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a_m b angle_m)
 :precision binary64
 (*
  angle_s
  (* 0.011111111111111112 (* angle_m (* PI (* (+ a_m b) (- b a_m)))))))
a_m = fabs(a);
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (((double) M_PI) * ((a_m + b) * (b - a_m)))));
}
a_m = Math.abs(a);
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a_m, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (Math.PI * ((a_m + b) * (b - a_m)))));
}
a_m = math.fabs(a)
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a_m, b, angle_m):
	return angle_s * (0.011111111111111112 * (angle_m * (math.pi * ((a_m + b) * (b - a_m)))))
a_m = abs(a)
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a_m, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(a_m + b) * Float64(b - a_m))))))
end
a_m = abs(a);
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a_m, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * (angle_m * (pi * ((a_m + b) * (b - a_m)))));
end
a_m = N[Abs[a], $MachinePrecision]
angle\_m = N[Abs[angle], $MachinePrecision]
angle\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[angle]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[angle$95$s_, a$95$m_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(a$95$m + b), $MachinePrecision] * N[(b - a$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
a_m = \left|a\right|
\\
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(a\_m + b\right) \cdot \left(b - a\_m\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 49.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*49.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. *-commutative49.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*49.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. Simplified49.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. unpow249.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. unpow249.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-squares53.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-rr53.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. Taylor expanded in angle around 0 53.5%

    \[\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)} \]
  8. Step-by-step derivation
    1. +-commutative53.5%

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

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

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

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

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

      \[\leadsto 0.011111111111111112 \cdot \left(angle \cdot \left(\pi \cdot \left(b \cdot b - \color{blue}{a \cdot a}\right)\right)\right) \]
    7. difference-of-squares53.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) \]
    8. *-commutative53.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) \]
    9. +-commutative53.5%

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

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

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

Reproduce

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