ab-angle->ABCF B

Percentage Accurate: 54.4% → 67.9%
Time: 38.8s
Alternatives: 16
Speedup: 32.2×

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

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

Initial Program: 54.4% accurate, 1.0× speedup?

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

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

Alternative 1: 67.9% accurate, 0.7× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{angle\_m}{180} \leq 10^{+134}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left({\left(\sqrt{\pi}\right)}^{2} \cdot \left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\\ \mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+230}:\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\frac{angle\_m}{180} \cdot \pi\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot {\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\pi}\right)\right)\right)}^{2}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (/ angle_m 180.0) 1e+134)
    (*
     (+ b a)
     (*
      (- b a)
      (sin (* 2.0 (* (pow (sqrt PI) 2.0) (* angle_m 0.005555555555555556))))))
    (if (<= (/ angle_m 180.0) 2e+230)
      (*
       (* (+ b a) (- b a))
       (*
        2.0
        (*
         (sin (* (/ angle_m 180.0) PI))
         (cos (* (/ angle_m 180.0) (pow (expm1 (log1p (sqrt PI))) 2.0))))))
      (*
       (+ b a)
       (*
        (- b a)
        (sin
         (*
          2.0
          (* (* angle_m 0.005555555555555556) (cbrt (pow PI 3.0)))))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 1e+134) {
		tmp = (b + a) * ((b - a) * sin((2.0 * (pow(sqrt(((double) M_PI)), 2.0) * (angle_m * 0.005555555555555556)))));
	} else if ((angle_m / 180.0) <= 2e+230) {
		tmp = ((b + a) * (b - a)) * (2.0 * (sin(((angle_m / 180.0) * ((double) M_PI))) * cos(((angle_m / 180.0) * pow(expm1(log1p(sqrt(((double) M_PI)))), 2.0)))));
	} else {
		tmp = (b + a) * ((b - a) * sin((2.0 * ((angle_m * 0.005555555555555556) * cbrt(pow(((double) M_PI), 3.0))))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if ((angle_m / 180.0) <= 1e+134) {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.pow(Math.sqrt(Math.PI), 2.0) * (angle_m * 0.005555555555555556)))));
	} else if ((angle_m / 180.0) <= 2e+230) {
		tmp = ((b + a) * (b - a)) * (2.0 * (Math.sin(((angle_m / 180.0) * Math.PI)) * Math.cos(((angle_m / 180.0) * Math.pow(Math.expm1(Math.log1p(Math.sqrt(Math.PI))), 2.0)))));
	} else {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * ((angle_m * 0.005555555555555556) * Math.cbrt(Math.pow(Math.PI, 3.0))))));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (Float64(angle_m / 180.0) <= 1e+134)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64((sqrt(pi) ^ 2.0) * Float64(angle_m * 0.005555555555555556))))));
	elseif (Float64(angle_m / 180.0) <= 2e+230)
		tmp = Float64(Float64(Float64(b + a) * Float64(b - a)) * Float64(2.0 * Float64(sin(Float64(Float64(angle_m / 180.0) * pi)) * cos(Float64(Float64(angle_m / 180.0) * (expm1(log1p(sqrt(pi))) ^ 2.0))))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(angle_m * 0.005555555555555556) * cbrt((pi ^ 3.0)))))));
	end
	return Float64(angle_s * tmp)
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 1e+134], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[Power[N[Sqrt[Pi], $MachinePrecision], 2.0], $MachinePrecision] * N[(angle$95$m * 0.005555555555555556), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(angle$95$m / 180.0), $MachinePrecision], 2e+230], N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(N[Sin[N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]], $MachinePrecision] * N[Cos[N[(N[(angle$95$m / 180.0), $MachinePrecision] * N[Power[N[(Exp[N[Log[1 + N[Sqrt[Pi], $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

\mathbf{elif}\;\frac{angle\_m}{180} \leq 2 \cdot 10^{+230}:\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \left(2 \cdot \left(\sin \left(\frac{angle\_m}{180} \cdot \pi\right) \cdot \cos \left(\frac{angle\_m}{180} \cdot {\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\pi}\right)\right)\right)}^{2}\right)\right)\right)\\

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


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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin27.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow257.6%

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

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

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      10. associate-*l*73.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-sin73.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. div-inv72.0%

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

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

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

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

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

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

    if 9.99999999999999921e133 < (/.f64 angle #s(literal 180 binary64)) < 2.0000000000000002e230

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

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

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

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

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

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

      \[\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 \cos \left(\color{blue}{{\left(\sqrt{\pi}\right)}^{2}} \cdot \frac{angle}{180}\right)\right)\right) \]
    9. Step-by-step derivation
      1. expm1-log1p-u50.6%

        \[\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 \cos \left({\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\pi}\right)\right)\right)}}^{2} \cdot \frac{angle}{180}\right)\right)\right) \]
      2. expm1-undefine38.0%

        \[\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 \cos \left({\color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\pi}\right)} - 1\right)}}^{2} \cdot \frac{angle}{180}\right)\right)\right) \]
    10. Applied egg-rr38.0%

      \[\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 \cos \left({\color{blue}{\left(e^{\mathsf{log1p}\left(\sqrt{\pi}\right)} - 1\right)}}^{2} \cdot \frac{angle}{180}\right)\right)\right) \]
    11. Step-by-step derivation
      1. expm1-define50.6%

        \[\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 \cos \left({\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\pi}\right)\right)\right)}}^{2} \cdot \frac{angle}{180}\right)\right)\right) \]
    12. Simplified50.6%

      \[\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 \cos \left({\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{\pi}\right)\right)\right)}}^{2} \cdot \frac{angle}{180}\right)\right)\right) \]

    if 2.0000000000000002e230 < (/.f64 angle #s(literal 180 binary64))

    1. Initial program 23.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*23.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. *-commutative23.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*23.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. Simplified23.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. expm1-log1p-u13.6%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin11.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow223.3%

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

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

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

        \[\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-sin30.6%

        \[\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. div-inv38.6%

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

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

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

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

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

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

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

Alternative 2: 67.7% accurate, 1.0× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;{a}^{2} \leq 2 \cdot 10^{+112}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\left(angle\_m \cdot 0.005555555555555556\right) \cdot \sqrt[3]{{\pi}^{3}}\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (pow a 2.0) 2e+112)
    (*
     (+ b a)
     (*
      (- b a)
      (sin (* 2.0 (* PI (expm1 (log1p (* angle_m 0.005555555555555556))))))))
    (*
     (+ b a)
     (*
      (- b a)
      (sin
       (* 2.0 (* (* angle_m 0.005555555555555556) (cbrt (pow PI 3.0))))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (pow(a, 2.0) <= 2e+112) {
		tmp = (b + a) * ((b - a) * sin((2.0 * (((double) M_PI) * expm1(log1p((angle_m * 0.005555555555555556)))))));
	} else {
		tmp = (b + a) * ((b - a) * sin((2.0 * ((angle_m * 0.005555555555555556) * cbrt(pow(((double) M_PI), 3.0))))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (Math.pow(a, 2.0) <= 2e+112) {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * (Math.PI * Math.expm1(Math.log1p((angle_m * 0.005555555555555556)))))));
	} else {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * ((angle_m * 0.005555555555555556) * Math.cbrt(Math.pow(Math.PI, 3.0))))));
	}
	return angle_s * tmp;
}
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if ((a ^ 2.0) <= 2e+112)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi * expm1(log1p(Float64(angle_m * 0.005555555555555556))))))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(angle_m * 0.005555555555555556) * cbrt((pi ^ 3.0)))))));
	end
	return Float64(angle_s * tmp)
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[a, 2.0], $MachinePrecision], 2e+112], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(Exp[N[Log[1 + N[(angle$95$m * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(angle$95$m * 0.005555555555555556), $MachinePrecision] * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 60.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*60.6%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin29.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow260.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e112 < (pow.f64 a #s(literal 2 binary64))

    1. Initial program 46.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin20.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow246.2%

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

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

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      10. associate-*l*66.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-sin66.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. div-inv66.2%

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

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

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

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

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

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

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

Alternative 3: 67.4% accurate, 1.3× speedup?

\[\begin{array}{l} 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^{+254}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle\_m}{180} \cdot \pi\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left({\pi}^{3} \cdot {angle\_m}^{2}\right) + \pi \cdot 0.011111111111111112\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= (pow b 2.0) 5e+254)
    (* (+ b a) (* (- b a) (sin (* 2.0 (* (/ angle_m 180.0) PI)))))
    (*
     (+ b a)
     (*
      (- b a)
      (*
       angle_m
       (+
        (* -2.2862368541380886e-7 (* (pow PI 3.0) (pow angle_m 2.0)))
        (* PI 0.011111111111111112))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (pow(b, 2.0) <= 5e+254) {
		tmp = (b + a) * ((b - a) * sin((2.0 * ((angle_m / 180.0) * ((double) M_PI)))));
	} else {
		tmp = (b + a) * ((b - a) * (angle_m * ((-2.2862368541380886e-7 * (pow(((double) M_PI), 3.0) * pow(angle_m, 2.0))) + (((double) M_PI) * 0.011111111111111112))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (Math.pow(b, 2.0) <= 5e+254) {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * ((angle_m / 180.0) * Math.PI))));
	} else {
		tmp = (b + a) * ((b - a) * (angle_m * ((-2.2862368541380886e-7 * (Math.pow(Math.PI, 3.0) * Math.pow(angle_m, 2.0))) + (Math.PI * 0.011111111111111112))));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if math.pow(b, 2.0) <= 5e+254:
		tmp = (b + a) * ((b - a) * math.sin((2.0 * ((angle_m / 180.0) * math.pi))))
	else:
		tmp = (b + a) * ((b - a) * (angle_m * ((-2.2862368541380886e-7 * (math.pow(math.pi, 3.0) * math.pow(angle_m, 2.0))) + (math.pi * 0.011111111111111112))))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if ((b ^ 2.0) <= 5e+254)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(angle_m / 180.0) * pi)))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * Float64(angle_m * Float64(Float64(-2.2862368541380886e-7 * Float64((pi ^ 3.0) * (angle_m ^ 2.0))) + Float64(pi * 0.011111111111111112)))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if ((b ^ 2.0) <= 5e+254)
		tmp = (b + a) * ((b - a) * sin((2.0 * ((angle_m / 180.0) * pi))));
	else
		tmp = (b + a) * ((b - a) * (angle_m * ((-2.2862368541380886e-7 * ((pi ^ 3.0) * (angle_m ^ 2.0))) + (pi * 0.011111111111111112))));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[N[Power[b, 2.0], $MachinePrecision], 5e+254], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(angle$95$m * N[(N[(-2.2862368541380886e-7 * N[(N[Power[Pi, 3.0], $MachinePrecision] * N[Power[angle$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(Pi * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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^{+254}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle\_m}{180} \cdot \pi\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(angle\_m \cdot \left(-2.2862368541380886 \cdot 10^{-7} \cdot \left({\pi}^{3} \cdot {angle\_m}^{2}\right) + \pi \cdot 0.011111111111111112\right)\right)\right)\\


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

    1. Initial program 60.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*60.6%

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin28.6%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
      2. expm1-log1p-u60.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. associate-*l*60.5%

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow260.6%

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

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

        \[\leadsto \color{blue}{\left(\left(b + a\right) \cdot \left(b - a\right)\right)} \cdot \left(2 \cdot \left(\sin \left(\pi \cdot \frac{angle}{180}\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right)\right)\right) \]
      10. associate-*l*68.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-sin68.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. div-inv68.5%

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

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

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

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

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

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

    if 4.99999999999999994e254 < (pow.f64 b #s(literal 2 binary64))

    1. Initial program 36.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*36.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. *-commutative36.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*36.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. Simplified36.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. expm1-log1p-u19.0%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin17.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow236.3%

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

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

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

        \[\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-sin67.8%

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

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

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

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

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

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

Alternative 4: 67.5% accurate, 1.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (*
   (+ b a)
   (*
    (- b a)
    (sin (* 2.0 (* PI (expm1 (log1p (* angle_m 0.005555555555555556))))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * sin((2.0 * (((double) M_PI) * expm1(log1p((angle_m * 0.005555555555555556))))))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * Math.sin((2.0 * (Math.PI * Math.expm1(Math.log1p((angle_m * 0.005555555555555556))))))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((b + a) * ((b - a) * math.sin((2.0 * (math.pi * math.expm1(math.log1p((angle_m * 0.005555555555555556))))))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(pi * expm1(log1p(Float64(angle_m * 0.005555555555555556)))))))))
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(Pi * N[(Exp[N[Log[1 + N[(angle$95$m * 0.005555555555555556), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle\_m \cdot 0.005555555555555556\right)\right)\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
    3. 2-sin25.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. expm1-log1p-u53.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. associate-*l*53.6%

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

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

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

      \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
    7. unpow254.0%

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

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

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

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

      \[\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. div-inv67.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot 0.005555555555555556\right)\right)}\right)\right)\right) \]
  13. Final simplification61.8%

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\pi \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(angle \cdot 0.005555555555555556\right)\right)\right)\right)\right) \]
  14. Add Preprocessing

Alternative 5: 67.0% accurate, 3.3× speedup?

\[\begin{array}{l} 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}\;angle\_m \leq 3.9 \cdot 10^{-33}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\\ \mathbf{elif}\;angle\_m \leq 1.5 \cdot 10^{+48} \lor \neg \left(angle\_m \leq 1.07 \cdot 10^{+102}\right):\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* PI (* angle_m 0.011111111111111112))))
   (*
    angle_s
    (if (<= angle_m 3.9e-33)
      (* (+ b a) (* (- b a) t_0))
      (if (or (<= angle_m 1.5e+48) (not (<= angle_m 1.07e+102)))
        (* (* (+ b a) (- b a)) (sin t_0))
        (* 0.011111111111111112 (* angle_m (* b (* b PI)))))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = ((double) M_PI) * (angle_m * 0.011111111111111112);
	double tmp;
	if (angle_m <= 3.9e-33) {
		tmp = (b + a) * ((b - a) * t_0);
	} else if ((angle_m <= 1.5e+48) || !(angle_m <= 1.07e+102)) {
		tmp = ((b + a) * (b - a)) * sin(t_0);
	} else {
		tmp = 0.011111111111111112 * (angle_m * (b * (b * ((double) M_PI))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = Math.PI * (angle_m * 0.011111111111111112);
	double tmp;
	if (angle_m <= 3.9e-33) {
		tmp = (b + a) * ((b - a) * t_0);
	} else if ((angle_m <= 1.5e+48) || !(angle_m <= 1.07e+102)) {
		tmp = ((b + a) * (b - a)) * Math.sin(t_0);
	} else {
		tmp = 0.011111111111111112 * (angle_m * (b * (b * Math.PI)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = math.pi * (angle_m * 0.011111111111111112)
	tmp = 0
	if angle_m <= 3.9e-33:
		tmp = (b + a) * ((b - a) * t_0)
	elif (angle_m <= 1.5e+48) or not (angle_m <= 1.07e+102):
		tmp = ((b + a) * (b - a)) * math.sin(t_0)
	else:
		tmp = 0.011111111111111112 * (angle_m * (b * (b * math.pi)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(pi * Float64(angle_m * 0.011111111111111112))
	tmp = 0.0
	if (angle_m <= 3.9e-33)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * t_0));
	elseif ((angle_m <= 1.5e+48) || !(angle_m <= 1.07e+102))
		tmp = Float64(Float64(Float64(b + a) * Float64(b - a)) * sin(t_0));
	else
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(b * Float64(b * pi))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	t_0 = pi * (angle_m * 0.011111111111111112);
	tmp = 0.0;
	if (angle_m <= 3.9e-33)
		tmp = (b + a) * ((b - a) * t_0);
	elseif ((angle_m <= 1.5e+48) || ~((angle_m <= 1.07e+102)))
		tmp = ((b + a) * (b - a)) * sin(t_0);
	else
		tmp = 0.011111111111111112 * (angle_m * (b * (b * pi)));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := Block[{t$95$0 = N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[angle$95$m, 3.9e-33], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[angle$95$m, 1.5e+48], N[Not[LessEqual[angle$95$m, 1.07e+102]], $MachinePrecision]], N[(N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision], N[(0.011111111111111112 * N[(angle$95$m * N[(b * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
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}\;angle\_m \leq 3.9 \cdot 10^{-33}:\\
\;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\\

\mathbf{elif}\;angle\_m \leq 1.5 \cdot 10^{+48} \lor \neg \left(angle\_m \leq 1.07 \cdot 10^{+102}\right):\\
\;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin t\_0\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if angle < 3.89999999999999974e-33

    1. Initial program 58.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin27.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow258.4%

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

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

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

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

        \[\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. div-inv76.8%

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

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

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

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

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

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

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

    if 3.89999999999999974e-33 < angle < 1.5e48 or 1.07000000000000002e102 < angle

    1. Initial program 46.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin20.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow246.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left|\sin \color{blue}{\left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)}\right| \cdot \left(\left(a + b\right) \cdot \left(b - a\right)\right) \]
      4. rem-square-sqrt28.4%

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

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

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

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

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

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

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

    if 1.5e48 < angle < 1.07000000000000002e102

    1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;angle \leq 3.9 \cdot 10^{-33}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\right)\\ \mathbf{elif}\;angle \leq 1.5 \cdot 10^{+48} \lor \neg \left(angle \leq 1.07 \cdot 10^{+102}\right):\\ \;\;\;\;\left(\left(b + a\right) \cdot \left(b - a\right)\right) \cdot \sin \left(\pi \cdot \left(angle \cdot 0.011111111111111112\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle \cdot \left(b \cdot \left(b \cdot \pi\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 68.0% accurate, 3.5× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 3.5 \cdot 10^{+220}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \frac{angle\_m \cdot \pi}{180}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \left(0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 3.5e+220)
    (* (+ b a) (* (- b a) (sin (* 2.0 (/ (* angle_m PI) 180.0)))))
    (* (+ b a) (* (- b a) (* 0.011111111111111112 (* angle_m PI)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.5e+220) {
		tmp = (b + a) * ((b - a) * sin((2.0 * ((angle_m * ((double) M_PI)) / 180.0))));
	} else {
		tmp = (b + a) * ((b - a) * (0.011111111111111112 * (angle_m * ((double) M_PI))));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 3.5e+220) {
		tmp = (b + a) * ((b - a) * Math.sin((2.0 * ((angle_m * Math.PI) / 180.0))));
	} else {
		tmp = (b + a) * ((b - a) * (0.011111111111111112 * (angle_m * Math.PI)));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if b <= 3.5e+220:
		tmp = (b + a) * ((b - a) * math.sin((2.0 * ((angle_m * math.pi) / 180.0))))
	else:
		tmp = (b + a) * ((b - a) * (0.011111111111111112 * (angle_m * math.pi)))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (b <= 3.5e+220)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(angle_m * pi) / 180.0)))));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * Float64(0.011111111111111112 * Float64(angle_m * pi))));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (b <= 3.5e+220)
		tmp = (b + a) * ((b - a) * sin((2.0 * ((angle_m * pi) / 180.0))));
	else
		tmp = (b + a) * ((b - a) * (0.011111111111111112 * (angle_m * pi)));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 3.5e+220], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(angle$95$m * Pi), $MachinePrecision] / 180.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 55.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*55.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. *-commutative55.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*55.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. Simplified55.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. expm1-log1p-u39.8%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin26.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow255.3%

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

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

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

        \[\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-sin68.9%

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

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

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

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

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

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

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

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

    if 3.49999999999999986e220 < b

    1. Initial program 39.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*39.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. *-commutative39.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*39.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. Simplified39.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. expm1-log1p-u15.1%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin15.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow239.3%

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

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

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

        \[\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-sin61.8%

        \[\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. div-inv66.5%

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

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

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

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

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

Alternative 7: 67.9% accurate, 3.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ \begin{array}{l} t_0 := 0.011111111111111112 \cdot \left(angle\_m \cdot \pi\right)\\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 2 \cdot 10^{+218}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin t\_0\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b + a\right) \cdot \left(\left(b - a\right) \cdot t\_0\right)\\ \end{array} \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (let* ((t_0 (* 0.011111111111111112 (* angle_m PI))))
   (*
    angle_s
    (if (<= b 2e+218)
      (* (+ b a) (* (- b a) (sin t_0)))
      (* (+ b a) (* (- b a) t_0))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = 0.011111111111111112 * (angle_m * ((double) M_PI));
	double tmp;
	if (b <= 2e+218) {
		tmp = (b + a) * ((b - a) * sin(t_0));
	} else {
		tmp = (b + a) * ((b - a) * t_0);
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double t_0 = 0.011111111111111112 * (angle_m * Math.PI);
	double tmp;
	if (b <= 2e+218) {
		tmp = (b + a) * ((b - a) * Math.sin(t_0));
	} else {
		tmp = (b + a) * ((b - a) * t_0);
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	t_0 = 0.011111111111111112 * (angle_m * math.pi)
	tmp = 0
	if b <= 2e+218:
		tmp = (b + a) * ((b - a) * math.sin(t_0))
	else:
		tmp = (b + a) * ((b - a) * t_0)
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	t_0 = Float64(0.011111111111111112 * Float64(angle_m * pi))
	tmp = 0.0
	if (b <= 2e+218)
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * sin(t_0)));
	else
		tmp = Float64(Float64(b + a) * Float64(Float64(b - a) * t_0));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	t_0 = 0.011111111111111112 * (angle_m * pi);
	tmp = 0.0;
	if (b <= 2e+218)
		tmp = (b + a) * ((b - a) * sin(t_0));
	else
		tmp = (b + a) * ((b - a) * t_0);
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := Block[{t$95$0 = N[(0.011111111111111112 * N[(angle$95$m * Pi), $MachinePrecision]), $MachinePrecision]}, N[(angle$95$s * If[LessEqual[b, 2e+218], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 55.3%

      \[\left(\left(2 \cdot \left({b}^{2} - {a}^{2}\right)\right) \cdot \sin \left(\pi \cdot \frac{angle}{180}\right)\right) \cdot \cos \left(\pi \cdot \frac{angle}{180}\right) \]
    2. Step-by-step derivation
      1. associate-*l*55.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. *-commutative55.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*55.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. Simplified55.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. expm1-log1p-u39.8%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin26.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow255.3%

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

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

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

        \[\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-sin68.9%

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

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

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

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

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

    if 2.00000000000000017e218 < b

    1. Initial program 39.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*39.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. *-commutative39.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*39.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. Simplified39.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. expm1-log1p-u15.1%

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
      3. 2-sin15.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
      7. unpow239.3%

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

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

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

        \[\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-sin61.8%

        \[\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. div-inv66.5%

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

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

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

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

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

Alternative 8: 67.9% accurate, 3.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle\_m}{180} \cdot \pi\right)\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* (+ b a) (* (- b a) (sin (* 2.0 (* (/ angle_m 180.0) PI)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * sin((2.0 * ((angle_m / 180.0) * ((double) M_PI))))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * Math.sin((2.0 * ((angle_m / 180.0) * Math.PI)))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((b + a) * ((b - a) * math.sin((2.0 * ((angle_m / 180.0) * math.pi)))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(2.0 * Float64(Float64(angle_m / 180.0) * pi))))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((b + a) * ((b - a) * sin((2.0 * ((angle_m / 180.0) * pi)))));
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(2.0 * N[(N[(angle$95$m / 180.0), $MachinePrecision] * Pi), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle\_m}{180} \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
    3. 2-sin25.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. expm1-log1p-u53.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. associate-*l*53.6%

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

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

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

      \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
    7. unpow254.0%

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

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

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

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

      \[\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. div-inv67.9%

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

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

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

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

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

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

    \[\leadsto \left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(2 \cdot \left(\frac{angle}{180} \cdot \pi\right)\right)\right) \]
  12. Add Preprocessing

Alternative 9: 68.1% accurate, 3.7× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (* (+ b a) (* (- b a) (sin (* PI (* angle_m 0.011111111111111112)))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * sin((((double) M_PI) * (angle_m * 0.011111111111111112)))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b + a) * ((b - a) * Math.sin((Math.PI * (angle_m * 0.011111111111111112)))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((b + a) * ((b - a) * math.sin((math.pi * (angle_m * 0.011111111111111112)))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(b + a) * Float64(Float64(b - a) * sin(Float64(pi * Float64(angle_m * 0.011111111111111112))))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((b + a) * ((b - a) * sin((pi * (angle_m * 0.011111111111111112)))));
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b + a), $MachinePrecision] * N[(N[(b - a), $MachinePrecision] * N[Sin[N[(Pi * N[(angle$95$m * 0.011111111111111112), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

\\
angle\_s \cdot \left(\left(b + a\right) \cdot \left(\left(b - a\right) \cdot \sin \left(\pi \cdot \left(angle\_m \cdot 0.011111111111111112\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.0%

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
    3. 2-sin25.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. expm1-log1p-u53.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. associate-*l*53.6%

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

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

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

      \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
    7. unpow254.0%

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

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

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

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

      \[\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. div-inv67.9%

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

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

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

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

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

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

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

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

Alternative 10: 56.9% accurate, 23.3× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \begin{array}{l} \mathbf{if}\;b \leq 1.4 \cdot 10^{+122}:\\ \;\;\;\;0.011111111111111112 \cdot \left(angle\_m \cdot \left(\pi \cdot \left(\left(b + a\right) \cdot \left(b - a\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(b \cdot \pi\right)\right)\\ \end{array} \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (*
  angle_s
  (if (<= b 1.4e+122)
    (* 0.011111111111111112 (* angle_m (* PI (* (+ b a) (- b a)))))
    (* (* b 0.011111111111111112) (* angle_m (* b PI))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 1.4e+122) {
		tmp = 0.011111111111111112 * (angle_m * (((double) M_PI) * ((b + a) * (b - a))));
	} else {
		tmp = (b * 0.011111111111111112) * (angle_m * (b * ((double) M_PI)));
	}
	return angle_s * tmp;
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	double tmp;
	if (b <= 1.4e+122) {
		tmp = 0.011111111111111112 * (angle_m * (Math.PI * ((b + a) * (b - a))));
	} else {
		tmp = (b * 0.011111111111111112) * (angle_m * (b * Math.PI));
	}
	return angle_s * tmp;
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	tmp = 0
	if b <= 1.4e+122:
		tmp = 0.011111111111111112 * (angle_m * (math.pi * ((b + a) * (b - a))))
	else:
		tmp = (b * 0.011111111111111112) * (angle_m * (b * math.pi))
	return angle_s * tmp
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	tmp = 0.0
	if (b <= 1.4e+122)
		tmp = Float64(0.011111111111111112 * Float64(angle_m * Float64(pi * Float64(Float64(b + a) * Float64(b - a)))));
	else
		tmp = Float64(Float64(b * 0.011111111111111112) * Float64(angle_m * Float64(b * pi)));
	end
	return Float64(angle_s * tmp)
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp_2 = code(angle_s, a, b, angle_m)
	tmp = 0.0;
	if (b <= 1.4e+122)
		tmp = 0.011111111111111112 * (angle_m * (pi * ((b + a) * (b - a))));
	else
		tmp = (b * 0.011111111111111112) * (angle_m * (b * pi));
	end
	tmp_2 = angle_s * tmp;
end
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_, b_, angle$95$m_] := N[(angle$95$s * If[LessEqual[b, 1.4e+122], N[(0.011111111111111112 * N[(angle$95$m * N[(Pi * N[(N[(b + a), $MachinePrecision] * N[(b - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * 0.011111111111111112), $MachinePrecision] * N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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


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

    1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

    if 1.4e122 < b

    1. Initial program 40.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 63.3% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
    3. 2-sin25.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. expm1-log1p-u53.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. associate-*l*53.6%

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

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

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

      \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
    7. unpow254.0%

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

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

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

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

      \[\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. div-inv67.9%

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

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

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

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

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

Alternative 12: 63.3% accurate, 32.2× speedup?

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\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)} - 1} \]
    3. 2-sin25.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({b}^{2} - {a}^{2}\right) \cdot \sin \left(\left(2 \cdot \pi\right) \cdot \left(angle \cdot 0.005555555555555556\right)\right)\right)\right)} \]
    2. expm1-log1p-u53.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. associate-*l*53.6%

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

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

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

      \[\leadsto \left({b}^{2} - {a}^{2}\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)} \]
    7. unpow254.0%

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

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

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

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

      \[\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. div-inv67.9%

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

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

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

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

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

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

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

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

Alternative 13: 35.4% accurate, 46.6× speedup?

\[\begin{array}{l} 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(b \cdot \left(b \cdot \pi\right)\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* angle_m (* b (* b PI))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (b * (b * ((double) M_PI)))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (angle_m * (b * (b * Math.PI))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * (0.011111111111111112 * (angle_m * (b * (b * math.pi))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(angle_m * Float64(b * Float64(b * pi)))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * (angle_m * (b * (b * pi))));
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(angle$95$m * N[(b * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
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(b \cdot \left(b \cdot \pi\right)\right)\right)\right)
\end{array}
Derivation
  1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 39.0% accurate, 46.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(b \cdot \left(\pi \cdot \left(angle\_m \cdot b\right)\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* b (* PI (* angle_m b))))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (b * (((double) M_PI) * (angle_m * b))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * (b * (Math.PI * (angle_m * b))));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * (0.011111111111111112 * (b * (math.pi * (angle_m * b))))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(b * Float64(pi * Float64(angle_m * b)))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * (b * (pi * (angle_m * b))));
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(b * N[(Pi * N[(angle$95$m * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 39.0% accurate, 46.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(0.011111111111111112 \cdot \left(\left(b \cdot \pi\right) \cdot \left(angle\_m \cdot b\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* 0.011111111111111112 (* (* b PI) (* angle_m b)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * ((b * ((double) M_PI)) * (angle_m * b)));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * (0.011111111111111112 * ((b * Math.PI) * (angle_m * b)));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * (0.011111111111111112 * ((b * math.pi) * (angle_m * b)))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(0.011111111111111112 * Float64(Float64(b * pi) * Float64(angle_m * b))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * (0.011111111111111112 * ((b * pi) * (angle_m * b)));
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(0.011111111111111112 * N[(N[(b * Pi), $MachinePrecision] * N[(angle$95$m * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 39.1% accurate, 46.6× speedup?

\[\begin{array}{l} angle\_m = \left|angle\right| \\ angle\_s = \mathsf{copysign}\left(1, angle\right) \\ angle\_s \cdot \left(\left(b \cdot 0.011111111111111112\right) \cdot \left(angle\_m \cdot \left(b \cdot \pi\right)\right)\right) \end{array} \]
angle\_m = (fabs.f64 angle)
angle\_s = (copysign.f64 #s(literal 1 binary64) angle)
(FPCore (angle_s a b angle_m)
 :precision binary64
 (* angle_s (* (* b 0.011111111111111112) (* angle_m (* b PI)))))
angle\_m = fabs(angle);
angle\_s = copysign(1.0, angle);
double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b * 0.011111111111111112) * (angle_m * (b * ((double) M_PI))));
}
angle\_m = Math.abs(angle);
angle\_s = Math.copySign(1.0, angle);
public static double code(double angle_s, double a, double b, double angle_m) {
	return angle_s * ((b * 0.011111111111111112) * (angle_m * (b * Math.PI)));
}
angle\_m = math.fabs(angle)
angle\_s = math.copysign(1.0, angle)
def code(angle_s, a, b, angle_m):
	return angle_s * ((b * 0.011111111111111112) * (angle_m * (b * math.pi)))
angle\_m = abs(angle)
angle\_s = copysign(1.0, angle)
function code(angle_s, a, b, angle_m)
	return Float64(angle_s * Float64(Float64(b * 0.011111111111111112) * Float64(angle_m * Float64(b * pi))))
end
angle\_m = abs(angle);
angle\_s = sign(angle) * abs(1.0);
function tmp = code(angle_s, a, b, angle_m)
	tmp = angle_s * ((b * 0.011111111111111112) * (angle_m * (b * pi)));
end
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_, b_, angle$95$m_] := N[(angle$95$s * N[(N[(b * 0.011111111111111112), $MachinePrecision] * N[(angle$95$m * N[(b * Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
angle\_m = \left|angle\right|
\\
angle\_s = \mathsf{copysign}\left(1, angle\right)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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